On this page

List agent templates

GET/templates

Operation listTemplatesAuthBearer token

Responses

StatusDescriptionBody
200TemplatesTemplateList
templatesrequiredarray<TemplateSummary>
13 fields of templates
idrequiredstring

File stem in the templates folder

namerequiredstring
descriptionstring
iconstring
filePathrequiredstring
shippedstring

One of standard, sandboxed, full-access

templateDescriptionstring
warningstring
reviewedrequiredboolean

false = from someone else and not accepted yet

modelProviderstring
modelIdstring
modifiedAtrequiredinteger
hasHistoryrequiredboolean
defaultIdrequiredstring
folderrequiredstring
defaultDirectoryrequiredstring

Where POST /agents/create puts agents without directory

migratedobject

Present once after the legacy settings snapshot became a template, until templatesMigrationSeen is set (Studio shows a one-time notice)

1 field of migrated
idrequiredstring
Errors 401 · 403 · 409 · 500 · 503
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
409No usable owner identity (identity_not_ready): set it up or unlock it first. identity carries its status.AgentCreateErrorResponse
errorrequiredstring
coderequiredstring

One of bad_request, identity_not_ready, name_taken, template_missing, template_unreviewed, template_invalid, password_required, wrong_password, load_failed, agent_leased

identityobject
10 fields of identity · IdentityStatus
statusrequiredstring

One of none, locked, restore-needed, ready

ownerDidrequiredstring | null
runtimeDidrequiredstring | null

The runtime DID the daemon signs and stamps with: ADF Studio's when runtime.state is adopted, else the daemon's own

trustobject

K12: whether the owner trusts this daemon's key (trustedDaemonEncKeys). not-applicable: the daemon reads the OS keychain and shares ADF Studio's runtime identity instead.

3 fields of trust · DaemonTrustStatus
staterequiredstring

One of trusted, not-trusted, not-applicable

labelrequiredstring | null

Slot label daemon:<fingerprint> of the daemon key; null without a key file.

messagerequiredstring
runtimeobject

Whose runtime identity the daemon uses. adopted: ADF Studio's, from a verified OS keychain entry for this settings file. absent: no such entry. rejected: an entry exists but failed verification (reason). unavailable: no usable OS keychain. In every state but adopted the daemon runs as its own runtime, and Studio-made agents' credentials unlock through the trusted-daemon key daemonEncPublicKey.

6 fields of runtime · DaemonRuntimeAdoption
staterequiredstring

One of adopted, absent, rejected, unavailable

sourcerequiredstring

One of studio, daemon

reasonrequiredstring | null

One of malformed, unsupported_version, no_owner, owner_mismatch, bad_signing_key, subject_mismatch, bad_delegation, runtime_did_mismatch, enc_key_mismatch, scope_mismatch, null

daemonRuntimeDidrequiredstring | null

The daemon's own runtime DID

daemonEncPublicKeyrequiredstring | null

Base64 raw X25519 public key of the daemon's runtime-enc-key (what Studio lists in trustedDaemonEncKeys)

messagerequiredstring

One sentence for the UI

storagerequiredstring

One of keychain, file

backupConfirmedrequiredboolean
passphraseRequiredrequiredboolean

File storage not unlocked: create/restore/unlock take a passphrase

keychainProblemstring | null

The daemon could not read this machine's OS keychain at start and runs on its passphrase file: why and what to do; null otherwise. Create, restore, import and trust-daemon answer 409 keychain_unavailable meanwhile (set ADF_SECRET_STORE=file to use the file on purpose).

messagerequiredstring

What to do next

500Unexpected runtime failure
503The subsystem is not configured on this daemon

Error bodies use the error format.

Example

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

Create a template (blank, or a duplicate of fromId)

POST/templates

Operation createTemplateAuthBearer token

