Tools & Triggers
Extend agents with tools (data sources and actions) and triggers (automated invocations).
Tools
Tools give agents the ability to query data, call APIs, and interact with external systems.
Database Query Tool
Connect an agent to a PostgreSQL database:
{
"type": "database_query",
"connection_id": "<connection-uuid>",
"query_template": "SELECT * FROM contracts WHERE status = $1",
"parameters": ["active"]
}
HTTP Request Tool
Call external APIs:
{
"type": "http_request",
"url": "https://api.example.com/data",
"method": "GET",
"headers": {
"Authorization": "Bearer <token>"
}
}
MCP Server Tool
Connect to external MCP servers for specialized capabilities. See MCP Server.
Triggers
Triggers allow external systems to start agent conversations via webhooks.
Create a Trigger
POST https://llm.zihin.ai/api/triggers
{
"agent_id": "<agent-uuid>",
"type": "webhook",
"config": {
"url_path": "/webhook/contract-alert",
"method": "POST"
}
}
Invoke a Trigger
POST https://llm.zihin.ai/api/triggers/:id/invoke
The trigger passes the request payload as context to the agent.