Tables and columns
Which tables the agent may query, and the descriptions it reads them by.
Base URL https://futuresmart.ai/database-agent/api · every request sends X-API-Key. Samples read the key from DATABASE_AGENT_API_KEY. All endpoints
Db List Tables
/v1/agents/{agent_id}/databases/{db_id}/tablesCredential Database Agent API key for this agent (X-API-Key)
Path parameters
| Name | Type | Description |
|---|---|---|
agent_idrequired | string | |
db_idrequired | string |
Other responses
422Validation Error
Db Create Tables
/v1/agents/{agent_id}/databases/{db_id}/tablesCredential Database Agent API key for this agent (X-API-Key)
Path parameters
| Name | Type | Description |
|---|---|---|
agent_idrequired | string | |
db_idrequired | string |
Request body · multipart/form-data (optional)
| Name | Type | Description |
|---|---|---|
file | string | null | |
table_descriptions | string | null |
Other responses
422Validation Error
Db Put Tables
/v1/agents/{agent_id}/databases/{db_id}/tablesBulk update table descriptions for a db_id — merges into the existing set (does not blank tables absent from the payload). Accepts a bare [{table_name, description}] array, a {"tables": [...]} object, or a file. Returns an "updated" message.
Credential Database Agent API key for this agent (X-API-Key)
Path parameters
| Name | Type | Description |
|---|---|---|
agent_idrequired | string | |
db_idrequired | string |
Request body · multipart/form-data (optional)
| Name | Type | Description |
|---|---|---|
file | string | null | |
table_descriptions | string | null |
Other responses
422Validation Error
Db Delete Tables
/v1/agents/{agent_id}/databases/{db_id}/tablesClear table descriptions. Body: {"table_names": ["t1","t2"]} for some, or {"delete_all": true} for all. (Tables are not deleted — only their description text is cleared.)
Credential Database Agent API key for this agent (X-API-Key)
Path parameters
| Name | Type | Description |
|---|---|---|
agent_idrequired | string | |
db_idrequired | string |
Request body · application/json
| Name | Type | Description |
|---|---|---|
table_names | array<string> | null | Table names to clear |
delete_all | boolean | Clear ALL table descriptions for this database |
Other responses
422Validation Error
Example request body
{
"delete_all": false
}Db Generate Table Descriptions
/v1/agents/{agent_id}/databases/{db_id}/tables/generateStart an async job that auto-generates a description for every table in the DB (via LLM).
overwrite=true regenerates all tables; default only fills tables whose description is
currently blank (manually-set ones are preserved). Poll the returned job_id.
Credential Database Agent API key for this agent (X-API-Key)
Path parameters
| Name | Type | Description |
|---|---|---|
agent_idrequired | string | |
db_idrequired | string |
Query parameters
| Name | Type | Description |
|---|---|---|
overwrite | boolean | true = regenerate ALL tables; false (default) = only fill tables whose description is blank (manual ones preserved) |
Other responses
422Validation Error
Db Poll Table Descriptions
/v1/agents/{agent_id}/databases/{db_id}/tables/generate/{job_id}Poll a table-description generation job → {status, message, error}.
Credential Database Agent API key for this agent (X-API-Key)
Path parameters
| Name | Type | Description |
|---|---|---|
agent_idrequired | string | |
db_idrequired | string | |
job_idrequired | string |
Other responses
422Validation Error
Db Generate One Table Description
/v1/agents/{agent_id}/databases/{db_id}/tables/{table_name}/generateAuto-generate (LLM) + save the description for a SINGLE table. Synchronous — returns
{table_name, description} directly (no job/poll). Other tables and flags are untouched.
Credential Database Agent API key for this agent (X-API-Key)
Path parameters
| Name | Type | Description |
|---|---|---|
agent_idrequired | string | |
db_idrequired | string | |
table_namerequired | string |
Other responses
422Validation Error
Db Table Visibility
/v1/agents/{agent_id}/databases/{db_id}/tables/{table_name}/visibilityCredential Database Agent API key for this agent (X-API-Key)
Path parameters
| Name | Type | Description |
|---|---|---|
agent_idrequired | string | |
db_idrequired | string | |
table_namerequired | string |
Request body · application/json (optional)
| Name | Type | Description |
|---|---|---|
is_includedrequired | boolean | Whether table is included |
Other responses
422Validation Error
Example request body
{
"is_included": false
}Db Update Table Description
/v1/agents/{agent_id}/databases/{db_id}/tables/{table_name}Update the description for a single table in the given db_id.
Credential Database Agent API key for this agent (X-API-Key)
Path parameters
| Name | Type | Description |
|---|---|---|
agent_idrequired | string | |
db_idrequired | string | |
table_namerequired | string |
Request body · application/json (optional)
| Name | Type | Description |
|---|---|---|
descriptionrequired | string | Table description |
is_included | boolean | null | Whether table is included (optional) |
Other responses
422Validation Error
Example request body
{
"description": "<description>"
}Db Get Columns
/v1/agents/{agent_id}/databases/{db_id}/tables/{table_name}/columnsCredential Database Agent API key for this agent (X-API-Key)
Path parameters
| Name | Type | Description |
|---|---|---|
agent_idrequired | string | |
db_idrequired | string | |
table_namerequired | string |
Other responses
422Validation Error
Db Update Columns
/v1/agents/{agent_id}/databases/{db_id}/tables/{table_name}/columnsCredential Database Agent API key for this agent (X-API-Key)
Path parameters
| Name | Type | Description |
|---|---|---|
agent_idrequired | string | |
db_idrequired | string | |
table_namerequired | string |
Request body · application/json (optional)
| Name | Type | Description |
|---|---|---|
user_id | string | null | User ID (optional if using auth token) |
columnsrequired | array<ColumnDescriptionUpdate> | List of column descriptions |
↳ column_namerequired | string | Name of the column |
↳ descriptionrequired | string | Description of the column |
Other responses
422Validation Error
Example request body
{
"columns": [
{
"column_name": "<column_name>",
"description": "<description>"
}
]
}