Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.dari.dev/llms.txt

Use this file to discover all available pages before exploring further.

Minimal dari.yml:
name: my-agent
harness: pi
instructions:
  system: prompts/system.md
llm:
  model: openai/gpt-5.5
When you use Dari-managed OpenRouter, OpenAI, or Anthropic credentials, do not set llm.base_url or llm.api_key_secret. Models starting with openai/, such as model: openai/gpt-4.1-mini, use Dari-managed OpenAI by default. Models starting with anthropic/, such as model: anthropic/claude-sonnet-4.6, use Dari-managed Anthropic by default. Everything else uses Dari-managed OpenRouter. Set llm.api_key_secret when you want to bring your own provider key, and set llm.base_url only for a custom OpenAI-compatible endpoint.

Top-level fields

FieldRequiredDetails
nameyesAgent display name.
harnessyesOnly pi today. See Harnesses.
instructionsyesSystem prompt file path.
sandboxnoRuntime environment config. See Sandbox Introduction and E2B.
llmyesModel and provider credentials.
built_in_toolsnoBuilt-in tool selection. See Built-in Tools.
custom_toolsnoCustom tool declarations. See Dari-Executed Tools and External Tools.
skillsnoBundled skills. See Skills.
extensionsnoPi extensions. See Extensions.
Unknown top-level keys are rejected.

instructions

FieldRequiredValue
systemyesRepo-relative Markdown file path.

llm

You can declare one default model:
FieldRequiredValue
providernoopenrouter, openai, or anthropic. If omitted, Dari infers OpenAI/Anthropic from model prefixes and otherwise uses OpenRouter.
modelyesModel identifier. Models starting with openai/ use managed OpenAI by default. Models starting with anthropic/ use managed Anthropic by default. Everything else uses managed OpenRouter.
base_urlnoCustom OpenAI-compatible provider base URL. Omit this for Dari-managed OpenAI, Anthropic, and OpenRouter.
api_key_secretnoStored org credential name. Omit this to use Dari-managed provider credentials. For a custom base_url, omit this only if every session supplies llm_api_key (CLI: --llm-api-key or --llm-api-key-env).
retry_policynoRetry policy object.
Or allow a session to choose from named LLM options:
llm:
  default: fast
  options:
    fast:
      provider: openrouter
      model: openai/gpt-5.5
    claude:
      provider: anthropic
      model: claude-sonnet-4-5
    compatible:
      model: custom-model
      base_url: https://llm.example.com/v1
      api_key_secret: CUSTOM_LLM_API_KEY
llm.default must reference a key in llm.options. Session creation may pass llm_id (CLI: dari session create --llm claude) to select an option; omitted llm_id uses the default.

llm.retry_policy

FieldRequiredValue
maximum_attemptsnoPositive integer.
initial_interval_secondsnoPositive integer.
backoff_coefficientnoNumber >= 1.
maximum_interval_secondsnoPositive integer, >= initial_interval_seconds.

sandbox

FieldRequiredValue
providernoe2b.
provider_api_key_secretnoStored org credential name.
dockerfilenoRepo-relative Dockerfile path. Cannot be combined with runtimes, packages, or setup.
envnoMap of environment variable names to literal values.
secretsnoList of stored org credential names to expose as environment variables.
resourcesnoResource limits object.
runtimesnoManaged runtime versions object.
packagesnoManaged package install object.
setupnoManaged setup object.
internet_accessnoBoolean. Defaults to false; allows public internet access from execution sandboxes.
storage_mount_pathno/workspace.
storage_bindingnoStorage binding name.

sandbox.resources

FieldRequiredValue
cpunoPositive integer.
memory_mbnoPositive integer.

sandbox.runtimes

FieldRequiredValue
nodenoVersion string.
pythonnoVersion string.
gonoVersion string.

sandbox.packages

FieldRequiredValue
aptnoList of apt package names.

sandbox.setup

