Agent
13 methods on the Agent resource.
13 methods · 0 available to app tokens36 pages in SDK Reference
import { Compozy } from "@compozy/client";13 of 13
claimNextAgentTaskcompleteAgentTaskRunfailAgentTaskRungetAgentContextgetAgentCoordinatorConfiggetAgentMegetAgentSoulheartbeatAgentTaskRunnotifyOperatorreleaseAgentTaskRunspawnAgentSessionstartAgentTaskRunvalidateAgentSoul
claimNextAgentTask
Atomically claim the next matching task run for the calling agent
compozy.agent.claimNextAgentTask({ headers, body }) → Promise<ClaimNextAgentTaskResponse>
Options
- X-Compozy-Session-IDstringheaderrequired
- Daemon-issued active session id
- X-Compozy-Agentstringheaderrequired
- Daemon-issued session agent name
Request bodyAgentTaskClaimNextRequest
POST /api/agent/tasks/claim-nextapp tokens denied
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.agent.claimNextAgentTask({ headers: { "X-Compozy-Session-ID": "X-Compozy-Session-ID", "X-Compozy-Agent": "X-Compozy-Agent" }, body: { /* request fields */ } });completeAgentTaskRun
Complete a claimed task run for the calling agent
compozy.agent.completeAgentTaskRun({ path, headers, body }) → Promise<AgentTaskLeaseResponse>
Options
- X-Compozy-Session-IDstringheaderrequired
- Daemon-issued active session id
- X-Compozy-Agentstringheaderrequired
- Daemon-issued session agent name
- run_idstringpathrequired
- Task run id
Request bodyAgentTaskCompleteRequest
POST /api/agent/tasks/{run_id}/completeapp tokens denied
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.agent.completeAgentTaskRun({ path: { "run_id": "run_id" }, headers: { "X-Compozy-Session-ID": "X-Compozy-Session-ID", "X-Compozy-Agent": "X-Compozy-Agent" }, body: { /* request fields */ } });failAgentTaskRun
Fail a claimed task run for the calling agent
compozy.agent.failAgentTaskRun({ path, headers, body }) → Promise<AgentTaskLeaseResponse>
Options
- X-Compozy-Session-IDstringheaderrequired
- Daemon-issued active session id
- X-Compozy-Agentstringheaderrequired
- Daemon-issued session agent name
- run_idstringpathrequired
- Task run id
Request bodyAgentTaskFailRequest
POST /api/agent/tasks/{run_id}/failapp tokens denied
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.agent.failAgentTaskRun({ path: { "run_id": "run_id" }, headers: { "X-Compozy-Session-ID": "X-Compozy-Session-ID", "X-Compozy-Agent": "X-Compozy-Agent" }, body: { /* request fields */ } });getAgentContext
Return the bounded calling-agent situation context
compozy.agent.getAgentContext({ headers }) → Promise<AgentContextResponse>
Options
- X-Compozy-Session-IDstringheaderrequired
- Daemon-issued active session id
- X-Compozy-Agentstringheaderrequired
- Daemon-issued session agent name
GET /api/agent/contextapp tokens denied
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.agent.getAgentContext({ headers: { "X-Compozy-Session-ID": "X-Compozy-Session-ID", "X-Compozy-Agent": "X-Compozy-Agent" } });getAgentCoordinatorConfig
Read resolved coordinator config for the calling agent workspace
compozy.agent.getAgentCoordinatorConfig({ query, headers }) → Promise<AgentCoordinatorConfigResponse>
Options
- X-Compozy-Session-IDstringheaderrequired
- Daemon-issued active session id
- X-Compozy-Agentstringheaderrequired
- Daemon-issued session agent name
- workspacestringquery
- Workspace id or path
GET /api/agent/coordinator/configapp tokens denied
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.agent.getAgentCoordinatorConfig({ headers: { "X-Compozy-Session-ID": "X-Compozy-Session-ID", "X-Compozy-Agent": "X-Compozy-Agent" } });getAgentMe
Resolve the calling agent session
compozy.agent.getAgentMe({ headers }) → Promise<AgentMeResponse>
Options
- X-Compozy-Session-IDstringheaderrequired
- Daemon-issued active session id
- X-Compozy-Agentstringheaderrequired
- Daemon-issued session agent name
GET /api/agent/meapp tokens denied
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.agent.getAgentMe({ headers: { "X-Compozy-Session-ID": "X-Compozy-Session-ID", "X-Compozy-Agent": "X-Compozy-Agent" } });getAgentSoul
Inspect the resolved Soul read model for the calling agent
compozy.agent.getAgentSoul({ headers }) → Promise<AgentSoulPayload>
Options
- X-Compozy-Session-IDstringheaderrequired
- Daemon-issued active session id
- X-Compozy-Agentstringheaderrequired
- Daemon-issued session agent name
GET /api/agent/soulapp tokens denied
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.agent.getAgentSoul({ headers: { "X-Compozy-Session-ID": "X-Compozy-Session-ID", "X-Compozy-Agent": "X-Compozy-Agent" } });heartbeatAgentTaskRun
Extend a claimed task-run lease for the calling agent
compozy.agent.heartbeatAgentTaskRun({ path, headers, body }) → Promise<AgentTaskLeaseResponse>
Options
- X-Compozy-Session-IDstringheaderrequired
- Daemon-issued active session id
- X-Compozy-Agentstringheaderrequired
- Daemon-issued session agent name
- run_idstringpathrequired
- Task run id
Request bodyAgentTaskHeartbeatRequest
POST /api/agent/tasks/{run_id}/heartbeatapp tokens denied
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.agent.heartbeatAgentTaskRun({ path: { "run_id": "run_id" }, headers: { "X-Compozy-Session-ID": "X-Compozy-Session-ID", "X-Compozy-Agent": "X-Compozy-Agent" }, body: { /* request fields */ } });notifyOperator
Notify live operator clients from the calling agent
compozy.agent.notifyOperator({ headers, body }) → Promise<AgentNotifyResponse>
Options
- X-Compozy-Session-IDstringheaderrequired
- Daemon-issued active session id
- X-Compozy-Agentstringheaderrequired
- Daemon-issued session agent name
Request bodyAgentNotifyRequest
POST /api/agent/notifyapp tokens denied
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.agent.notifyOperator({ headers: { "X-Compozy-Session-ID": "X-Compozy-Session-ID", "X-Compozy-Agent": "X-Compozy-Agent" }, body: { /* request fields */ } });releaseAgentTaskRun
Release a claimed task run for the calling agent
compozy.agent.releaseAgentTaskRun({ path, headers, body }) → Promise<AgentTaskLeaseResponse>
Options
- X-Compozy-Session-IDstringheaderrequired
- Daemon-issued active session id
- X-Compozy-Agentstringheaderrequired
- Daemon-issued session agent name
- run_idstringpathrequired
- Task run id
Request bodyAgentTaskReleaseRequest
POST /api/agent/tasks/{run_id}/releaseapp tokens denied
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.agent.releaseAgentTaskRun({ path: { "run_id": "run_id" }, headers: { "X-Compozy-Session-ID": "X-Compozy-Session-ID", "X-Compozy-Agent": "X-Compozy-Agent" }, body: { /* request fields */ } });Show all 13 methods
spawnAgentSession
Spawn a narrowed child session for the calling agent
compozy.agent.spawnAgentSession({ headers, body }) → Promise<AgentSpawnResponse>
Options
- X-Compozy-Session-IDstringheaderrequired
- Daemon-issued active session id
- X-Compozy-Agentstringheaderrequired
- Daemon-issued session agent name
Request bodyAgentSpawnRequest
POST /api/agent/spawnapp tokens denied
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.agent.spawnAgentSession({ headers: { "X-Compozy-Session-ID": "X-Compozy-Session-ID", "X-Compozy-Agent": "X-Compozy-Agent" }, body: { /* request fields */ } });startAgentTaskRun
Start a claimed task run under the calling agent's lease
compozy.agent.startAgentTaskRun({ path, headers, body }) → Promise<TaskRunResponse>
Options
- X-Compozy-Session-IDstringheaderrequired
- Daemon-issued active session id
- X-Compozy-Agentstringheaderrequired
- Daemon-issued session agent name
- run_idstringpathrequired
- Task run id
Request bodyStartTaskRunRequest
POST /api/agent/tasks/{run_id}/startapp tokens denied
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.agent.startAgentTaskRun({ path: { "run_id": "run_id" }, headers: { "X-Compozy-Session-ID": "X-Compozy-Session-ID", "X-Compozy-Agent": "X-Compozy-Agent" }, body: { /* request fields */ } });validateAgentSoul
Validate a proposed Soul body or the calling agent's current Soul
compozy.agent.validateAgentSoul({ headers, body }) → Promise<AgentSoulPayload>
Options
- X-Compozy-Session-IDstringheaderrequired
- Daemon-issued active session id
- X-Compozy-Agentstringheaderrequired
- Daemon-issued session agent name
Request bodyAgentSoulValidateRequest
POST /api/agent/soul/validateapp tokens denied
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.agent.validateAgentSoul({ headers: { "X-Compozy-Session-ID": "X-Compozy-Session-ID", "X-Compozy-Agent": "X-Compozy-Agent" }, body: { /* request fields */ } });