Agent

Read and change the agent's own settings.

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

Get the agent

GET/v1/agents/{agent_id}

Get a specific agent by ID

The response includes the owner_id (email) of the agent.

Credential Database Agent API key for this agent (X-API-Key)

Path parameters

NameTypeDescription
agent_idrequiredstringAgent ID

Other responses

  • 422 Validation Error
import os
import requests

API_ROOT = "https://futuresmart.ai/database-agent/api"
API_KEY = os.environ["DATABASE_AGENT_API_KEY"]

r = requests.get(
    f"{API_ROOT}/v1/agents/YOUR_AGENT_ID",
    headers={"X-API-Key": API_KEY},
    timeout=120,
)
r.raise_for_status()
print(r.json())

Replace the agent's settings

PUT/v1/agents/{agent_id}

Update an agent (full update - replaces all fields)

Gets owner_id (email) from Google Auth token to verify ownership.

Credential Database Agent API key for this agent (X-API-Key)

Path parameters

NameTypeDescription
agent_idrequiredstringAgent ID

Request body · application/json (optional)

NameTypeDescription
agent_namestring | nullName of the agent
system_promptstring | nullSystem prompt for the agent
greet_messagestring | nullGreeting message
providerstring | nullLLM provider
modelstring | nullModel name
temperaturenumber | nullTemperature for LLM
show_sql_queryboolean | nullIf true, the chat response will include the generated SQL query
show_db_resultboolean | nullIf true, the chat response will include the raw DB result rows

Other responses

  • 422 Validation Error
import os
import requests

API_ROOT = "https://futuresmart.ai/database-agent/api"
API_KEY = os.environ["DATABASE_AGENT_API_KEY"]

r = requests.put(
    f"{API_ROOT}/v1/agents/YOUR_AGENT_ID",
    headers={"X-API-Key": API_KEY},
    json={},
    timeout=120,
)
r.raise_for_status()
print(r.json())

Example request body

JSON
{}

Update the agent's settings

PATCH/v1/agents/{agent_id}

Partially update an agent (only updates provided fields)

Gets owner_id (email) from Google Auth token to verify ownership.

Credential Database Agent API key for this agent (X-API-Key)

Path parameters

NameTypeDescription
agent_idrequiredstringAgent ID

Request body · application/json (optional)

NameTypeDescription
agent_namestring | nullName of the agent
system_promptstring | nullSystem prompt for the agent
greet_messagestring | nullGreeting message
providerstring | nullLLM provider
modelstring | nullModel name
temperaturenumber | nullTemperature for LLM
show_sql_queryboolean | nullIf true, the chat response will include the generated SQL query
show_db_resultboolean | nullIf true, the chat response will include the raw DB result rows

Other responses

  • 422 Validation Error
import os
import requests

API_ROOT = "https://futuresmart.ai/database-agent/api"
API_KEY = os.environ["DATABASE_AGENT_API_KEY"]

r = requests.patch(
    f"{API_ROOT}/v1/agents/YOUR_AGENT_ID",
    headers={"X-API-Key": API_KEY},
    json={},
    timeout=120,
)
r.raise_for_status()
print(r.json())

Example request body

JSON
{}

Get the agent's model configuration

GET/v1/agents/{agent_id}/config

Get agent configuration including nodes and agent parameters

Credential Database Agent API key for this agent (X-API-Key)

Path parameters

NameTypeDescription
agent_idrequiredstringAgent ID

Query parameters

NameTypeDescription
fieldsstring | nullComma-separated list of fields to return (e.g., nodes,agent_params)
node_namestring | nullFilter specific node configuration

Other responses

  • 422 Validation Error
import os
import requests

API_ROOT = "https://futuresmart.ai/database-agent/api"
API_KEY = os.environ["DATABASE_AGENT_API_KEY"]

r = requests.get(
    f"{API_ROOT}/v1/agents/YOUR_AGENT_ID/config",
    headers={"X-API-Key": API_KEY},
    timeout=120,
)
r.raise_for_status()
print(r.json())

Set per-step model configuration

POST/v1/agents/{agent_id}/config/nodes

Upsert (create or update) node configurations for an agent

Credential Database Agent API key for this agent (X-API-Key)

Path parameters

NameTypeDescription
agent_idrequiredstringAgent ID

Request body · application/json (optional)