A template is an ordinary .adf in <userData>/templates (Studio's Settings > Agent templates); its id is the file stem. New agents get everything in a template except its identity and history. A duplicate carries the notes, never the identity or history. Names: letters, digits, spaces, -, _, at most 64 characters.

Request bodyapplication/json · TemplateCreateBody · required

FieldTypeDescription
namerequiredstring
fromIdstring

Duplicate this template (no identity or history carried)

Responses

StatusDescriptionBody
201CreatedTemplateRef
idrequiredstring

The (possibly new) template id

templaterequiredTemplateSummary | null
13 fields of template
idrequiredstring

File stem in the templates folder

namerequiredstring
descriptionstring
iconstring
filePathrequiredstring
shippedstring

One of standard, sandboxed, full-access

templateDescriptionstring
warningstring
reviewedrequiredboolean

false = from someone else and not accepted yet

modelProviderstring
modelIdstring
modifiedAtrequiredinteger
hasHistoryrequiredboolean
Errors 400 · 401 · 403 · 404 · 409 · 500 · 503
400Invalid body or the template was refused (bad_request, template_invalid)AgentCreateErrorResponse
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 template (template_missing)AgentCreateErrorResponse
409No usable owner identity (identity_not_ready): set it up or unlock it first. identity carries its status.AgentCreateErrorResponse
500Unexpected runtime failure
503The subsystem is not configured on this daemon

Error bodies use the error format.

Example

Request
curl -X POST "http://127.0.0.1:7385/templates" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Researcher","fromId":"standard"}'

One template: summary, contents and whether it is the default

GET/templates/{id}

Operation getTemplateAuthBearer token

Path parameters

NameTypeDescription
idrequiredstring

Template id (the file stem in the templates folder)

example: standard

Responses

StatusDescriptionBody
200TemplateTemplateDetail
templaterequiredTemplateSummary | null
13 fields of template
idrequiredstring

File stem in the templates folder

namerequiredstring
descriptionstring
iconstring
filePathrequiredstring
shippedstring

One of standard, sandboxed, full-access

templateDescriptionstring
warningstring
reviewedrequiredboolean

false = from someone else and not accepted yet

modelProviderstring
modelIdstring
modifiedAtrequiredinteger
hasHistoryrequiredboolean
isDefaultrequiredboolean
defaultIdrequiredstring
contentsrequiredobject
3 fields of contents · TemplateContents
configrequiredobject

The agent's ADF v0.2 config (adf_config). Only the most used fields are listed; the full shape is the ADF spec's AgentConfig. Secret values never appear here.

25 fields of config · AgentConfig
adf_versionrequiredstring

Value 0.2

idrequiredstring

Agent id (stable, the daemon addresses the agent by it)

namerequiredstring
descriptionrequiredstring
handlestring
iconstring
staterequiredstring

Display (fleet-map) state of an agent

One of active, idle, hibernate, suspended, off

autonomousrequiredboolean
autostartboolean
modelrequiredobject
9 fields of model · ModelConfig
providerrequiredstring

Provider id (app provider or one of the agent's own providers)

model_idrequiredstring
temperaturenumber | null
max_tokensinteger | null
top_pnumber | null
reasoningobject

Provider-agnostic reasoning ("thinking") config

multimodalobject
3 fields of multimodal
imageboolean
audioboolean
videoboolean
paramsarray<object>
2 fields of params
keyrequiredstring
valuerequiredstring
provider_paramsobject
instructionsrequiredstring
contextrequiredobject

compact_threshold, max_request_media_files, max_request_media_mb, compaction_model, audit, dynamic_instructions

toolsrequiredarray<object>

Tool declarations

5 fields of tools
namerequiredstring
enabledrequiredboolean
visibleboolean
restrictedboolean
lockedboolean
triggersrequiredmap<string, TriggerConfig>

on_startup, on_inbox, on_outbox, on_file_change, on_chat, on_timer, on_tool_call, on_task_create, on_task_complete, on_logs, on_llm_call

3 fields of triggers
enabledrequiredboolean
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

lockedboolean
securityrequiredobject
limitsrequiredobject
messagingrequiredobject

mode (proactive | respond_only | listen_only), receive, network, …

mcpobject
2 fields of mcp
serversrequiredarray<McpServerConfig>
20 fields of servers
namerequiredstring
transportrequiredstring

One of stdio, http

commandstring
argsarray<string>
urlstring
oauthboolean
headersmap<string, string>
header_envarray<object>
bearer_token_env_varstring
envmap<string, string>
env_keysarray<string>
env_schemaarray<object>
npm_packagestring
pypi_packagestring
sourcestring
available_toolsarray<object>
tool_call_timeout_msinteger
restrictedboolean
run_locationstring

One of host, shared

credential_filesarray<object>
new_tools_restrictedboolean
adaptersmap<string, AdapterInstanceConfig>

Channel adapters by type

4 fields of adapters
enabledrequiredboolean
configobject

Adapter-specific settings (no secrets: tokens are credentials)

policyobject
limitsobject
1 field of limits
max_attachment_sizeinteger

Bytes

providersarray<AgentProviderConfig>
8 fields of providers
idrequiredstring

anthropic, openai, … or custom:<id>

typerequiredstring

One of anthropic, openai, openai-compatible, openrouter

namerequiredstring
baseUrlrequiredstring
presetstring
defaultModelstring
paramsarray<object>
2 fields of params
keyrequiredstring
valuerequiredstring
requestDelayMsinteger
loopsarray<LoopConfig>

Inner (side) loops; main is implicit

8 fields of loops
namerequiredstring

pattern: ^[a-z0-9][a-z0-9_-]{0,31}$

goalrequiredstring

Becomes the loop's instructions

enabledrequiredboolean
autostartboolean
autonomousboolean
modelobject

Fields as in ModelConfig above.

compact_thresholdinteger | null
toolsarray<string>

Absolute allow-list, intersected with the host's enabled tools

ws_connectionsarray<object>
servingobject
locked_fieldsarray<string>
metadatarequiredobject

created_at, updated_at, author, tags, version

filesrequiredobject
3 fields of files
readmerequiredstring
mindrequiredstring
soulrequiredstring
extrarequiredarray<object>
3 fields of extra
pathrequiredstring
sizerequiredinteger
mimerequiredstring
Errors 400 · 401 · 403 · 404 · 409 · 500 · 503
400Invalid body or the template was refused (bad_request, template_invalid)AgentCreateErrorResponse
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 template (template_missing)AgentCreateErrorResponse
409No usable owner identity (identity_not_ready): set it up or unlock it first. identity carries its status.AgentCreateErrorResponse
500Unexpected runtime failure
503The subsystem is not configured on this daemon

Error bodies use the error format.

Example

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

Rename a template and/or set its notes

PATCH/templates/{id}

Operation updateTemplateAuthBearer token

Notes are shown wherever the template is offered and never copied into agents ("" clears one; at most 500 characters). A rename moves the file (defaultId follows): the response carries the new id.

Path parameters

NameTypeDescription
idrequiredstring

Template id (the file stem in the templates folder)

example: standard

Request bodyapplication/json · TemplatePatchBody · required

FieldTypeDescription
namestring

Rename (moves the file; the response carries the new id)

descriptionstring

Empty string clears

warningstring

Empty string clears

Responses

StatusDescriptionBody
200UpdatedTemplateRef

Fields as in TemplateRef above.

Errors 400 · 401 · 403 · 404 · 409 · 500 · 503
400Invalid body or the template was refused (bad_request, template_invalid)AgentCreateErrorResponse
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 template (template_missing)AgentCreateErrorResponse
409No usable owner identity (identity_not_ready): set it up or unlock it first. identity carries its status.AgentCreateErrorResponse
500Unexpected runtime failure
503The subsystem is not configured on this daemon

Error bodies use the error format.

Example

Request
curl -X PATCH "http://127.0.0.1:7385/templates/standard" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"description":"For research agents"}'

Delete a template (moved to templates-trash)

DELETE/templates/{id}

Operation deleteTemplateAuthBearer token

Never a hard delete; the default falls back to standard.

Path parameters

NameTypeDescription
idrequiredstring

Template id (the file stem in the templates folder)

example: standard

Responses

StatusDescriptionBody
200DeletedTemplateDeleteResponse
deletedrequiredboolean

Value true

idrequiredstring
trashFolderrequiredstring
defaultIdrequiredstring
Errors 400 · 401 · 403 · 404 · 409 · 500 · 503
400Invalid body or the template was refused (bad_request, template_invalid)AgentCreateErrorResponse
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 template (template_missing)AgentCreateErrorResponse
409No usable owner identity (identity_not_ready): set it up or unlock it first. identity carries its status.AgentCreateErrorResponse
500Unexpected runtime failure
503The subsystem is not configured on this daemon

Error bodies use the error format.

Example

Request
curl -X DELETE "http://127.0.0.1:7385/templates/standard" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN"

Make this the default template

POST/templates/{id}/default

Operation setDefaultTemplateAuthBearer token

No body.

Path parameters

NameTypeDescription
idrequiredstring

Template id (the file stem in the templates folder)

example: standard

Responses

StatusDescriptionBody
200Default setTemplateDefaultResponse
defaultIdrequiredstring
Errors 400 · 401 · 403 · 404 · 409 · 500 · 503
400Invalid body or the template was refused (bad_request, template_invalid)AgentCreateErrorResponse
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 template (template_missing)AgentCreateErrorResponse
409No usable owner identity (identity_not_ready): set it up or unlock it first. identity carries its status.AgentCreateErrorResponse
500Unexpected runtime failure
503The subsystem is not configured on this daemon

Error bodies use the error format.

Example

Request
curl -X POST "http://127.0.0.1:7385/templates/standard/default" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN"

Reset a shipped template to the shipped version

POST/templates/{id}/reset

Operation resetShippedTemplateAuthBearer token

For a shipped template (standard, sandboxed, full-access, even renamed); 400 for a user template. No body.

Path parameters

NameTypeDescription
idrequiredstring

Template id (the file stem in the templates folder)

example: standard

Responses

StatusDescriptionBody
200ResetTemplateRef

Fields as in TemplateRef above.

Errors 400 · 401 · 403 · 404 · 409 · 500 · 503
400Invalid body or the template was refused (bad_request, template_invalid)AgentCreateErrorResponse
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 template (template_missing)AgentCreateErrorResponse
409No usable owner identity (identity_not_ready): set it up or unlock it first. identity carries its status.AgentCreateErrorResponse
500Unexpected runtime failure
503The subsystem is not configured on this daemon

Error bodies use the error format.

Example

Request
curl -X POST "http://127.0.0.1:7385/templates/standard/reset" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN"

The review summary of a template

GET/templates/{id}/review

Operation getTemplateReviewAuthBearer token

Studio's TEMPLATE_CHECK_REVIEW. While the owner identity is not ready: needsReview false, identityReady false, no summary.

Path parameters

NameTypeDescription
idrequiredstring

Template id (the file stem in the templates folder)

example: standard

Responses

StatusDescriptionBody
200ReviewTemplateReview
idrequiredstring
needsReviewrequiredboolean
reviewedrequiredboolean
summaryobject

What the agent can do, as the review dialog shows it (Studio's AgentConfigSummary).

13 fields of summary · ReviewSummary
namerequiredstring
descriptionrequiredstring
iconstring
identityrequiredobject

agentDid, fileOwnerDid, ownerIsYou, scenario (mine | recognized | foreign | unclaimed), needsClaim, …

computeTierrequiredstring

One of shared, isolated, host

autostartrequiredboolean
toolsrequiredarray<object>
3 fields of tools
namerequiredstring
enabledrequiredboolean
notablerequiredboolean
mcpServersrequiredarray<object>
triggersrequiredarray<object>
3 fields of triggers
typerequiredstring
enabledrequiredboolean
targetCountrequiredinteger
codeExecutionrequiredboolean
messagingrequiredobject
1 field of messaging
moderequiredstring
networkrequiredobject
securityrequiredobject
identityReadyboolean

Present (false) when the owner identity is not ready: no summary, needsReview false (Studio parity)

One of false

messagestring
Errors 400 · 401 · 403 · 404 · 500 · 503
400Invalid body or the template was refused (bad_request, template_invalid)AgentCreateErrorResponse
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 template (template_missing)AgentCreateErrorResponse
500Unexpected runtime failure
503The subsystem is not configured on this daemon

Error bodies use the error format.

Example

Request
curl "http://127.0.0.1:7385/templates/standard/review" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN"

Accept a template: claim it under this owner and mark it reviewed

POST/templates/{id}/review/accept

Operation acceptTemplateReviewAuthBearer token

Claims the file with a fresh identity under this owner, auto-locks compute (and ws / adapters / table protections when set), marks it reviewed. password for a password-protected file (400 password_required, 403 wrong_password); 409 identity_not_ready when the owner keys are unavailable.

Path parameters

NameTypeDescription
idrequiredstring

Template id (the file stem in the templates folder)

example: standard

Request bodyapplication/json · TemplateReviewAcceptBody · optional

FieldTypeDescription
passwordstring

For a password-protected template file

Responses

StatusDescriptionBody
200AcceptedTemplateReviewAcceptResponse
idrequiredstring
reviewedrequiredboolean

Value true

templaterequiredTemplateSummary | null
13 fields of template
idrequiredstring

File stem in the templates folder

namerequiredstring
descriptionstring
iconstring
filePathrequiredstring
shippedstring

One of standard, sandboxed, full-access

templateDescriptionstring
warningstring
reviewedrequiredboolean

false = from someone else and not accepted yet

modelProviderstring
modelIdstring
modifiedAtrequiredinteger
hasHistoryrequiredboolean
Errors 400 · 401 · 403 · 404 · 409 · 500 · 503
400Invalid body or the template was refused (bad_request, template_invalid)AgentCreateErrorResponse
401Missing or wrong bearer token (unauthorized)
403Wrong password (wrong_password), or the request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)AgentCreateErrorResponse
404Unknown template (template_missing)AgentCreateErrorResponse
409No usable owner identity (identity_not_ready): set it up or unlock it first. identity carries its status.AgentCreateErrorResponse
500Unexpected runtime failure
503The subsystem is not configured on this daemon

Error bodies use the error format.

Example

Request
curl -X POST "http://127.0.0.1:7385/templates/standard/review/accept" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Replace a template's agent config

PUT/templates/{id}/config

Operation setTemplateConfigAuthBearer token

Validated with the config schema; the first issue is the 400 error.

Path parameters

NameTypeDescription
idrequiredstring

Template id (the file stem in the templates folder)

example: standard

Request bodyapplication/json · TemplateConfigBody · required

FieldTypeDescription
configrequiredobject

The agent's ADF v0.2 config (adf_config). Only the most used fields are listed; the full shape is the ADF spec's AgentConfig. Secret values never appear here.

Fields as in AgentConfig above.

Responses

StatusDescriptionBody
200SavedTemplateConfigResponse
idrequiredstring
successrequiredboolean

Value true

Errors 400 · 401 · 403 · 404 · 409 · 500 · 503
400Invalid body or the template was refused (bad_request, template_invalid)AgentCreateErrorResponse
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 template (template_missing)AgentCreateErrorResponse
409No usable owner identity (identity_not_ready): set it up or unlock it first. identity carries its status.AgentCreateErrorResponse
500Unexpected runtime failure
503The subsystem is not configured on this daemon

Error bodies use the error format.

Example

Request
curl -X PUT "http://127.0.0.1:7385/templates/standard/config" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "config": {
    "adf_version": "0.2",
    "id": "string",
    "name": "string",
    "description": "string",
    "state": "active",
    "autonomous": true,
    "model": {
      "provider": "anthropic",
      "model_id": "claude-sonnet-4-5"
    },
    "instructions": "string",
    "context": {},
    "tools": [],
    "triggers": {},
    "security": {},
    "limits": {},
    "messaging": {},
    "metadata": {}
  }
}'

