Agents Service API
API reference for managing AI agents and agent deployments
The Agents Service provides endpoints for creating, configuring, and deploying AI agents within your organization. It enables you to define agent behaviors, tools, and deployment configurations.
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.
Endpoint: POST /api/agents
Query Parameters:
Parameter | Required | Description |
---|---|---|
org_id | Yes | Organization ID |
Request Body:
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) |
Agent Parameters:
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.
Endpoint: GET /api/agents/list
Query Parameters:
Parameter | Required | Description |
---|---|---|
org_id | Yes | Organization ID |
Get Agent Details
Retrieve detailed information about a specific agent.
Endpoint: 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.
Endpoint: PUT /api/agents/update
Query Parameters:
Parameter | Required | Description |
---|---|---|
agent_id | Yes | ID of the agent to update |
Request Body:
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.
Endpoint: 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.
Endpoint: POST /api/agent_deploy/create
Query Parameters:
Parameter | Required | Description |
---|---|---|
org_id | Yes | Organization ID |
Request Body:
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.
Endpoint: 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.
Endpoint: 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.
Endpoint: PUT /api/agent_deploy/update
Query Parameters:
Parameter | Required | Description |
---|---|---|
deployment_id | Yes | ID of the deployment to update |
Request Body:
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.
Endpoint: 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.
Endpoint: 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
Was this page helpful?