For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
LoginBook a Demo
  • Getting Started
    • Athena SDK Quickstart
  • Database API
    • Database Filters & CRUD
  • Python Guides
    • Build with Agents
    • Use Models Directly
    • Load Data Frames
    • Upload Files
    • Create Assets
    • Structured Output
    • Long-Running AOP Execution
  • TypeScript Guides
    • Build with Agents
    • Working with Assets
    • Use Models Directly
    • Execute AOPs
    • Sheets API
    • Browser JavaScript (ESM)
    • UI Registry (Assistant.js)
    • Upload Files
    • Create Assets
    • Structured Output
  • API Reference
      • POSTInvoke By Id
        • POSTInvoke Sql Agent
Logo
LoginBook a Demo
API ReferenceAgentsSQL

Invoke Sql Agent

Beta
POST
https://api.athenaintel.com/api/v0/agents/sql/invoke
POST
/api/v0/agents/sql/invoke
$curl -X POST https://api.athenaintel.com/api/v0/agents/sql/invoke \
> -H "X-API-KEY: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "config": {},
> "messages": [
> {}
> ]
>}'
1{
2 "metadata": {},
3 "query_asset_id": "string"
4}
Coming soon! Generate, execute, and test SQL queries. Returns an asset ID for the query object.
Was this page helpful?
Previous

Execute Agent Operating Procedure

Next
Built with

Authentication

X-API-KEYstring
API Key authentication via header
OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
configmap from strings to anyRequired
Configuration for the SQL agent including database connection details and query parameters
messageslist of maps from strings to anyRequired
The messages to send to the SQL agent

Response

Successful Response
metadatamap from strings to any
Additional metadata about the generated query
query_asset_idstring
The asset ID of the generated SQL query object

Errors

422
Unprocessable Entity Error