Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Agent profiles

LLM nodes invoke an external agent CLI (Cursor, OpenCode, a stub runner, etc.). Instead of inlining a long command argv in every program, definitively loads agent profiles from .definitively/agents/<id>.yml.

Profile selection

Each LLM node declares exactly one of:

FieldDescription
agent: cursorLoad .definitively/agents/cursor.yml
command: [argv, …]Raw argv prefix (legacy / custom runners)

When a node omits agent, the default profile id comes from DEFINITIVELY_AGENT (commonly cursor).

Example profile

agent:
  id: cursor
  executable: cursor-agent
  executable_env: DEFINITIVELY_AGENT_CURSOR_EXECUTABLE
  argv:
    - agent
    - --force
    - --model
    - "{{model}}"
    - --workspace
    - "."
    - --print
    - --output-format
    - stream-json
    - --
  prompt:
    mode: argv_after_delimiter
  output:
    format: stream_json
    extract: last_json_line
    envelope_path: result
    success_status: ok

Schema (v1)

FieldRequiredDescription
agent.idyesProfile id (matches filename)
executableone ofBinary name on PATH
executable_envone ofEnv var holding absolute path to binary
argvnoFixed argv prefix before the prompt
prompt.modeyesargv_after_delimiter, flag, or stdin
prompt.flagwhen flagFlag name before prompt text
output.formatyesstream_json, json, or text
output.extractyeslast_json_line or whole_stdout
output.envelope_pathnoDot-path to unwrap JSON envelope (e.g. result)
output.success_statusnoExpected status field in parsed JSON (default ok)

The builder interpolates {{model}} in argv from the node’s model field (default auto).

Prompt delivery

ModeBehavior
argv_after_delimiterAppend prompt after -- (or replace trailing --)
flagAppend [flag, prompt] to argv
stdinPass prompt on subprocess stdin

Output parsing

The executor reads stdout and parses it according to output.format:

  • stream_json — NDJSON lines; take the last JSON object (or unwrap via envelope_path)
  • json — whole stdout is one JSON object
  • text — raw stdout string

Outcome rules on the node (e.g. jq: '.status == "ok"') run against the parsed value.

Scaffolding

definitively init copies agents/cursor.yml into your workspace. Customize or add profiles for other harnesses.

Try it: Copy the example above to .definitively/agents/stub.yml, set DEFINITIVELY_AGENT=stub, and point executable at a test script.