On this page

Daemon runtime overview

GET/runtime

Operation getRuntimeAuthBearer token

Process, settings, providers, auth, MCP, adapters, network, compute and every loaded agent in one read, secrets sanitized. daemon.version is ADF_VERSION, else the npm package version, else null.

Responses

StatusDescriptionBody
200OverviewRuntimeOverview
daemonrequiredobject
5 fields of daemon
uptimerequirednumber

Seconds

pidrequiredinteger
versionrequiredstring | null
noderequiredstring
platformrequiredstring
settingsrequiredobject
7 fields of settings · RuntimeSettingsDiagnostics
configuredrequiredboolean
filePathrequiredstring | null
trackedDirectoriesrequiredarray<string>
maxDirectoryScanDepthrequiredinteger | null
autoCompactThresholdrequiredinteger | null
promptOverridesrequiredobject
3 fields of promptOverrides
globalSystemPromptrequiredboolean
compactionPromptrequiredboolean
toolPromptsrequiredinteger
packageCountsrequiredobject
4 fields of packageCounts
sandboxPackagesrequiredinteger
mcpServersrequiredinteger
adaptersrequiredinteger
providersrequiredinteger
providersrequiredobject
2 fields of providers · ProviderDiagnostics
providersrequiredarray<ProviderDiagnosticsEntry>
11 fields of providers
idrequiredstring
typerequiredstring
namerequiredstring
baseUrlrequiredstring
defaultModelstring
presetstring
credentialStoragerequiredstring

app or agent

apiKeyStoragestring
hasApiKeyrequiredboolean
requestDelayMsrequiredinteger
paramsrequiredarray<object>
2 fields of params
keyrequiredstring
hasValuerequiredboolean
agentUsagerequiredarray<object>
7 fields of agentUsage
agentIdrequiredstring
handlestring
namerequiredstring
providerIdrequiredstring
modelIdrequiredstring
sourcerequiredstring

One of agent, app, missing

credentialStoragerequiredstring | null
authrequiredobject
4 fields of auth · AuthDiagnostics
chatgptrequiredobject
5 fields of chatgpt · SubscriptionAuthStatus
authenticatedrequiredboolean
emailstring
expiresAtinteger

Epoch ms

flowPendingboolean
flowErrorstring
grokrequiredobject
5 fields of grok · SubscriptionAuthStatus
authenticatedrequiredboolean
emailstring
expiresAtinteger

Epoch ms

flowPendingboolean
flowErrorstring
clauderequiredobject

Claude sign-in as reported by the Claude Code CLI on the daemon host.

11 fields of claude · ClaudeAuthStatus
authenticatedrequiredboolean
installedrequiredboolean

False when Claude Code is not installed

installUrlstring

Where to install Claude Code (only when not installed)

versionstring

Installed Claude Code version

minVersionstring

Oldest Claude Code version this runtime supports

updateRequiredboolean

True when the installed Claude Code is older than minVersion; sign-in is unavailable until it is updated

emailstring
planstring

Claude plan, e.g. pro, max, team

flowPendingboolean
flowUrlstring

Sign-in URL of the running flow

flowErrorstring

Why Claude is unusable, or why the last sign-in failed. Also set while authenticated when a re-sign-in failed; the account shown is then the one signed in before it. Cleared when a new sign-in starts.

providersrequiredarray<object>
5 fields of providers
idrequiredstring
typerequiredstring
namerequiredstring
credentialStoragerequiredstring
hasApiKeyrequiredboolean
mcprequiredobject
1 field of mcp · McpRegistrationsDiagnostics
serversrequiredarray<object>
16 fields of servers
idrequiredstring
namerequiredstring
typerequiredstring
npmPackagestring
pypiPackagestring
commandstring
argsarray<string>
urlstring
managedrequiredboolean
versionstring
credentialStoragerequiredstring
envrequiredarray<object>
2 fields of env
keyrequiredstring
hasValuerequiredboolean
headersrequiredarray<object>
2 fields of headers
keyrequiredstring
hasValuerequiredboolean
headerEnvrequiredarray<object>
2 fields of headerEnv
headerrequiredstring
envrequiredstring
bearerTokenEnvVarrequiredstring | null
toolCallTimeoutrequiredinteger | null
adaptersrequiredobject
1 field of adapters · AdapterRegistrationsDiagnostics
adaptersrequiredarray<object>
5 fields of adapters
idrequiredstring
typerequiredstring
npmPackagestring
managedrequiredboolean
versionstring
networkrequiredobject
4 fields of network · NetworkDiagnostics
hostrequiredobject
2 fields of host · LanAddressInfo
hostnamerequiredstring
addressesrequiredarray<object>
4 fields of addresses
ifacerequiredstring
addressrequiredstring
familyrequiredstring

