Skip to main content

Digitorn App Language Reference

Digitorn apps are declared in a single YAML file. The compiler parses that YAML and the daemon runs it.

There is one canonical schema (v2). The usual surface is eight top-level blocks, plus additional first-class blocks when you need them (context, documents, docs, templates, requirements). Every field has exactly one home; two flat root keys (modules:, capabilities:) are still accepted as aliases - see The two root-level aliases below for the full, exact list. Anything else at the root is an unknown-key compile error.

The optional schema_version: 2 declaration at the top of the file future-proofs against breaking changes.

The usual 8 blocks​

BlockRequiredWhat it holdsDoc
app:YesIdentity - app_id, name, version, icon, color, tags, quick_prompts.App Configuration
runtime:No (defaults)Lifecycle - mode, entry_agent, max_turns, timeout, hooks, middleware, context, workdir, modes / default_mode.App Configuration, Modes, Middleware, Tool Hooks, Context Management
agents:At least 1 in practiceList of agents. Each has id, role, brain, system_prompt, modules, pool, delegate_to.Agents, Multi-Agent
tools:NoWhat the agent can call: modules (dict), capabilities (grant / deny), channels (dict).Tools, Built-in Tools, MCP Servers, Channels, Security
security:Nobehavior and credentials_schema - the two real sub-keys. Path confinement (the "sandbox") isn't declared under security: at all; it's automatic, tuned per module via tools.modules.<id>.constraints.Behavior Engine, Workdir Sandbox, credentials.md
ui:NoClient display: theme, features, widgets, workspace (renderer), slash_commands, quick_prompts, greeting. Mostly client-side; the daemon still reads a few UI fields (for example activity / tool-call inject hints). Live app preview is the preview / previewshot modules plus HTTP /preview/serve/....Client Manifest
dev:NoDeveloper affordances: skills, variables, include (fragmentation).Skills System, Bundle namespaces
flow:NoOptional declarative orchestration graph for multi-agent apps. Top-level since v2 because it changes how agents coordinate (explicit scenography vs implicit Agent() calls).Flows

Also accepted on the root (see App Configuration → Top-level blocks): context:, documents:, docs:, templates:, requirements:.

The ui.workspace block (renderer) is a different concept from runtime.workdir (filesystem path) - don't confuse the two.

Quick example​

This example uses a local Ollama model so no external credentials are required. Replace the brain block to use any other provider (provider: openai, provider: anthropic, provider: deepseek, etc.); see Agents for the full list.

app.yaml
app:
app_id: my-assistant
name: My Assistant

runtime:
mode: conversation

agents:
- id: assistant
role: assistant
brain:
provider: ollama
model: qwen25-7b-gpu:latest
backend: openai_compat
config:
base_url: http://localhost:11434/v1
api_key: ollama
system_prompt: |
You are a helpful assistant. Reply concisely.

tools:
modules:
memory: {}
capabilities:
default_policy: auto
grant:
- module: memory
actions: [remember]

ui:
greeting: "Hello! How can I help?"

Deploy and chat with it:

bash
digitornd -config config.yaml                  # daemon if not running (subcommand `run` is optional)
digitorn install my-assistant.yaml # deploy + arm channel providers
digitorn chat my-assistant # talk to it

The two root-level aliases​

Only two legacy flat keys are still accepted directly on the YAML root - everything else needs its canonical home under tools: / security: / ui: / dev: / runtime: or it's an unknown-key compile error, full stop:

Root keyFolds intoMerge behavior
modules:tools.modulesPer-entry: a name already declared under tools.modules wins over the root-level one.
capabilities:tools.capabilitiesWhole-block: only applies if tools.capabilities isn't set at all.

Separately, workspace used as a module id (under tools.modules or a root-level modules:) is always rewritten to filesystem - see Built-in Tools. That's a module-name alias, not a shape migration.

Documentation by topic​

Getting started​

Agents and tools​

Memory and context​

Runtime control​

Security​

  • Capabilities - default_policy, grant / deny, approve gates
  • Modes - Plan/Build-style overlays; user- or agent-switched (change_mode)
  • Behavior Engine - declarative runtime rules + classifier
  • Auth - JWT, per-user installs

UI and client​

Shipping apps​

Modules​

See YAML building blocks for the inventory. Per-module pages: reference/modules/.

Common modules: bash, browser, database, filesystem, http, lsp, mcp, connector, preview, previewshot, rag, scheduler, web, plus memory, agent_spawn, context_builder, and channels. Widgets live under ui.widgets.

From YAML to a running chat​

  1. Author the YAML (and optional bundle files).
  2. Install into your Digitorn instance - the daemon compiles it server-side and reports diagnostics if anything's wrong.
  3. Chat, or let a background channel provider wake the app.

Tool delivery - direct, compact, or discovery​

Control how many tool schemas the model sees up front with runtime.tool_injection (or let Digitorn pick from tool count):

  • direct - full schemas up front (small apps).
  • compact_direct - short descriptions; full schema via get_tool.
  • discovery - meta-tools (search_tools, get_tool, execute_tool, run_parallel, background_run, …) first; domain tools on demand.

See Discovery tutorial.

LLM compatibility​

Three backends are supported via agents[].brain.backend: openai_compat (default), anthropic, and github_copilot.

  • openai_compat - any OpenAI-compatible /v1 endpoint (OpenAI, DeepSeek, Groq, Mistral, Together, Ollama, vLLM, LM Studio, OpenRouter, Cerebras, Perplexity, Fireworks, xAI, Gemini, ...).
  • anthropic - Anthropic SDK (also accepts the claude-code API-key alias for Claude Code OAuth tokens, see llm_provider module).
  • github_copilot - uses your GitHub Copilot subscription.

Tool schemas always go out through the API's native tools= parameter, whatever the backend. Some models - small local ones especially - answer with a tool call shaped as plain text instead of a structured tool_calls reply anyway; when that happens, a multi-format recovery parser tries to salvage a call out of the text before giving up. See Tools → When a model answers in plain text instead of calling a tool.

bash
# Auth
digitorn login
digitorn logout
digitorn whoami

# App lifecycle
digitorn install <app.yaml>
digitorn list
digitorn uninstall <app-id>
digitorn enable <app-id>
digitorn disable <app-id>
digitorn app-reload <app-id>
digitorn app-info <app-id>
digitorn app-status <app-id>

# Secrets
digitorn secret list <app-id>
digitorn secret get <app-id> <key>
digitorn secret set <app-id> <key>
digitorn secret delete <app-id> <key>

# Chat
digitorn chat <app-id>
digitorn chat <app-id> -s <sid>
digitorn sessions <app-id>

# Daemon reachability (CLI client)
digitorn status
digitorn doctor
digitorn daemon-stats

Full flag lists: digitorn --help. For installing digitornd as a system service (install / start / stop / ...), see Install and Production Deployment.