Etlworks AI Agent API
Give your applications and AI agents the power of data integration. Search knowledge bases, execute CLI commands, import templates, and have full conversations with the Etlworks AI agent — all through a simple REST API.
Direct tool access
Call individual agent tools — search the knowledge base, run CLI commands, search and import templates — without going through the LLM.
Full agent chat
Send messages to the AI agent and get intelligent responses. The agent automatically selects and chains tools to answer complex questions.
Real-time streaming
Stream responses token by token via Server-Sent Events. See tool calls in progress and get usage metrics in real time.
Multi-turn sessions
Create persistent sessions for multi-turn conversations. The agent remembers context across messages — perfect for complex workflows.
Subagent integration
Use Etlworks as a subagent in LangChain, CrewAI, AutoGen, or any orchestration framework. Delegate data integration tasks to a specialist.
API key auth
Simple, secure authentication with API keys. No OAuth flows, no token refresh — just a Bearer token in the Authorization header.
See it in action
# One-shot chat — ask the agent anything
curl -s https://app.etlworks.com/rest/v1/ai-agent/api/chat \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"message": "How do I create a REST API connection to load JSON data?"}'
# Execute a tool directly
curl -s https://app.etlworks.com/rest/v1/ai-agent/api/tools/search_knowledge_base/execute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "schedule a flow to run every hour"}'
from etlworks_agent import EtlworksAgent
agent = EtlworksAgent("https://app.etlworks.com", api_key="YOUR_API_KEY")
# One-shot chat
result = agent.chat("How do I create a REST API connection?")
print(result["response"])
# Execute a tool directly
kb = agent.execute_tool("search_knowledge_base", {"query": "schedule a flow"})
print(kb["result"])
# Multi-turn session
session = agent.create_session()
r1 = agent.session_chat(session, "Create a connection to api.example.com")
r2 = agent.session_chat(session, "Now schedule it to run every hour")
export ETLWORKS_URL="https://app.etlworks.com"
export ETLWORKS_API_KEY="YOUR_API_KEY"
# One-shot chat
./etlworks-agent.sh chat "How do I create a REST API connection?"
# Execute a tool
./etlworks-agent.sh tool search_knowledge_base '{"query": "schedule a flow"}'
# Multi-turn session
SESSION=$(./etlworks-agent.sh session-create)
./etlworks-agent.sh session-chat $SESSION "Create a connection to api.example.com"
./etlworks-agent.sh session-chat $SESSION "Now schedule it to run every hour"
$env:ETLWORKS_URL = "https://app.etlworks.com"
$env:ETLWORKS_API_KEY = "YOUR_API_KEY"
# One-shot chat
.\etlworks-agent.ps1 chat "How do I create a REST API connection?"
# Execute a tool
.\etlworks-agent.ps1 tool search_knowledge_base '{"query": "schedule a flow"}'
# Multi-turn session
$session = .\etlworks-agent.ps1 session-create
.\etlworks-agent.ps1 session-chat $session "Create a connection to api.example.com"
.\etlworks-agent.ps1 session-chat $session "Now schedule it to run every hour"