One of IPv4, IPv6

macrequiredstring
meshrequiredobject
4 fields of mesh
enabledSettingrequiredboolean
lanrequiredboolean
portrequiredinteger
statusrequiredMeshStatus | null
5 fields of status
meshEnabledrequiredboolean
meshServerRunningrequiredboolean
meshServerrequiredobject
5 fields of meshServer · MeshServerStatus
runningrequiredboolean
portrequiredinteger
hostrequiredstring
lanAddressesarray<string>

Non-loopback addresses listening now. LAN mode (host 0.0.0.0: the Network switch, or an agent with lan or public visibility) listens on private-network and Tailscale addresses of allowed networks only (remote-access.md §3.3, §3.3.1), never on a public address. MESH_HOST set: [MESH_HOST] unless it is loopback.

warningstring

Present while an agent with public visibility has no allowed network to listen on (it is reachable from this computer only, e.g. on a headless server with only a public address). It names MESH_HOST, which binds an address of the operator's choice.

agentsrequiredarray<MeshAgentStatus>
8 fields of agents
filePathrequiredstring
handlerequiredstring
didstring
agentIdstring
iconstring
staterequiredstring

Display (fleet-map) state of an agent

One of active, idle, hibernate, suspended, off

statusstring
modelstring
debugrequiredobject

Mesh manager internals (unstable)

websocketrequiredobject
3 fields of websocket
activeConnectionsrequiredinteger
inboundConnectionsrequiredinteger
outboundConnectionsrequiredinteger
agentsrequiredarray<object>
10 fields of agents
agentIdrequiredstring
handlestring
namerequiredstring
filePathrequiredstring | null
receiverequiredboolean
sendModerequiredstring | null
networkrequiredstring | null
wsConnectionsConfiguredrequiredinteger
servingRoutesrequiredinteger
publicServingEnabledrequiredboolean
computerequiredComputeStatus | null
5 fields of compute
statusrequiredstring

One of not_installed, machine_stopped, stopped, starting, running, error

containerNamerequiredstring
activeAgentsrequiredarray<string>
errorstring
leftRunningarray<object>

Containers this runtime's last stop (POST /compute/stop, shutdown) left running because another runtime on the machine uses them. Present only when non-empty. Cleared when this runtime starts a container (shared or per-agent) and by a stop that finds nothing running.

3 fields of leftRunning
namerequiredstring
holdersrequiredarray<string>

Runtimes using it, e.g. "studio-embedded pid 4242". Empty when the owner is unknown.

reasonrequiredstring
agentsrequiredarray<object>
5 fields of agents
idrequiredstring
handlestring
namerequiredstring
filePathrequiredstring | null
statusobject
13 fields of status · AgentStatus
idrequiredstring
filePathrequiredstring | null
namerequiredstring
handlestring
autostartrequiredboolean
runtimeStaterequiredstring

Executor state: idle, thinking, tool_use, awaiting_approval, awaiting_ask, suspended, error, stopped: or a display state (active, hibernate, off)

targetStaterequiredstring | null
loopCountrequiredinteger

Persisted entries in main's loop stream

degradedstring

Set when the agent loaded but cannot fully function (CREDENTIALS_LOCKED: its credentials envelope is locked); cleared once the owner identity unlocks it

runningboolean

GET /agents/{id}/status: false for an open document that is not running (runtimeState stopped).

sessionIdstring

GET /agents/{id}/status of a running agent: its runtime session id (Studio's AGENT_START answers it).

loopStatesmap<string, string>

GET /agents/{id}/status of a running agent: each inner loop's display state (active, idle, suspended, error, off), keyed by loop name. Main is not in it (runtimeState is main's). A loop that accepted a dispatch but has not started thinking reads active.

mediamap<string, object>

GET /agents/{id}/status of a running agent: each loop's effective media (main and live inner loops, keyed by loop name): what its provider connector carries, narrowed by the agent's model.multimodal toggles. POST /agents/{id}/chat refuses the rest with 400 media_unsupported.

2 fields of media
supportobject
3 fields of support
imageboolean
audioboolean
videoboolean
refusalsmap<string, string>