FieldRequiredValue
scriptyesRepo-relative script path.

Complete managed setup example

Use sandbox.runtimes, sandbox.packages, and sandbox.setup together when you want Dari to keep managing the base sandbox while you add a few runtime dependencies of your own. The setup.script value is repo-relative in your bundle; at build time, that file is available under /bundle and runs from /bundle as root after the requested apt packages and managed runtimes are installed.
dari.yml
name: my-agent
harness: pi
instructions:
  system: prompts/system.md
llm:
  model: openai/gpt-5.5
sandbox:
  provider: e2b
  runtimes:
    node: "20"
    go: "1.23.4"
  packages:
    apt:
      - ca-certificates
      - curl
      - tar
      - gzip
  setup:
    script: scripts/setup-sandbox.sh
scripts/setup-sandbox.sh
#!/usr/bin/env bash
set -euo pipefail

YQ_VERSION="v4.44.6"
TMP_DIR="$(mktemp -d)"
trap 'rm -rf "$TMP_DIR"' EXIT

curl -fsSL \
  "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64.tar.gz" \
  -o "$TMP_DIR/yq.tar.gz"
tar -xzf "$TMP_DIR/yq.tar.gz" -C "$TMP_DIR"
install -m 0755 "$TMP_DIR/yq_linux_amd64" /usr/local/bin/yq

yq --version
Commit both files with your agent bundle, then publish the agent normally. See Agents for the publish flow. Use sandbox.dockerfile instead of this managed setup flow only when you need full image control; sandbox.dockerfile cannot be combined with sandbox.runtimes, sandbox.packages, or sandbox.setup.

built_in_tools

List entries are tool names. Valid names: read, bash, edit, write, grep, find, ls.

custom_tools

For TypeScript tools defined as tools/<name>/tool.ts, you do not need to write custom_tools entries by hand. dari deploy infers the tool name from the folder name, reads the exported inputSchema and handler, and adds a custom-tool entry to the uploaded manifest. The schema remains code-first; the CLI does not inline it into dari.yml as input_schema_json.
FieldRequiredValue
nameyesTool name exposed to the model.
pathyesRepo-relative path under tools/.
kindyesmain or external.
runtimeRequired for kind: main unless set in tool.ymltypescript or python. Not allowed for kind: external.
handlerRequired for kind: main unless set in tool.ymlHandler reference, such as handler.py:main or tools/summarize_file.py:main. Not allowed for kind: external.
descriptionRequired for code-first entries generated by the CLITool description. For directory tools, set this in tool.yml.
retriesnoPositive integer. kind: main only. Cannot be combined with retry_policy.
retry_policynoRetry policy object. kind: main only. Cannot be combined with retries.
timeout_secondsnoPositive integer.
Do not put input_schema_json or output_schema_json in dari.yml. Code-first TypeScript tools export schemas from code. Directory tools use tools/<name>/tool.yml schema file references.

tools/<name>/tool.yml

FieldRequiredValue
nameyesTool source name.
descriptionyesTool description.
input_schemayesPath to a JSON schema file inside the tool directory.
output_schemanoPath to a JSON schema file inside the tool directory.
runtimeRequired for kind: main unless set in dari.ymltypescript or python.
handlerRequired for kind: main unless set in dari.ymlHandler reference relative to the tool directory, such as handler.py:main.

skills

FieldRequiredValue
nameyesSkill name. Must match SKILL.md frontmatter.
pathyesRepo-relative path under skills/.

skills/<name>/SKILL.md frontmatter

FieldRequiredValue
nameyesSkill name.
descriptionyesSkill description.
disable-model-invocationnoBoolean.

extensions

FieldRequiredValue
nameyesExtension name.
pathyesExactly extensions/<name>.

extensions/<name>/

FileRequiredValue
index.ts or index.jsyes, unless package.json defines pi.extensionsExtension entrypoint.
package.jsonnoRequired when using pi.extensions or extension dependencies.