API Reference
API Overview
This API enables interaction with agents, their creation and management, and health monitoring of the API server.
Endpoints
Health Monitoring
GET /health
Check the health status of the API server.
- Description: This endpoint provides a simple status check for the server.
- Response:
- Example:
Agent Chat Interaction
GET /{aid}/chat
Chat with an AI agent.
- Description: Sends a query to a specific agent and receives its response.
- Parameters:
aid
(path, string): The unique identifier for the agent.q
(query, string): The userβs query message.
- Responses:
- 200 OK:
- 404 Not Found: Agent not found.
- 429 Too Many Requests: Message quota exceeded.
- 500 Internal Server Error: An unexpected error occurred.
- 200 OK:
- Example:
Agent Management
POST /agents
Create or update an agent.
- Description: Allows the creation or update of an agentβs configuration.
- Request Body:
- Response:
- Error Responses:
- 400 Bad Request: Invalid agent ID format.
- 500 Internal Server Error: Database error or other internal issue.
- Example:
GET /agents
Retrieve all agents.
- Description: Lists all agents along with their quota information.
- Response:
- Example:
Autonomous Agent Configuration
Autonomous agents can be configured with the following parameters:
-
Parameters:
autonomous_enabled
(boolean): Enable or disable autonomous execution.autonomous_minutes
(integer): Interval (in minutes) between executions.autonomous_prompt
(string): Instruction for autonomous actions.
-
Example Configuration:
Quota Management
Each agent has quota limits that include:
- Total messages
- Monthly messages
- Daily messages
- Total autonomous executions
- Monthly autonomous executions