Why each modality not in support is refused, keyed image, audio or video.

Errors 401 · 403
401Missing or wrong bearer token (unauthorized)
403The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin

Error bodies use the error format.

Example

Request
curl "http://127.0.0.1:7385/runtime" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN"

Legacy per-agent health summary

GET/diagnostics

Operation getDiagnosticsAuthBearer token

Responses

StatusDescriptionBody
200DiagnosticsDiagnosticsResponse
daemonrequiredobject
2 fields of daemon
uptimerequirednumber
pidrequiredinteger
agentsrequiredarray<object>
9 fields of agents
idrequiredstring
filePathrequiredstring | null
namerequiredstring
handlestring
autostartrequiredboolean
statusobject

Fields as in AgentStatus above.

adaptersrequiredarray<object>
3 fields of adapters
typerequiredstring
statusrequiredstring
errorstring
mcprequiredarray<object>
4 fields of mcp
namerequiredstring
statusrequiredstring
errorstring
toolCountrequiredinteger
wsrequiredobject
2 fields of ws
configuredrequiredinteger
activerequiredinteger
Errors 401 · 403
401Missing or wrong bearer token (unauthorized)
403The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin

Error bodies use the error format.

Example

Request
curl "http://127.0.0.1:7385/diagnostics" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN"

Sanitized settings summary

GET/runtime/settings

Operation getRuntimeSettingsAuthBearer token

Responses

StatusDescriptionBody
200Settings summaryRuntimeSettingsDiagnostics

Fields as in RuntimeSettingsDiagnostics above.

Errors 401 · 403
401Missing or wrong bearer token (unauthorized)
403The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin

Error bodies use the error format.

Example

Request
curl "http://127.0.0.1:7385/runtime/settings" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN"

Token usage totals by provider and model

GET/runtime/usage

Operation getRuntimeUsageAuthBearer token

Responses

StatusDescriptionBody
200Usage (not attributed per agent)RuntimeUsageResponse
sourcerequiredstring

Value token-usage-service

noterequiredstring
totalsrequiredobject
3 fields of totals
inputrequiredinteger
outputrequiredinteger
totalrequiredinteger
byProviderrequiredarray<object>
4 fields of byProvider
providerrequiredstring
inputrequiredinteger
outputrequiredinteger
totalrequiredinteger
byModelrequiredarray<object>
6 fields of byModel
providerrequiredstring
modelrequiredstring
daysrequiredinteger

Days with usage

inputrequiredinteger
outputrequiredinteger
totalrequiredinteger
usagerequiredmap<string, map<string, map<string, object>>>

date → provider → model → { input, output }

2 fields of usage
inputrequiredinteger
outputrequiredinteger
Errors 401 · 403
401Missing or wrong bearer token (unauthorized)
403The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin

Error bodies use the error format.

Example

Request
curl "http://127.0.0.1:7385/runtime/usage" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN"

Clear token usage

DELETE/runtime/usage

Operation clearRuntimeUsageAuthBearer token

Responses

StatusDescriptionBody
200OKSuccessResponse
successrequiredboolean
Errors 401 · 403
401Missing or wrong bearer token (unauthorized)
403The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin

Error bodies use the error format.

Example

Request
curl -X DELETE "http://127.0.0.1:7385/runtime/usage" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN"
Response 200
{
  "success": true
}

Count tokens in one string

POST/runtime/token-count

Operation countRuntimeTokensAuthBearer token

With neither provider nor model, agentId picks the loaded agent's model; default provider anthropic.

Request bodyapplication/json · TokenCountBody · required

FieldTypeDescription
textrequiredstring
providerstring
modelstring
agentIdstring

Use this agent's provider/model

Responses

StatusDescriptionBody
200CountTokenCountResponse
countrequiredinteger
providerrequiredstring
modelrequiredstring
Errors 400 · 401 · 403
400Invalid request: missing or malformed field, query parameter or body. A body Fastify cannot parse gets Fastify's own shape (statusCode, code, error, message).bad_requestFST_ERR_CTP_EMPTY_JSON_BODY
401Missing or wrong bearer token (unauthorized)
403The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin

Error bodies use the error format.

Example

Request
curl -X POST "http://127.0.0.1:7385/runtime/token-count" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"text":"Hello, world","provider":"anthropic"}'
Response 200
{
  "count": 4,
  "provider": "anthropic",
  "model": ""
}

Count tokens in several strings