Plan the names of a batch of template files

POST/templates/{id}/files/plan

Operation planTemplateFilesAuthBearer token

Studio's TEMPLATE_ADD_FILES is whole batch or nothing: the client sends every picked file ({name, isFile, size}, or {name, statError} for one it could not read) and gets the path each would get (base name, numbered past a taken one), or the first refusal (not a file, over 25 MiB, a reserved seed name the template lacks), before it uploads any of them with PUT /templates/{id}/files/raw. Writes nothing.

Path parameters

NameTypeDescription
idrequiredstring

Template id (the file stem in the templates folder)

example: standard

Request bodyapplication/json · object · required

FieldTypeDescription
filesrequiredarray<object>
4 fields of files
namerequiredstring
isFileboolean
sizeinteger
statErrorstring

Responses

StatusDescriptionBody
200The plan, or the refusalobject
successrequiredboolean
destsarray<string>
errorstring
Errors 400 · 404
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
404Unknown agent (or the named resource: loop, task, file, …)

Error bodies use the error format.

Example

Request
curl -X POST "http://127.0.0.1:7385/templates/standard/files/plan" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"files":[]}'

Add an extra file to a template as raw bytes

PUT/templates/{id}/files/raw

Operation putTemplateFileRawAuthBearer token

The body is one file's content (application/octet-stream, any type, up to 25 MiB). It is stored under name's base name, numbered past a name the template already uses (report-2.pdf), as Studio's own file picker does; the answer names the path chosen. 413 too_large, 415 for another content type.

Path parameters

NameTypeDescription
idrequiredstring

Template id (the file stem in the templates folder)

example: standard

Query parameters

NameTypeDescription
namerequiredstring

The file's name; only its base name is used.

Request bodyapplication/octet-stream · string · required

No fields.

Responses

StatusDescriptionBody
200Writtenobject
idrequiredstring
pathrequiredstring

The path the file got in the template

sizerequiredinteger
successrequiredboolean

One of true

Errors 400 · 401 · 403 · 404 · 409 · 413 · 415 · 500 · 503
400No name, or the file was refused (bad_request, template_invalid)AgentCreateErrorResponse
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 template (template_missing)AgentCreateErrorResponse
409No usable owner identity (identity_not_ready): set it up or unlock it first. identity carries its status.AgentCreateErrorResponse
413Larger than 25 MiB (too_large)
415Not application/octet-stream
500Unexpected runtime failure
503The subsystem is not configured on this daemon

Error bodies use the error format.

Example

Request
curl -X PUT "http://127.0.0.1:7385/templates/standard/files/raw?name=NAME" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN" \
  -H "Content-Type: application/octet-stream" \
  -d '"string"'

Write a template file (seed or extra)

PUT/templates/{id}/files

Operation setTemplateFileAuthBearer token

Path parameters