NameTypeDescription
owner_idstring | nullUser ID (optional if using auth token)
configsrequiredarray<NodeConfig>List of node configurations to upsert
↳ node_namerequiredstringNode name (must be one of: refine, select_and_fewshots, sql_gen, sql_exec, final_answer_node, graph_json_node)
↳ providerrequiredstringLLM provider (e.g., openai, anthropic, groq)
↳ modelrequiredstringModel name (e.g., gpt-4o, gpt-4o-mini, claude-3-5-sonnet)
↳ temperaturenumber | nullTemperature for LLM
↳ promptstring | nullCustom prompt for this node

Other responses

  • 422 Validation Error
import os
import requests

API_ROOT = "https://futuresmart.ai/database-agent/api"
API_KEY = os.environ["DATABASE_AGENT_API_KEY"]

r = requests.post(
    f"{API_ROOT}/v1/agents/YOUR_AGENT_ID/config/nodes",
    headers={"X-API-Key": API_KEY},
    json={
        "configs": [{
            "node_name": "<node_name>",
            "provider": "<provider>",
            "model": "<model>",
        }],
    },
    timeout=120,
)
r.raise_for_status()
print(r.json())

Example request body

JSON
{
  "configs": [
    {
      "node_name": "<node_name>",
      "provider": "<provider>",
      "model": "<model>"
    }
  ]
}

Update agent parameters

PATCH/v1/agents/{agent_id}/config/params

Partially update agent parameters

Credential Database Agent API key for this agent (X-API-Key)

Path parameters

NameTypeDescription
agent_idrequiredstringAgent ID

Request body · application/json (optional)

NameTypeDescription
owner_idstring | nullOwner ID (optional if using auth token)
agent_namestring | nullName of the agent
system_promptstring | nullSystem prompt for the agent
service_descriptionstring | nullService description for the agent
greet_messagestring | nullGreeting message
debug_infoboolean | nullEnable debug information
show_sql_queryboolean | nullIf true, the chat response includes the generated SQL query
show_db_resultboolean | nullIf true, the chat response includes the raw DB result rows
graph_outputboolean | nullEnable graph output
allowed_graphsarray<string> | nullList of allowed graph types (e.g., bar, line, pie)
follow_upboolean | nullSuggest follow-up questions after each answer
voice_input_enabledboolean | nullOffer speech input in the ask box
voice_output_enabledboolean | nullOffer read-aloud on each answer
suggested_questionsarray<string> | nullStarter questions shown before the first message
max_query_execution_timeinteger | nullMaximum query execution time in seconds
enable_query_cachingboolean | nullEnable query caching
is_publicboolean | nullAllow the embedded widget to be used without signing in
allowed_domainsarray<string> | nullDomains the widget may be embedded on (e.g. ['example.com', '*.example.com']). Empty means any domain
fullscreen_is_publicboolean | nullAllow the full-screen share link to be used without signing in
fullscreen_allowed_domainsarray<string> | nullDomains the full-screen link may be opened from. Empty means any domain

Other responses

  • 422 Validation Error
import os
import requests

API_ROOT = "https://futuresmart.ai/database-agent/api"
API_KEY = os.environ["DATABASE_AGENT_API_KEY"]

r = requests.patch(
    f"{API_ROOT}/v1/agents/YOUR_AGENT_ID/config/params",
    headers={"X-API-Key": API_KEY},
    json={},
    timeout=120,
)
r.raise_for_status()
print(r.json())

Example request body

JSON
{}

Reset a step to its default configuration

DELETE/v1/agents/{agent_id}/config/nodes/{node_name}

Delete a node configuration

Credential Database Agent API key for this agent (X-API-Key)

Path parameters

NameTypeDescription
agent_idrequiredstringAgent ID
node_namerequiredstringNode name (must be one of the valid LangGraph nodes)

Other responses

  • 422 Validation Error
import os
import requests

API_ROOT = "https://futuresmart.ai/database-agent/api"
API_KEY = os.environ["DATABASE_AGENT_API_KEY"]

r = requests.delete(
    f"{API_ROOT}/v1/agents/YOUR_AGENT_ID/config/nodes/YOUR_NODE_NAME",
    headers={"X-API-Key": API_KEY},
    timeout=120,
)
r.raise_for_status()
print(r.json())