SemText

Reference · NPL

<npl-agent>

NPL element

PromptLingo reference ↗

You write the agent's name, type, and rules as attributes and text. The page shows them as a tidy card. Machines can read the same fields back.

Describes one AI agent: its name, type, and how it should behave. You write the agent's name, type, and rules as attributes and text. The page shows them as a tidy card. Machines can read the same fields back. required. The agent's identifier, the `⌜<agent-name>` field of the source form. Mirrored to `data-name` after upgrade (the resolved value — an authored `data-name` is never overwritten). required. The agent's archetype (e.g. `scout`, `coder`). Mirrored to `data-type` after upgrade (the resolved value). required. The NPL contract version, the `NPL@{version}` field of the source form. Mirrored to `data-version` after upgrade (the resolved value). optional. The parent agent this definition extends; the header omits it when not authored. Mirrored to `data-extends` after upgrade (the resolved value). per the global attribute catalog (conventions.md §2) per the global attribute catalog (conventions.md §2) per the global attribute catalog (conventions.md §2)

Example

npl-agent.html
source
1 <npl-agent name="scout" type="scout" version="0.3" extends="base-agent">
2 Read-only scout: search, read, and summarise; never edit files or run
3 writes. Report findings with file paths and line numbers.
4 </npl-agent>
render

Live render boots with JavaScript — the authored source is alongside.

variant: no parent agent

With `extends` unauthored the header omits the parent part — the source form's header carries no parent field either.

variant: no parent agent
npl-agent-no-extends.html
source
1 <npl-agent name="coder" type="coder" version="1.0">
2 Implements the assigned task in the named worktree and reports the diff.
3 </npl-agent>
render

Live render boots with JavaScript — the authored source is alongside.

Source: spec/schema/npl/npl-agent.md