Agents API
API endpoints for managing AI Agents in the Kubiya platform
Agents API
The Agents API allows you to manage serverkess Agents in the Kubiya platform. These agents are serverless AI assistants that can be customized with specific tools, knowledge sources, and instructions to perform specialized tasks.
Base URL
All endpoints require authentication with a valid API key.
Endpoints
API v1
Method | Path | Description |
---|---|---|
GET | /api/v1/agents | List all agents |
GET | /api/v1/agents/{agentId} | Get specific agent |
POST | /api/v1/agents | Create agent |
PUT | /api/v1/agents/{agentId} | Update agent |
DELETE | /api/v1/agents/{agentId} | Delete agent |
GET | /api/v1/agents/{agentId}/integrations | Get agent integrations |
GET | /api/v1/agents/{agentId}/activate_integrations | Activate agent integrations |
API v2
Method | Path | Description |
---|---|---|
GET | /api/v2/agents | List all agents (with name filtering) |
GET | /api/v2/agents/{agentId} | Get specific agent |
Common Response Status Codes
Status Code | Description |
---|---|
200 | Success |
400 | Bad Request - Invalid parameters or request body |
401 | Unauthorized - Invalid or missing API key |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Resource doesn’t exist |
500 | Internal Server Error |
Error Response Format
Agent Object
List Agents (v1)
Retrieve all available agents in your organization.
Headers
UserKey YOUR_API_KEY
application/json
Example Requests
Response
List Agents (v2)
Retrieve all available agents in your organization with optional name filtering.
Query Parameters
Filter agents by name
Headers
UserKey YOUR_API_KEY
Example Requests
Response
Same format as v1 endpoint.
Get Agent Details (v1)
Retrieve details for a specific agent.
Path Parameters
ID of the agent
Headers
UserKey YOUR_API_KEY
Example Requests
Response
Get Agent Details (v2)
Path Parameters
ID of the agent
Headers
UserKey YOUR_API_KEY
Response
Create Agent
Create a new agent.
Headers
UserKey YOUR_API_KEY
application/json
Request Body
Name of the agent
Description of the agent’s capabilities
Array of tool IDs to assign to the agent
Array of source IDs to assign to the agent
Example Requests
Response
Update Agent
Update an existing agent.
Path Parameters
ID of the agent to update
Headers
UserKey YOUR_API_KEY
application/json
Request Body
Updated name for the agent
Updated description
Updated array of tool IDs
Example Requests
Response
Delete Agent
Delete an agent.
Path Parameters
ID of the agent to delete
Headers
UserKey YOUR_API_KEY
Example Requests
Response
A successful delete operation returns an HTTP 200 status with no response body.
Get Agent Integrations
Retrieve all integrations for a specific agent.
Path Parameters
ID of the agent
Headers
UserKey YOUR_API_KEY
Example Request
Response
Activate Agent Integrations
Activate integrations for a specific agent.
Path Parameters
ID of the agent
Headers
UserKey YOUR_API_KEY
Example Request
Response
Common Errors
Error Status Codes
HTTP Status | Description |
---|---|
400 | Bad Request - The request was invalid, often due to missing required fields |
401 | Unauthorized - API key is missing or invalid |
403 | Forbidden - The API key doesn’t have permission to perform this action |
404 | Not Found - The specified agent was not found |
409 | Conflict - An agent with the same name already exists |
500 | Internal Server Error - An unexpected error occurred on the server |