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
3 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
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
3 fields of meshServer · MeshServerStatus
runningrequiredboolean
portrequiredinteger
hostrequiredstring
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
4 fields of compute
statusrequiredstring

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

containerNamerequiredstring
activeAgentsrequiredarray<string>
errorstring
agentsrequiredarray<object>
5 fields of agents
idrequiredstring
handlestring
namerequiredstring
filePathrequiredstring | null
statusobject
9 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

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"

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

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"