POST/runtime/token-count/batch

Operation countRuntimeTokensBatchAuthBearer token

Request bodyapplication/json · TokenCountBatchBody · required

FieldTypeDescription
textsrequiredarray<string>
providerstring
modelstring
agentIdstring

Responses

StatusDescriptionBody
200Counts, in input orderTokenCountBatchResponse
countsrequiredarray<integer>
providerrequiredstring
modelrequiredstring
Errors 400 · 401 · 403
400Invalid request: missing or malformed field, query parameter or body. A body Fastify cannot parse gets Fastify's own shape (statusCode, code, error, message).bad_requestFST_ERR_CTP_EMPTY_JSON_BODY
401Missing or wrong bearer token (unauthorized)
403The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin

Error bodies use the error format.

Example

Request
curl -X POST "http://127.0.0.1:7385/runtime/token-count/batch" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"texts":["one","two words"]}'

One agent's runtime diagnostics

GET/agents/{id}/runtime

Operation getAgentRuntimeAuthBearer token

Status, adapters, MCP, triggers and WebSocket connections in one read.

Path parameters

NameTypeDescription
idrequiredstring

Loaded agent: its id, handle or name.

example: agent-1

Responses

StatusDescriptionBody
200DiagnosticsAgentRuntimeDiagnostics
agentIdrequiredstring

Agent id

statusobject

Fields as in AgentStatus above.

adaptersrequiredobject
3 fields of adapters · AgentAdaptersDiagnostics
agentIdrequiredstring

Agent id

configuredrequiredarray<object>
3 fields of configured
typerequiredstring
enabledrequiredboolean
configrequiredobject
statesrequiredarray<AdapterState>
6 fields of states
typerequiredstring
statusrequiredstring

One of connected, connecting, disconnected, error

errorstring
connectedAtinteger
restartCountrequiredinteger
logsrequiredarray<object>
3 fields of logs
timestamprequiredinteger
levelrequiredstring

One of info, warn, error, system

messagerequiredstring
mcprequiredobject
3 fields of mcp · AgentMcpDiagnostics
agentIdrequiredstring

Agent id

configuredrequiredarray<object>
5 fields of configured
namerequiredstring
transportstring
commandstring
argsarray<string>
toolCountrequiredinteger
statesrequiredarray<McpServerState>
7 fields of states
namerequiredstring
statusrequiredstring

One of stopped, connecting, connected, error, installing, needs_sign_in

errorstring
connectedAtinteger
restartCountrequiredinteger
toolCountrequiredinteger
logsrequiredarray<object>
3 fields of logs
timestamprequiredinteger
streamrequiredstring

One of stdout, stderr, system

messagerequiredstring
triggersrequiredobject
3 fields of triggers · AgentTriggersDiagnostics
agentIdrequiredstring

Agent id

displayStaterequiredstring | null
configuredrequiredarray<object>
4 fields of configured
typerequiredstring
enabledrequiredboolean
targetCountrequiredinteger
targetsrequiredarray<TriggerTarget>
11 fields of targets
scoperequiredstring

One of agent, system

lambdastring

System scope: path/file.ts:functionName

commandstring

System scope: shell command (alternative to lambda)

warmboolean
filterobject
debounce_msinteger
interval_msinteger
batch_msinteger
batch_countinteger
lockedboolean
loopstring

Cognition loop this target wakes; absent = main

wsrequiredobject
2 fields of ws
configuredrequiredarray<object>
activerequiredarray<WsConnectionInfo>
5 fields of active
connection_idrequiredstring
remote_didrequiredstring
directionrequiredstring

One of inbound, outbound

connected_atrequiredinteger
last_message_atrequiredinteger
Errors 401 · 403 · 404
401Missing or wrong bearer token (unauthorized)
403The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin
404Unknown agent (or the named resource: loop, task, file, …)

Error bodies use the error format.

Example

Request
curl "http://127.0.0.1:7385/agents/agent-1/runtime" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN"

One agent's trigger configuration

GET/agents/{id}/runtime/triggers

Operation getAgentRuntimeTriggersAuthBearer token

Path parameters

NameTypeDescription
idrequiredstring

Loaded agent: its id, handle or name.

example: agent-1

Responses

StatusDescriptionBody
200TriggersAgentTriggersDiagnostics

Fields as in AgentTriggersDiagnostics above.

Errors 401 · 403 · 404
401Missing or wrong bearer token (unauthorized)
403The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin
404Unknown agent (or the named resource: loop, task, file, …)

