Agent Lifecycle Overview
Agent-Tool Integration Flow
Authentication
All endpoints require a valid Bearer token in the Authorization header.Base URL
Agent Endpoints
Create Agent
Create a new AI agent for your organization.POST /api/agents
Query Parameters:
Parameter | Required | Description |
---|---|---|
org_id | Yes | Organization ID |
Field | Type | Required | Description |
---|---|---|---|
name | string | Yes | Name of the agent |
description | string | Yes | Description of the agentβs purpose |
agent_type | string | Yes | Type of agent (e.g., βchatβ, βfunctionβ) |
model_id | string | Yes | ID of the LLM model to use |
tools | array | No | List of tools to provide to the agent |
params | object | Yes | Configuration parameters for the agent |
is_public | boolean | No | Whether the agent is publicly available (default: false) |
Field | Type | Description |
---|---|---|
system_prompt | string | The system instructions for the agent |
temperature | number | Sampling temperature (0-1) |
max_tokens | number | Maximum tokens in the response |
List Agents
Retrieve all agents for an organization.GET /api/agents/list
Query Parameters:
Parameter | Required | Description |
---|---|---|
org_id | Yes | Organization ID |
Get Agent Details
Retrieve detailed information about a specific agent.GET /api/agents/get
Query Parameters:
Parameter | Required | Description |
---|---|---|
agent_id | Yes | ID of the agent to retrieve |
Update Agent
Update an existing agentβs configuration.PUT /api/agents/update
Query Parameters:
Parameter | Required | Description |
---|---|---|
agent_id | Yes | ID of the agent to update |
Field | Type | Required | Description |
---|---|---|---|
name | string | No | New name for the agent |
description | string | No | New description |
model_id | string | No | New model ID |
tools | array | No | Updated list of tools |
params | object | No | Updated configuration parameters |
is_public | boolean | No | Update public availability |
Delete Agent
Delete an agent from the organization.DELETE /api/agents/delete
Query Parameters:
Parameter | Required | Description |
---|---|---|
agent_id | Yes | ID of the agent to delete |
Agent Deployment Endpoints
Create Deployment
Create a new deployment for an existing agent.POST /api/agent_deploy/create
Query Parameters:
Parameter | Required | Description |
---|---|---|
org_id | Yes | Organization ID |
Field | Type | Required | Description |
---|---|---|---|
agent_id | string | Yes | ID of the agent to deploy |
name | string | Yes | Name of the deployment |
description | string | Yes | Description of the deployment |
deployment_type | string | Yes | Type of deployment (e.g., βwidgetβ, βapiβ, βiframeβ) |
config | object | Yes | Configuration parameters for the deployment |
List Deployments
Retrieve all deployments for an organization.GET /api/agent_deploy/list
Query Parameters:
Parameter | Required | Description |
---|---|---|
org_id | Yes | Organization ID |
Get Deployment Details
Retrieve detailed information about a specific deployment.GET /api/agent_deploy/get
Query Parameters:
Parameter | Required | Description |
---|---|---|
deployment_id | Yes | ID of the deployment to retrieve |
Update Deployment
Update an existing deployment configuration.PUT /api/agent_deploy/update
Query Parameters:
Parameter | Required | Description |
---|---|---|
deployment_id | Yes | ID of the deployment to update |
Field | Type | Required | Description |
---|---|---|---|
name | string | No | New name for the deployment |
description | string | No | New description |
config | object | No | Updated configuration parameters |
Delete Deployment
Delete a deployment.DELETE /api/agent_deploy/delete
Query Parameters:
Parameter | Required | Description |
---|---|---|
deployment_id | Yes | ID of the deployment to delete |
Regenerate API Key
Regenerate the API key for a deployment.POST /api/agent_deploy/regenerate_key
Query Parameters:
Parameter | Required | Description |
---|---|---|
deployment_id | Yes | ID of the deployment for which to regenerate the API key |
Error Responses
Status Code | Description |
---|---|
400 | Bad Request - Invalid input or validation error |
401 | Unauthorized - Invalid or missing token |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Resource doesnβt exist |
409 | Conflict - Resource already exists or conflict with existing resource |
500 | Internal Server Error - Server-side error |
Implementation Notes
- Agents are configured with specific LLM models, tools, and parameters
- Agents can be deployed in multiple ways (widget, API, SDK)
- Each deployment has its own API key for authentication
- Deployments can be customized with different themes and configurations
- Usage statistics are available for each deployment
- Organization-based access control ensures separation between tenants