AgentSettings ensureForSpec
Returns the user's own agent for a registry spec (template), creating it on first use.
path Parameters
specIdstring · required
Responses
Successful response
idstring · requirednamestring · requiredownerIdstring · requirededgesMcpConfigsobject · requiredcreatedAtnumber · requiredupdatedAtnumber · required
systemMessagestringCustom system prompt for the agent
modelstringLLM model identifier (e.g., 'claude-3-opus')
refusalFallbackModelstringModel to continue the turn with when
modelrefuses a request on safety grounds (stop_reason refusal / content_filter). Opt-in: agent ⋮ → "More settings…" ortfa-cli agent update <agent> refusalFallbackModel=…. Every switch is announced by a toast + the run meta records the model that actually answered; unset = the refusal is shown as an error.refusalRetryEverynumberWhile on the refusal fallback, give the refused
modelone call after every N fallback calls: it answering ends the fallback, it refusing again stays on it. Each probe re-sends the conversation uncached. Unset/0 = never. Experimental, CLI/API only.modelFamilystringFollow this model family (MODEL_FAMILIES key): at each run start
modelis moved to the family's current version. Unset =modelis pinned.keepProviderbooleanRun-only (never stored):
modelis an explicit per-chat pick, so it runs on exactly itsprovider:— the team's "EU by default" does not re-point it to the EU sibling. Hard rules (eu_only / zdrOnly) still apply.thinkingLeveltemperaturenumbersystemMessageMode'default_coder' uses built-in coding prompt, 'custom_w_tools' uses systemMessage + auto-injected capability sections, 'raw' uses systemMessage verbatim (no global prepend, no tool/routing/workspace sections).
smartSystemPromptbooleanAuto-enhance system prompt based on context
memoryEnabledbooleanPut the project's memory files (
projects/<id>/memory/, plusme/memory/in private todos) in the system prompt. Default on.searchOffstring[]Search sources switched off for this agent (Knowledge → Searchable):
chats(tfa-memory),cloud(TODOforAI files, tfa-files),gdrive,onedrive,find:<machineId>:<folder>(a tfa-find folder). Unset/empty = everything on.knowledgeOffstring[]Knowledge switched off for this agent, by uri: memory files (kept out of the prompt), context entries (not listed),
todoforai:projects/<id>/context= all Documents,…/context/brandand…/context/voice. Unset/empty = all on.autoCompactionbooleanAutomatic context compaction (summarize older messages near the limit). Default on; false = only manual compaction + overflow recovery. Set in the agent's "More settings…".
contextLimitnumberContext limit in tokens that compaction is measured against. Unset/0 = auto (model window, capped at 200K).
contextDocumentsobject[]Reference files (PDF, images, text/office docs) pinned to every conversation of this agent: sent natively as the first user message (PDF/image as document/image blocks), prompt-cached. Metadata only — the agent fetches bytes by attachment id.
devicesConfigobjectpermissionsobjecttoolProfilesobjectConstruct a type with a set of properties K of type T
promptOverridesobjectConstruct a type with a set of properties K of type T
judgeSysmsgstringApproval policy in plain language (e.g. "Block sending email", "Block files outside the workspace", "Block only dangerous commands"). When set, a tool call that would ASK is judged by a fast LLM against it and the call's workspace paths: ALLOW runs, ASK prompts the user. Unset = inherit the global policy; '' = no judge for this agent (every ASK prompts the user); set = replaces the global policy.
specIdstringSpec this agent was created from
colorstringHex color (e.g. '#10b981') used to tint todos assigned to this agent
iconstringIcon key from the frontend's agent icon set (unset = robot).
AgentSettings ensureForWorkspace
Returns the user's agent for these workspace folder(s), creating it (named after the folder, wired to the given deviceId or legacy edgeId) only if none exists. Idempotent: safe to call on every launch.
Request Body
workspacePathsstring[] · minItems: 1 · maxItems: 20 · required
deviceIdstringedgeIdstringnamestring · maxLength: 200Defaults to the first folder's name.
Responses
Successful response
agentobject · requiredAI AgentSettings configuration including model, system prompt, and MCP tools.
createdboolean · required
AgentSettings list
Returns AI agent configurations. Optionally filter by workspacePath or name (returns enriched results).
Responses
Successful response
idstring · requirednamestring · requiredownerIdstring · requirededgesMcpConfigsobject · requiredcreatedAtnumber · requiredupdatedAtnumber · required
systemMessagestringCustom system prompt for the agent
modelstringLLM model identifier (e.g., 'claude-3-opus')
refusalFallbackModelstringModel to continue the turn with when
modelrefuses a request on safety grounds (stop_reason refusal / content_filter). Opt-in: agent ⋮ → "More settings…" ortfa-cli agent update <agent> refusalFallbackModel=…. Every switch is announced by a toast + the run meta records the model that actually answered; unset = the refusal is shown as an error.refusalRetryEverynumberWhile on the refusal fallback, give the refused
modelone call after every N fallback calls: it answering ends the fallback, it refusing again stays on it. Each probe re-sends the conversation uncached. Unset/0 = never. Experimental, CLI/API only.modelFamilystringFollow this model family (MODEL_FAMILIES key): at each run start
modelis moved to the family's current version. Unset =modelis pinned.keepProviderbooleanRun-only (never stored):
modelis an explicit per-chat pick, so it runs on exactly itsprovider:— the team's "EU by default" does not re-point it to the EU sibling. Hard rules (eu_only / zdrOnly) still apply.thinkingLeveltemperaturenumbersystemMessageMode'default_coder' uses built-in coding prompt, 'custom_w_tools' uses systemMessage + auto-injected capability sections, 'raw' uses systemMessage verbatim (no global prepend, no tool/routing/workspace sections).
smartSystemPromptbooleanAuto-enhance system prompt based on context
memoryEnabledbooleanPut the project's memory files (
projects/<id>/memory/, plusme/memory/in private todos) in the system prompt. Default on.searchOffstring[]Search sources switched off for this agent (Knowledge → Searchable):
chats(tfa-memory),cloud(TODOforAI files, tfa-files),gdrive,onedrive,find:<machineId>:<folder>(a tfa-find folder). Unset/empty = everything on.knowledgeOffstring[]Knowledge switched off for this agent, by uri: memory files (kept out of the prompt), context entries (not listed),
todoforai:projects/<id>/context= all Documents,…/context/brandand…/context/voice. Unset/empty = all on.autoCompactionbooleanAutomatic context compaction (summarize older messages near the limit). Default on; false = only manual compaction + overflow recovery. Set in the agent's "More settings…".
contextLimitnumberContext limit in tokens that compaction is measured against. Unset/0 = auto (model window, capped at 200K).
contextDocumentsobject[]Reference files (PDF, images, text/office docs) pinned to every conversation of this agent: sent natively as the first user message (PDF/image as document/image blocks), prompt-cached. Metadata only — the agent fetches bytes by attachment id.
devicesConfigobjectpermissionsobjecttoolProfilesobjectConstruct a type with a set of properties K of type T
promptOverridesobjectConstruct a type with a set of properties K of type T
judgeSysmsgstringApproval policy in plain language (e.g. "Block sending email", "Block files outside the workspace", "Block only dangerous commands"). When set, a tool call that would ASK is judged by a fast LLM against it and the call's workspace paths: ALLOW runs, ASK prompts the user. Unset = inherit the global policy; '' = no judge for this agent (every ASK prompts the user); set = replaces the global policy.
specIdstringSpec this agent was created from
colorstringHex color (e.g. '#10b981') used to tint todos assigned to this agent
iconstringIcon key from the frontend's agent icon set (unset = robot).
AgentSettings create
Creates a new AI agent configuration with default settings.
Responses
Successful response
idstring · requirednamestring · requiredownerIdstring · requirededgesMcpConfigsobject · requiredcreatedAtnumber · requiredupdatedAtnumber · required
systemMessagestringCustom system prompt for the agent
modelstringLLM model identifier (e.g., 'claude-3-opus')
refusalFallbackModelstringModel to continue the turn with when
modelrefuses a request on safety grounds (stop_reason refusal / content_filter). Opt-in: agent ⋮ → "More settings…" ortfa-cli agent update <agent> refusalFallbackModel=…. Every switch is announced by a toast + the run meta records the model that actually answered; unset = the refusal is shown as an error.refusalRetryEverynumberWhile on the refusal fallback, give the refused
modelone call after every N fallback calls: it answering ends the fallback, it refusing again stays on it. Each probe re-sends the conversation uncached. Unset/0 = never. Experimental, CLI/API only.modelFamilystringFollow this model family (MODEL_FAMILIES key): at each run start
modelis moved to the family's current version. Unset =modelis pinned.keepProviderbooleanRun-only (never stored):
modelis an explicit per-chat pick, so it runs on exactly itsprovider:— the team's "EU by default" does not re-point it to the EU sibling. Hard rules (eu_only / zdrOnly) still apply.thinkingLeveltemperaturenumbersystemMessageMode'default_coder' uses built-in coding prompt, 'custom_w_tools' uses systemMessage + auto-injected capability sections, 'raw' uses systemMessage verbatim (no global prepend, no tool/routing/workspace sections).
smartSystemPromptbooleanAuto-enhance system prompt based on context
memoryEnabledbooleanPut the project's memory files (
projects/<id>/memory/, plusme/memory/in private todos) in the system prompt. Default on.searchOffstring[]Search sources switched off for this agent (Knowledge → Searchable):
chats(tfa-memory),cloud(TODOforAI files, tfa-files),gdrive,onedrive,find:<machineId>:<folder>(a tfa-find folder). Unset/empty = everything on.knowledgeOffstring[]Knowledge switched off for this agent, by uri: memory files (kept out of the prompt), context entries (not listed),
todoforai:projects/<id>/context= all Documents,…/context/brandand…/context/voice. Unset/empty = all on.autoCompactionbooleanAutomatic context compaction (summarize older messages near the limit). Default on; false = only manual compaction + overflow recovery. Set in the agent's "More settings…".
contextLimitnumberContext limit in tokens that compaction is measured against. Unset/0 = auto (model window, capped at 200K).
contextDocumentsobject[]Reference files (PDF, images, text/office docs) pinned to every conversation of this agent: sent natively as the first user message (PDF/image as document/image blocks), prompt-cached. Metadata only — the agent fetches bytes by attachment id.
devicesConfigobjectpermissionsobjecttoolProfilesobjectConstruct a type with a set of properties K of type T
promptOverridesobjectConstruct a type with a set of properties K of type T
judgeSysmsgstringApproval policy in plain language (e.g. "Block sending email", "Block files outside the workspace", "Block only dangerous commands"). When set, a tool call that would ASK is judged by a fast LLM against it and the call's workspace paths: ALLOW runs, ASK prompts the user. Unset = inherit the global policy; '' = no judge for this agent (every ASK prompts the user); set = replaces the global policy.
specIdstringSpec this agent was created from
colorstringHex color (e.g. '#10b981') used to tint todos assigned to this agent
iconstringIcon key from the frontend's agent icon set (unset = robot).
AgentSettings getGlobal
Returns global agent settings defaults for the user.
Responses
Successful response
systemMessageBase prompt prepended to every agent. Unset/null → default prompt; '' → none.
modelstringthinkingLeveltemperaturenumberpermissionsobjectjudgeSysmsgstringDefault approval policy; used by every agent that has no
judgeSysmsgof its own.memoryEnabledbooleanDefault for agents without their own
memoryEnabled; unset = on.edgesMcpConfigsobjectdevicesConfigobject
AgentSettings updateGlobal
Updates global agent settings defaults for the user.
Request Body
systemMessageBase prompt prepended to every agent. Unset/null → default prompt; '' → none.
modelstringthinkingLeveltemperaturenumberpermissionsobjectjudgeSysmsgstringDefault approval policy; used by every agent that has no
judgeSysmsgof its own.memoryEnabledbooleanDefault for agents without their own
memoryEnabled; unset = on.edgesMcpConfigsobjectdevicesConfigobject
Responses
Successful response
systemMessageBase prompt prepended to every agent. Unset/null → default prompt; '' → none.
modelstringthinkingLeveltemperaturenumberpermissionsobjectjudgeSysmsgstringDefault approval policy; used by every agent that has no
judgeSysmsgof its own.memoryEnabledbooleanDefault for agents without their own
memoryEnabled; unset = on.edgesMcpConfigsobjectdevicesConfigobject
AgentSettings get
Returns a specific AI agent configuration.
path Parameters
agentSettingsIdstring · required
Responses
Successful response
idstring · requirednamestring · requiredownerIdstring · requirededgesMcpConfigsobject · requiredcreatedAtnumber · requiredupdatedAtnumber · required
systemMessagestringCustom system prompt for the agent
modelstringLLM model identifier (e.g., 'claude-3-opus')
refusalFallbackModelstringModel to continue the turn with when
modelrefuses a request on safety grounds (stop_reason refusal / content_filter). Opt-in: agent ⋮ → "More settings…" ortfa-cli agent update <agent> refusalFallbackModel=…. Every switch is announced by a toast + the run meta records the model that actually answered; unset = the refusal is shown as an error.refusalRetryEverynumberWhile on the refusal fallback, give the refused
modelone call after every N fallback calls: it answering ends the fallback, it refusing again stays on it. Each probe re-sends the conversation uncached. Unset/0 = never. Experimental, CLI/API only.modelFamilystringFollow this model family (MODEL_FAMILIES key): at each run start
modelis moved to the family's current version. Unset =modelis pinned.keepProviderbooleanRun-only (never stored):
modelis an explicit per-chat pick, so it runs on exactly itsprovider:— the team's "EU by default" does not re-point it to the EU sibling. Hard rules (eu_only / zdrOnly) still apply.thinkingLeveltemperaturenumbersystemMessageMode'default_coder' uses built-in coding prompt, 'custom_w_tools' uses systemMessage + auto-injected capability sections, 'raw' uses systemMessage verbatim (no global prepend, no tool/routing/workspace sections).
smartSystemPromptbooleanAuto-enhance system prompt based on context
memoryEnabledbooleanPut the project's memory files (
projects/<id>/memory/, plusme/memory/in private todos) in the system prompt. Default on.searchOffstring[]Search sources switched off for this agent (Knowledge → Searchable):
chats(tfa-memory),cloud(TODOforAI files, tfa-files),gdrive,onedrive,find:<machineId>:<folder>(a tfa-find folder). Unset/empty = everything on.knowledgeOffstring[]Knowledge switched off for this agent, by uri: memory files (kept out of the prompt), context entries (not listed),
todoforai:projects/<id>/context= all Documents,…/context/brandand…/context/voice. Unset/empty = all on.autoCompactionbooleanAutomatic context compaction (summarize older messages near the limit). Default on; false = only manual compaction + overflow recovery. Set in the agent's "More settings…".
contextLimitnumberContext limit in tokens that compaction is measured against. Unset/0 = auto (model window, capped at 200K).
contextDocumentsobject[]Reference files (PDF, images, text/office docs) pinned to every conversation of this agent: sent natively as the first user message (PDF/image as document/image blocks), prompt-cached. Metadata only — the agent fetches bytes by attachment id.
devicesConfigobjectpermissionsobjecttoolProfilesobjectConstruct a type with a set of properties K of type T
promptOverridesobjectConstruct a type with a set of properties K of type T
judgeSysmsgstringApproval policy in plain language (e.g. "Block sending email", "Block files outside the workspace", "Block only dangerous commands"). When set, a tool call that would ASK is judged by a fast LLM against it and the call's workspace paths: ALLOW runs, ASK prompts the user. Unset = inherit the global policy; '' = no judge for this agent (every ASK prompts the user); set = replaces the global policy.
specIdstringSpec this agent was created from
colorstringHex color (e.g. '#10b981') used to tint todos assigned to this agent
iconstringIcon key from the frontend's agent icon set (unset = robot).
AgentSettings promptSizes
Size in characters of each part of the system prompt the agent last built: base prompt, tool definitions and the built-in sections.
path Parameters
agentSettingsIdstring · required
Responses
Successful response
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = null | |
| type = object · requires: sizes, at |
AgentSettings update
Updates AI agent settings like model, temperature, and system prompt.
path Parameters
agentSettingsIdstring · required
Request Body
agentSettingsIdstring · requiredupdatesobject · requiredMake all properties in T optional
Responses
Successful response
idstring · requirednamestring · requiredownerIdstring · requirededgesMcpConfigsobject · requiredcreatedAtnumber · requiredupdatedAtnumber · required
systemMessagestringCustom system prompt for the agent
modelstringLLM model identifier (e.g., 'claude-3-opus')
refusalFallbackModelstringModel to continue the turn with when
modelrefuses a request on safety grounds (stop_reason refusal / content_filter). Opt-in: agent ⋮ → "More settings…" ortfa-cli agent update <agent> refusalFallbackModel=…. Every switch is announced by a toast + the run meta records the model that actually answered; unset = the refusal is shown as an error.refusalRetryEverynumberWhile on the refusal fallback, give the refused
modelone call after every N fallback calls: it answering ends the fallback, it refusing again stays on it. Each probe re-sends the conversation uncached. Unset/0 = never. Experimental, CLI/API only.modelFamilystringFollow this model family (MODEL_FAMILIES key): at each run start
modelis moved to the family's current version. Unset =modelis pinned.keepProviderbooleanRun-only (never stored):
modelis an explicit per-chat pick, so it runs on exactly itsprovider:— the team's "EU by default" does not re-point it to the EU sibling. Hard rules (eu_only / zdrOnly) still apply.thinkingLeveltemperaturenumbersystemMessageMode'default_coder' uses built-in coding prompt, 'custom_w_tools' uses systemMessage + auto-injected capability sections, 'raw' uses systemMessage verbatim (no global prepend, no tool/routing/workspace sections).
smartSystemPromptbooleanAuto-enhance system prompt based on context
memoryEnabledbooleanPut the project's memory files (
projects/<id>/memory/, plusme/memory/in private todos) in the system prompt. Default on.searchOffstring[]Search sources switched off for this agent (Knowledge → Searchable):
chats(tfa-memory),cloud(TODOforAI files, tfa-files),gdrive,onedrive,find:<machineId>:<folder>(a tfa-find folder). Unset/empty = everything on.knowledgeOffstring[]Knowledge switched off for this agent, by uri: memory files (kept out of the prompt), context entries (not listed),
todoforai:projects/<id>/context= all Documents,…/context/brandand…/context/voice. Unset/empty = all on.autoCompactionbooleanAutomatic context compaction (summarize older messages near the limit). Default on; false = only manual compaction + overflow recovery. Set in the agent's "More settings…".
contextLimitnumberContext limit in tokens that compaction is measured against. Unset/0 = auto (model window, capped at 200K).
contextDocumentsobject[]Reference files (PDF, images, text/office docs) pinned to every conversation of this agent: sent natively as the first user message (PDF/image as document/image blocks), prompt-cached. Metadata only — the agent fetches bytes by attachment id.
devicesConfigobjectpermissionsobjecttoolProfilesobjectConstruct a type with a set of properties K of type T
promptOverridesobjectConstruct a type with a set of properties K of type T
judgeSysmsgstringApproval policy in plain language (e.g. "Block sending email", "Block files outside the workspace", "Block only dangerous commands"). When set, a tool call that would ASK is judged by a fast LLM against it and the call's workspace paths: ALLOW runs, ASK prompts the user. Unset = inherit the global policy; '' = no judge for this agent (every ASK prompts the user); set = replaces the global policy.
specIdstringSpec this agent was created from
colorstringHex color (e.g. '#10b981') used to tint todos assigned to this agent
iconstringIcon key from the frontend's agent icon set (unset = robot).