Skip to main content
The Agents Service provides comprehensive management of AI agents through the Kubiya platform, including lifecycle management, access control, environment configuration, and tool integration. Agents are configurable AI services that plan and execute tasks. Each agent runs a selected LLM model, a set of Skills (and optional MCP servers), and the configuration it inherits from attached Environments. Agents execute deterministic step-by-step plans, using Skills for system operations and MCP integrations for external APIs.

Agents: Detailed guide

This page focuses on the agent-specific parts of the SDK: creation, configuration, access control, environment variables, tool integration, and common patterns. If you haven’t set up a ControlPlaneClient yet, see the Client Quick Start at Client Overview for initialization and authentication instructions. Below are practical, in-depth examples and patterns for working with agents. The first example demonstrates creating a DevOps-focused agent and verifying the returned configuration.

Create an agent (devops-assistant example)

The following example demonstrates creating a minimal agent using the Control Plane SDK, then verifying it by fetching its details:
Example output from a run of this flow (sanitized and factual from a real execution):
The fields shown are exactly those returned by the client.agents.create and client.agents.get calls. Typical fields include uuid, name, llm_model, tools, integrations, and other configuration metadata. You can verify the same on the platform dashboard under Agents. SDK Agent Created

Core Operations

The typical lifecycle flow is: Create → List → Update → Execute → Delete.

Create

Create a new DevOps-focused agent with minimal required fields:
Required fields (minimal):
  • name: Unique agent name
  • model_id: Provider-specific model identifier
Common optional fields:
  • description: Short, clear purpose
  • skill_ids: List of skills that the agent can use

List

Retrieve a list of agents (supports pagination). Use this to confirm creation and discover IDs:

Get Agent Details

Fetch a single agent’s details. Resolve the agent ID by name, then call get():
Tip:
  • If you already have the agent_id (e.g., stored after creation), prefer calling client.agents.get(agent_id) directly.
  • Use list-by-name only when you don’t have the ID available at hand.

Update

Update an agent’s configuration. Pass only the fields you wish to change. Example: attach Skills and Integrations by ID.

Execute

Start an agent execution. Provide the required fields and an execution prompt, then call execute(agent_id, execution_data):
Required fields:
  • agent_id: UUID/ID of the target agent
  • worker_queue_id: ID of the worker queue handling execution
  • prompt: Instruction describing the task to perform

Delete

Permanently remove an agent by UUID when no longer needed:
Notes:
  • Returns a JSON object with deletion status when provided by the API.
  • Some deployments may return HTTP 200 with an empty body; treat that as success.
  • agent_id: UUID of the agent to execute

Best Practices

  • Use descriptive unique agent names
  • Provide clear AI instructions
  • Use environment variables for configuration
  • Handle errors with try/except