Skip to main content

App Configuration

Canonical app YAML for Digitorn. Unknown keys are rejected when the compiler schema enforces them. Field lists below match internal/compiler/schema in the Go daemon.

Tool names in examples must match registered modules. Prefer database.query, http.request, scheduler.schedule. See YAML building blocks.

Top-level blocks (AppDefinition)

BlockRequiredRole
schema_versionnoForward-compat int (default 2)
appyesIdentity (app_id, name, ...)
runtimenoModes, workdir, triggers, hooks, injection
agentsnoAgent list
toolsnomodules, capabilities, channels
securitynobehavior, sandbox, credentials schema
uinoClient manifest
devnoVariables, skills, secrets helpers
flownoDeclarative flow graph
templatesnoSeed / preview templates
requirementsnoInstall requirements
contextnoContext inject blocks
documentsnoDocument declarations
docsnoIn-app docs
modules / capabilitiesnoLegacy top-level aliases

app

Typical fields: app_id, name, short_name, version, description, author, tags, icon, color, category, quick_prompts, attachments, attachments_mode, features, theme, mode.

runtime

FieldNotes
modeConversation / background / etc.
entry_agentDefault agent id
max_turns, timeoutTurn budget
workdir, workdir_modeSession workspace
modes, default_modeNamed mode overlays (ModeDef)
input, outputActivation I/O shape
max_sessions_per_userHow many conversations one person may keep open at once
max_concurrent_activationsHow many runs of this app happen at once; it can only tighten the server's own limit, never raise it
payload_schemaStructured activation
contextContext window policy
direct_modulesForce modules into direct injection
tool_injectiondirect / compact_direct / discovery
hooks, middlewareLifecycle hooks
max_stop_retriesStop retry budget
default_channelDefault channel instance name
workbench*Workbench / reflection flags
flowInline flow (also top-level flow:)
mid_turn_messagesMid-turn message policy

What wakes a background app

digitorn-background arms one listener per entry under tools.modules.channels.config.providers. Seven adapters: cron, webhook, rss, telegram, discord, whatsapp, pieces. See Channels.

Durable project knowledge

A context section, not a runtime field: context.sections[].builtin: memory_index injects .digitorn/memory/ every turn and lets the agent write to it. See Project memory.

agents[]

Each agent has identity (id, role, ...), brain, system_prompt, module grants, and related fields from schema.Agent. Brain backends are resolved by the LLM stack (OpenAI-compatible, Anthropic, ...).

tools

yaml
tools:
modules:
filesystem: {}
bash: {}
scheduler: {}
capabilities:
default_policy: auto # or approve / deny policies as implemented
grant:
- module: filesystem
- module: bash
channels:
alerts:
type: webhook
config:
url: "{{secret.WEBHOOK_URL}}"

tools.modules.<id> (ModuleBlock)

KeyRole
configModule-specific map (also accepts unknown keys folded into config)
setup[{action, params}] run at bootstrap
constraintse.g. allowed_actions, blocked_actions
middlewareModule middleware entries
credentialCredential reference

YAML alias: workspace under modules/grants (file I/O intent) is rewritten to filesystem. The Git module remains registered as workspace in the runtime.

tools.channels.<name>

KeyRole
typeAdapter id (see Channels)
configAdapter config map
user_resolverOptional {module, action, params, mapping, cache_ttl}

security

yaml
security:
behavior:
profile: coding # dev|coding|research|data|creative|assistant
classify_turns: true
rules: {} # boolean / threshold overrides
rule_definitions: [] # declarative rules
state_tracking: {}
classifier: {}
brain: {} # optional classifier brain
sandbox: {}
credentials_schema: {}

Full behavior: Behavior.

Minimal valid sketch

app.yaml
schema_version: 2
app:
app_id: hello
name: Hello
version: "0.1.0"
agents:
- id: main
role: assistant
brain:
provider: ollama
model: qwen2.5:7b
backend: openai_compat
config:
base_url: http://localhost:11434/v1
api_key: ollama
system_prompt: "Be concise."
tools:
modules:
filesystem: {}
capabilities:
grant:
- module: filesystem