OpenLegion · Docsllms.txt
Docs pages

Changelog

What changed in the Platform API, the SDK (@openlegion/platform) and the CLI (openlegion), newest first.

The first dated version is 2026-12-01. After it, a breaking change makes a new dated version, and old versions keep working for at least 12 months. Before it, names changed without an alias: the renames are at the end of this page.

No entries yet: the list starts with the first dated version.

Pre-GA renames

One vocabulary before the 2026-12-01 freeze. No new version and no aliases: nothing outside OpenLegion calls the API yet.

Routes and methods

WasNow
PUT /workspaces/{id}/limitsPOST /workspaces/{id}/limits (updates are POST, so they take an Idempotency-Key)
PUT /billing/auto_reloadPOST /billing/auto_reload
GET /billing_accountGET /billing/account
GET /balance/transactionsGET /balance_transactions
/workspaces/{id}/exports/{exp}/workspaces/{id}/exports/{export_id}
DELETE /agents/{id}/memory/{mem}DELETE /agents/{id}/memory/{memory_item_id}
POST /dev_sessions/{id}/requests/{request}/responsePOST /dev_sessions/{id}/requests/{request_id}/response

Fields

ObjectWasNow
runstarted, endedstarted_at, ended_at
runstatus: "succeeded"status: "completed" (as run.completed says it)
runtrigger ∈ message, schedule, inbound_event, resume, api (anything else read api)adds handoff (another agent's hand-off), follow_up (the agent's own follow-up) and other; api is only POST /agents/{id}/runs
billing preview linefirst_run.trigger ∈ schedule, events, chat, manual, child, plate, other; first_run.plate[] {probe, task}the run's own trigger words; first_run.follow_up[] {task}
billing preview lineruns_by_trigger keyed by the old wordskeyed by the run's trigger words
billing previewas_ofcomputed_at
billing preview objectsbill_preview, bill_preview_linebilling_preview, billing_preview_line
billing accountorganisationsorganization_count
statement eventorganisation, account_organisationsorganization, account_organization_count
auto-reloadlast_reload.updatedlast_reload.updated_at
connectorprevious_secret_expires (rotate)previous_secret_expires_at
connectorrotate body expires_in_hours (0–72, default 24)expires_in_seconds (0–259 200, default 86 400), as a webhook endpoint's
connector toolstatestatus
connector call—id and refusal_code described (no rename)
webhook endpointprevious_secret_expires, last_success, last_failureprevious_secret_expires_at, last_success_at, last_failure_at
dev sessionlast_seenlast_seen_at
exportbytes, url_expires, expiressize_bytes, url_expires_at, expires_at
erased workspaceerasederased_at
vault item, taskupdatedupdated_at
taskstate (and GET /tasks?state=)status (and ?status=)
artifactreview_statereview_status
actionintent_hashaction_hash (also in POST /approvals/{id}/decide)
actionpolicy.decision ∈ allow, hold, denyallowed, held, denied
action receipt{result_summary, external_ref, cost_micro, completed}{result_summary, reference, cost_micro, completed_at}: reference is the effect's own reference (external_ref is always your customer)
inbound eventwokeremoved: run (null when none) and reason already say it
agentstatus: "hibernated"active (an idle agent is active)
agentpaused.reason: "owner""manual"
agenttemplate: {slug, version}template (the workspace's, slug or slug@N) and template_version
template versiontpl_…tplv_… (a template's own id is its slug)
template specschedules[].instructionschedules[].instructions (a version stored before reads the new name)
template speccustomizable.schedules.min_interval_minutes (15–10 080)min_interval_seconds (900–604 800), as every other duration; a version stored before reads it × 60

Event types and event objects

WasNow
agent.noteagent.attention_needed
usage.thresholdusage.threshold_reached
usage_alert.cap_creditscredit_cap
credit_balance (available_credits, low_balance_credits, needed_credits, drawn_credits, owed_credits, credit_limit_credits, credit_remaining_credits)balance (available, low_balance, needed, drawn, owed, credit_limit, credit_remaining)
topup_reversal.reversed_credits, shortfall_creditsamount, shortfall
auto_reload.amount_credits, retry_after (a time)amount, retry_at
topup.amount_creditsamount
billing_account.organisationsorganization_count
export.ready's bytes, expiressize_bytes, expires_at

The money events' objects are now typed in the OpenAPI document (UsageAlert, BalanceNotice, TopupNotice, TopupReversal, AutoReloadNotice, BillingAccountNotice) and in the SDK's EventObjects.

Errors

WasNow
type: "not_found"not_found_error
type: "conflict"conflict_error
refusal/intent_hash_mismatchrefusal/action_changed
409 vault_item_limit (a conflict)409 vault_item_limit_reached, a refusal with an end-user message
403 role_insufficient403 insufficient_role

Headers

No rename. Request-Id, RateLimit-*, Retry-After, Idempotent-Replayed and OpenLegion-Run are now documented once in the OpenAPI document and named on every response that carries them.

SDK (@openlegion/platform)

WasNow
.get(…) on 15 resources.retrieve(…)
workspaces.limits.put, billing.autoReload.put.update (a POST: retried on a 5xx with its key)
ol.billingAccount.get()ol.billing.account.retrieve()
ol.balance.transactions.list()ol.balanceTransactions.list()
defineAgent, Agent, AgentDefinitiondefineTemplate, Template, TemplateDefinition
createHandler({ agent })createHandler({ template })
kit route POST {basePath}/agent, object: "agent_definition"POST {basePath}/template, object: "template_definition"
agentDefinition(), AgentDefinitionObject (root exports)no longer exported; TemplateDefinitionObject is the wire type
the kit's own 404 code not_foundresource_missing, as the API's

CLI (openlegion)

  • ol init writes openlegion/template.ts (was openlegion/agent.ts), exporting template.
  • ol dev and ol templates push read the app's POST {basePath}/template; --file takes a template_definition. The error app_has_no_agent is app_has_no_template.