Reference

API reference

Every keyword, every field it accepts, the allowed values, and the defaults.

API reference

This is the full reference for the .nt format. It lists every keyword (block), every field you can set on it, the values each field accepts, and the default when you leave it out.

How to read this

Each keyword has its own table. Field is the exact name you write. Type is what kind of value it takes. Values / default shows the allowed values, or the default used when you skip the field.

Field types

input, output, and a tool's input are maps of fields. Each field is either a bare type or an object with more detail.

input:
  clues: string # short form
output:
  age:
    type: number # full form
    description: The best guess.
    required: false # optional; defaults to true
TypeMeaning
stringText.
numberA number.
booleantrue or false.
objectA nested structure.
arrayA list of values.
Field optionTypeValues / default
typestringOne of the types above.
descriptionstringOptional note about the field.
requiredbooleantrue (default) or false.

Thinking levels

Several places accept a thinking level. From least to most effort:

Value
offNo extended thinking.
minimal
low
mediumThe default.
high
xhigh
maxThe most thinking.

config

Project-wide settings. One config block per project.

FieldTypeValues / default
targetstringDefaults to node.
entrystringThe agent or workflow nt up runs. No default.
defaultsmapShared defaults for every agent (see below).
providersmapNamed provider blocks (see provider).

config.defaults

FieldTypeValues / default
modelstringprovider/model-id. No default.
sandboxstringA sandbox name. No default.
thinkingstringA thinking level. Defaults to medium.
max_tokensnumberDefaults to 8000.
config
  target: node
  entry: age
  defaults:
    model: anthropic/claude-sonnet-5
    sandbox: workspace
    thinking: medium
    max_tokens: 8000
  providers:
    anthropic:
      api: anthropic
      api_key: env(ANTHROPIC_API_KEY)

provider

Where the model comes from. Declared on its own or under config.providers.

FieldTypeValues / default
apistringanthropic or openai-completions. Defaults to anthropic if the provider is named anthropic, otherwise openai-completions.
base_urlstringEndpoint for OpenAI-style providers. Must be https (local addresses may use http).
api_keystringUse env(NAME). A literal key triggers a warning.
headersmapExtra request headers.
provider ollama
  api: openai-completions
  base_url: http://localhost:11434/v1
  api_key: env(OLLAMA_API_KEY, ollama)

agent / subagent

The core worker. agent and subagent accept exactly the same fields.

FieldTypeValues / default
descriptionstringShort summary. Defaults to empty.
modelstringprovider/model-id. Falls back to config.defaults.model.
instructionsstringThe system prompt. Use a block scalar for multiple lines.
thinkingstringA thinking level. Falls back to defaults.
max_tokensnumberReply length limit. Falls back to defaults (8000).
sandboxstringA sandbox name. Falls back to config.defaults.sandbox.
cwdstringOverride the working directory for this agent.
toolslistBuilt-in tool names or your tool names.
subagentslistNames of subagent blocks it can delegate to.
skillslistNames of skill blocks to load.
inputmapTyped input fields (see Field types).
outputmapTyped output fields. When set, the reply is returned as JSON.
messagestringAn optional default message used when no input is given.
agent age
  description: Guesses a person's age from clues.
  model: anthropic/claude-sonnet-5
  thinking: high
  max_tokens: 8000
  sandbox: workspace
  tools: [current_year, fs_write]
  subagents: [researcher]
  skills: [estimation]
  instructions: |
    Guess the person's most likely age from the clues.
  input:
    clues: string
  output:
    age: number
    reason: string

Built-in tools

You can list these under tools without declaring them:

ToolWhat it does
fs_readRead a file in the sandbox.
fs_writeWrite a file in the sandbox.
fs_listList files in the sandbox.
bashRun a command in the sandbox.

sandbox

The workspace an agent reads, writes, and runs commands in.

FieldTypeValues / default
descriptionstringShort summary. Defaults to empty.
typestringvirtual (default) or local.
cwdstringWorking directory. Defaults to /workspace.
envmapEnvironment values for commands. Values may use env(NAME).
sandbox workspace
  description: In-memory workspace.
  type: virtual
  cwd: /workspace
  env:
    GREETING: hello

local needs opt-in

A local sandbox uses your real files and terminal. It only runs when you set NT_ALLOW_LOCAL=1 in your environment.


tool

A custom power an agent can call. {placeholders} are filled from the tool's input.

FieldTypeValues / default
descriptionstringTells the model when to use it. Defaults to the tool name.
typestringshell (default) or http.
commandstringThe command to run (for shell tools).
urlstringThe address to call (for http tools).
methodstringHTTP method for http tools, such as GET or POST.
headersmapRequest headers for http tools.
inputmapTyped inputs that fill {placeholders}.
allow_internalbooleanAllow http tools to call private or localhost addresses. Defaults to false.
tool current_year
  description: Returns the current four-digit year.
  type: shell
  command: date +%Y

tool lookup
  description: Fetch a record by id.
  type: http
  method: GET
  url: https://api.example.com/records/{id}
  input:
    id: string

skill

Reusable instructions loaded into an agent's prompt.

FieldTypeValues / default
descriptionstringShort summary. Defaults to the skill name.
instructionsstringThe reusable guidance. Use a block scalar for multiple lines.
skill estimation
  description: A checklist for guessing an age.
  instructions: |
    1. Turn each clue into a year.
    2. Pick one number.

workflow

A fixed sequence of steps that pass results forward.

FieldTypeValues / default
descriptionstringShort summary. Defaults to empty.
agentstringDefault agent for steps that do not name one.
inputmapTyped input for the whole workflow.
outputmapTyped final result.
stepslistThe steps to run, in order (see below).

Each entry in steps accepts:

Step fieldTypeValues / default
promptstringWhat to ask. Use {name} to insert input or earlier results.
agentstringWhich agent runs this step. Falls back to the workflow's agent.
skillstringAn optional skill to add for this step.
intostringA name to save this step's result under.
workflow estimate_age
  description: Find the year, then guess the age.
  agent: age
  input:
    clues: string
  output:
    estimate: object
  steps:
    - agent: researcher
      prompt: "What year does this point to: {clues}"
      into: year
    - prompt: |
        Guess the age. Clues: {clues}. Year: {year}
      into: estimate

import

Pulls in another file or folder. Put imports at the top of a file.

FormMeaning
import ./file.ntImport one file.
import ./folderImport every .nt file in a folder.
import ./config.nt
import ./subagents

Defaults & limits

Handy values built into the engine:

NameValue
Default thinkingmedium
Default max_tokens8000
Default sandbox cwd/workspace
Max steps per agent run12
Max delegation depth6
HTTP tool timeout30 seconds