Error bodies use the error format.

Example

Request
curl "http://127.0.0.1:7385/agents/agent-1/runtime/triggers" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN"

One agent's trigger configuration (same as …/runtime/triggers)

GET/agents/{id}/triggers

Operation getAgentTriggersAuthBearer token

Path parameters

NameTypeDescription
idrequiredstring

Loaded agent: its id, handle or name.

example: agent-1

Responses

StatusDescriptionBody
200TriggersAgentTriggersDiagnostics

Fields as in AgentTriggersDiagnostics above.

Errors 401 · 403 · 404
401Missing or wrong bearer token (unauthorized)
403The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin
404Unknown agent (or the named resource: loop, task, file, …)

Error bodies use the error format.

Example

Request
curl "http://127.0.0.1:7385/agents/agent-1/triggers" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN"

One agent's WebSocket connections

GET/agents/{id}/runtime/ws

Operation getAgentRuntimeWsAuthBearer token

Path parameters

NameTypeDescription
idrequiredstring

Loaded agent: its id, handle or name.

example: agent-1

Responses

StatusDescriptionBody
200ConnectionsAgentWsDiagnostics
agentIdrequiredstring

Agent id

configuredrequiredarray<object>

config.ws_connections

activerequiredarray<WsConnectionInfo>
5 fields of active
connection_idrequiredstring
remote_didrequiredstring
directionrequiredstring

One of inbound, outbound

connected_atrequiredinteger
last_message_atrequiredinteger
recentLogsrequiredarray<LogEntry>

Last 50 websocket-origin log rows

8 fields of recentLogs
idrequiredinteger
levelrequiredstring

One of debug, info, warn, error

originrequiredstring | null
eventrequiredstring | null
targetrequiredstring | null
messagerequiredstring
datarequiredstring | null

JSON text

created_atrequiredinteger

Epoch ms

Errors 401 · 403 · 404
401Missing or wrong bearer token (unauthorized)
403The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin
404Unknown agent (or the named resource: loop, task, file, …)

Error bodies use the error format.

Example

Request
curl "http://127.0.0.1:7385/agents/agent-1/runtime/ws" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN"

One agent's WebSocket connections (same as …/runtime/ws)

GET/agents/{id}/ws

Operation getAgentWsAuthBearer token

Path parameters

NameTypeDescription
idrequiredstring

Loaded agent: its id, handle or name.

example: agent-1

Responses

StatusDescriptionBody
200ConnectionsAgentWsDiagnostics

Fields as in AgentWsDiagnostics above.

Errors 401 · 403 · 404
401Missing or wrong bearer token (unauthorized)
403The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin
404Unknown agent (or the named resource: loop, task, file, …)

Error bodies use the error format.

Example

Request
curl "http://127.0.0.1:7385/agents/agent-1/ws" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN"

Emergency stop

POST/runtime/emergency-stop

Operation emergencyStopAuthBearer token

Closes the runtime gate (resumable: the next deliberate start reopens it), disables the mesh without persisting it, unloads every agent at once, stops WS connections, the mesh server, tracked child processes, host execs and sandbox workers, then the compute containers. Files stay reopenable. Any part left running or failed makes the answer success: false naming it.

Responses

StatusDescriptionBody
200OKEmergencyStopResult
successrequiredboolean

False when any part was not wired on this daemon or failed to stop

errorstring
skippedarray<string>

Parts this daemon cannot stop (left running)

failedarray<string>

Parts whose stop threw

Errors 401 · 403
401Missing or wrong bearer token (unauthorized)
403The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin

Error bodies use the error format.

Example

Request
curl -X POST "http://127.0.0.1:7385/runtime/emergency-stop" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN"
Response 200
{
  "success": false,
  "error": "Emergency stop was partial — not wired on this daemon, left running: mesh server.",
  "skipped": [
    "mesh server"
  ]
}

Tool schema catalog

GET/runtime/tools/descriptions

Operation getToolDescriptionsAuthBearer token

Every built-in tool in provider format, plus stub declarations of the runtime tools that need per-agent dependencies and the code-execution method schemas.

Responses

StatusDescriptionBody
200OKToolDescriptions · map<string, object>
Errors 401 · 403
401Missing or wrong bearer token (unauthorized)
403The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin

Error bodies use the error format.

Example

Request
curl "http://127.0.0.1:7385/runtime/tools/descriptions" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN"