Komputer.AI
Integration

REST API

HTTP endpoints to create, list, inspect, cancel, and delete agents and connectors.

Create an Agent / Send a Task

POST /api/v1/agents
Content-Type: application/json
{
  "name": "my-agent",
  "instructions": "Analyze the latest sales data and produce a summary report",
  "model": "claude-sonnet-4-6",
  "namespace": "production"
}
FieldRequiredDescription
nameyesAgent identifier (lowercase, hyphens, max 63 chars)
instructionsyesThe task prompt for Claude
systemPromptnoCustom system prompt prepended before the built-in role prompt
modelnoClaude model (default: claude-sonnet-4-6)
templateRefnoPod template to use (default: default)
rolenomanager (can orchestrate sub-agents) or worker (default: manager)
connectorsnoList of KomputerConnector names to attach
namespacenoTarget Kubernetes namespace

Behavior:

  • If the agent doesn't exist, it is created and starts working immediately
  • If the agent exists and is idle, the new task is assigned to it
  • If the agent exists and is busy, returns 409 Conflict

Response (201 Created):

{
  "name": "my-agent",
  "namespace": "production",
  "model": "claude-sonnet-4-6",
  "status": "Pending",
  "createdAt": "2026-03-27T10:00:00Z"
}

List Agents

GET /api/v1/agents?namespace=production

Response:

{
  "agents": [
    {
      "name": "my-agent",
      "namespace": "production",
      "model": "claude-sonnet-4-6",
      "status": "Running",
      "taskStatus": "InProgress",
      "lastTaskMessage": "Calling Bash: python analyze.py",
      "createdAt": "2026-03-27T10:00:00Z"
    }
  ]
}

Get Agent Details

GET /api/v1/agents/:name?namespace=production

Returns the same AgentResponse object as the list endpoint, for a single agent.

Get Agent Events (History)

GET /api/v1/agents/:name/events?limit=10&namespace=production

Returns the most recent events from the agent's Redis stream. limit defaults to 50, max 200.

Response:

{
  "agent": "my-agent",
  "events": [
    {"agentName": "my-agent", "type": "task_started", "timestamp": "...", "payload": {"instructions": "..."}},
    {"agentName": "my-agent", "type": "text", "timestamp": "...", "payload": {"content": "Here is the report..."}},
    {"agentName": "my-agent", "type": "task_completed", "timestamp": "...", "payload": {"result": "...", "cost_usd": 0.12, "duration_ms": 45000, "turns": 3, "stop_reason": "end_turn", "session_id": "sess_01abc..."}}
  ]
}

Cancel a Task

POST /api/v1/agents/:name/cancel?namespace=production

Gracefully cancels the running task. The agent pod stays alive for future tasks.

Delete an Agent

DELETE /api/v1/agents/:name?namespace=production

Deletes the agent CR, which triggers the operator to clean up the pod, PVC, Secrets and ConfigMap.

Connectors

List Connectors

GET /api/v1/connectors?namespace=default

Response:

{
  "connectors": [
    {
      "name": "github",
      "namespace": "default",
      "service": "github",
      "displayName": "GitHub",
      "url": "https://api.githubcopilot.com/mcp/",
      "attachedAgents": 2,
      "agentNames": ["dev-agent", "review-agent"],
      "createdAt": "2026-04-01T10:00:00Z"
    }
  ]
}

Create a Connector

POST /api/v1/connectors
Content-Type: application/json
{
  "name": "github",
  "service": "github",
  "displayName": "GitHub",
  "url": "https://api.githubcopilot.com/mcp/",
  "authSecretName": "github-credentials",
  "authSecretKey": "token",
  "namespace": "default"
}

Get a Connector

GET /api/v1/connectors/:name?namespace=default

Delete a Connector

DELETE /api/v1/connectors/:name?namespace=default

Attach/Remove Connectors from a Running Agent

Connectors can be changed on a running agent without restarting the pod. The change takes effect on the next task:

# Attach connectors
curl -X PATCH http://localhost:8080/api/v1/agents/my-agent \
  -H "Content-Type: application/json" \
  -d '{"connectors": ["github", "linear"]}'

# Remove all connectors
curl -X PATCH http://localhost:8080/api/v1/agents/my-agent \
  -H "Content-Type: application/json" \
  -d '{"connectors": []}'

On this page