NameTypeDescription
idrequiredstring

Template id (the file stem in the templates folder)

example: standard

Request bodyapplication/json · TemplateFileBody · required

FieldTypeDescription
pathrequiredstring

README.md, mind.md, soul.md or an extra file path

contentrequiredstring

Responses

StatusDescriptionBody
200WrittenTemplateFileResponse
idrequiredstring
pathrequiredstring
successrequiredboolean

Value true

Errors 400 · 401 · 403 · 404 · 409 · 500 · 503
400Invalid body or the template was refused (bad_request, template_invalid)AgentCreateErrorResponse
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 template (template_missing)AgentCreateErrorResponse
409No usable owner identity (identity_not_ready): set it up or unlock it first. identity carries its status.AgentCreateErrorResponse
500Unexpected runtime failure
503The subsystem is not configured on this daemon

Error bodies use the error format.

Example

Request
curl -X PUT "http://127.0.0.1:7385/templates/standard/files" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"path":"mind.md","content":"# Mind\n"}'

Remove an extra file

DELETE/templates/{id}/files

Operation removeTemplateFileAuthBearer token

Seed files cannot be removed; clear their text instead.

Path parameters

NameTypeDescription
idrequiredstring

Template id (the file stem in the templates folder)

example: standard

Query parameters

NameTypeDescription
pathrequiredstring

Extra file path

Responses

StatusDescriptionBody
200RemovedTemplateFileResponse
idrequiredstring
pathrequiredstring
successrequiredboolean

Value true

Errors 400 · 401 · 403 · 404 · 409 · 500 · 503
400Invalid body or the template was refused (bad_request, template_invalid)AgentCreateErrorResponse
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 template (template_missing)AgentCreateErrorResponse
409No usable owner identity (identity_not_ready): set it up or unlock it first. identity carries its status.AgentCreateErrorResponse
500Unexpected runtime failure
503The subsystem is not configured on this daemon

Error bodies use the error format.

Example

Request
curl -X DELETE "http://127.0.0.1:7385/templates/standard/files?path=PATH" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN"