Developers

Wrap the tools you already have.

AgentOS is designed to fit around an existing agent, not replace it. Describe the agent, put a decorator on each tool, and open an execution. Your loop, framework, model provider and credentials stay where they are.

ConceptualThe SDK and API are in development. Examples describe the proposed integration model; nothing here is a live endpoint or an installable package.

How it fits into an existing application.

Two modes share one execution record. Pick per agent, not per company.

Inline and queued execution modes
ModeWho runs the loopUse it for
InlineYour service process, inside agent.execution(...)Request/response features; first adoption. Approvals block that process.
QueuedA runner you host, leasing tasks from AgentOSBackground work, long approvals, retries, timeouts and runner-loss recovery.

Conceptual quickstart.

The intended first-agent workflow, from workspace to first trace. These steps will become real when the developer preview opens.

  1. 1

    Create a workspace

    development, staging and production environments are created with it.

  2. 2

    Create an API key

    Scoped to one environment and shown once. Runners get their own runner-scoped key.

  3. 3

    Describe the agent and wrap its tools

    Declare each tool's side effect. Reads are allowed by default; writes require approval; destructive tools are denied.

  4. 4

    Run it and open the trace

    The first run registers version 1 and deploys it to development automatically.

Register an agent by running it.

The manifest is built from what you declare in code. Change the model, a tool or a limit and the next run creates a new version.

Conceptual
# Conceptual: the Corelia SDK is in development
import corelia

agent = corelia.agent(
    name="incident-triage",
    model={"provider": "provider-a", "name": "large-2025", "temperature": 0.2},
    limits={"max_steps": 20, "max_duration_s": 900, "max_est_cost_usd": 0.50},
)

@agent.tool(side_effect="read", idempotent=True, timeout_s=10)
def logs_search(service: str, query: str, minutes: int = 30):
    return my_logs_client.search(service, query, minutes)   # your code, your credentials

@agent.tool(side_effect="write", idempotent=False, timeout_s=60)
def deploys_rollback(service: str, to_version: str):
    return my_deploy_client.rollback(service, to_version)

Create executions with an idempotency key.

Send the same key twice and you get the same execution back, never a duplicate. The active version for the environment is pinned at creation.

  • JSON over HTTPS, prefixed IDs (exe_, apr_, ver_)
  • Bearer API keys scoped to an environment
  • Cursor pagination on every list
  • Rate-limit headers and 429 with Retry-After
Conceptual
POST /v1/executions
Authorization: Bearer ck_test_••••
Idempotency-Key: 3f1c2a9e-checkout-5xx-1030
Content-Type: application/json

{
  "agent": "incident-triage",
  "environment": "production",
  "mode": "queued",
  "input": { "service": "checkout-api", "symptom": "elevated 5xx" },
  "tenant_ref": "internal"
}

# 201 Created
{
  "id": "exe_01JBX7H2KQ9M",
  "status": "queued",
  "version": 14,
  "policy_version": "ops-agent-production@4"
}

Read events by sequence number.

Events are ordered per attempt. Poll with after_seq to follow a running execution; missing sequence numbers are reported, not hidden.

get-events.httpConceptual
GET /v1/executions/exe_01JBX7H2KQ9M/events?after_seq=7
Authorization: Bearer ck_test_••••

{
  "events": [
    { "seq": 8, "type": "tool.authorize", "tool": "deploys.rollback",
      "decision": "require_approval", "rule": "rollback-needs-approval",
      "approval_id": "apr_01JBX7J0P3K1", "at": "2026-10-14T09:41:13.510Z" },
    { "seq": 9, "type": "approval.decided", "decision": "approved",
      "decided_by": "usr_01H…", "wait_ms": 134000 }
  ],
  "next_seq": 10
}

Typed errors, and retries only where they are safe.

The SDK re-raises your tool exceptions after recording them. It never swallows an error, and it never retries a write you haven't declared idempotent.

SDK exceptions and retry guidance
ExceptionRaised whenRetry?
PolicyDeniedPolicy returned deny, or the tool was not declaredNever. Change the policy or the agent.
ApprovalRejectedAn approver rejected the callNever automatically. Handle it in agent code.
ApprovalExpiredNo decision before expiryOnly by a new execution.
LimitExceededSteps, tool calls, duration or estimated cost limit reachedNever. Raise the limit in a new version.
ExecutionCancelledSomeone cancelled the executionNo.
ToolTimeout / ToolErrorYour tool raised or exceeded its timeoutAutomatically only if the tool is idempotent.
error.jsonConceptual
{
  "type": "https://coreliaworks.com/docs/#errors",
  "title": "Idempotency key reused with a different body",
  "status": 409,
  "code": "idempotency_key_reused",
  "detail": "Key 3f1c2a9e-checkout-5xx-1030 was first used with a different request body.",
  "request_id": "req_01JBX7…"
}

API errors follow RFC 9457 problem details, with a stable code and a request ID.

SDK and API status.

Status of developer interfaces
InterfaceStatusNotes
Python SDKIn developmentPython 3.10+, sync and asyncio. Not yet published.
REST API v1ConceptualShapes on this page may change before preview.
WebhooksPlannedHMAC-signed, at-least-once.
TypeScript SDKPlannedAfter the Python SDK.
Framework adaptersPlannedOrder decided with early users.

Read the concepts before the code.

Agents, versions, tools, policies, executions and events: six ideas the whole product is built on.