One language, every harness
Agents, rules, answer formats and teams are written once in .ap files and compiled into what each harness reads: Claude Code, Cursor, Junie and AGENTS.md.
A programming language to orchestrate agents across every harness.
Write agents, rules, answer formats and teams in .ap files; agent-pack compiles them for Claude Code, Cursor, Junie and AGENTS.md.
git clone https://github.com/digitex3d/agent-pack && cd agent-pack && npm ci && npm run build && npm linkQuick start
agent-pack is not on npm yet: build it from source with Node 20 or newer.npm link puts the agent-pack command on your PATH.
git clone https://github.com/digitex3d/agent-pack && cd agent-pack && npm ci && npm run build && npm linkAn agent is a .ap file under agents/ holding oneEXPORT AGENT block, bound by AS to the role that says who it is.
EXPORT AGENT reviewer AS code-reviewer:
ABOUT Reviews a change for bugs and duplicated logic, never edits the code
MANDATE review the change the user points at and report what to fix
NEVER edit the files under review
ROLE code-reviewer:
ABOUT a careful reviewer who reads before judging
ALWAYS quote the line a finding is aboutFrom the project root, compile every agent: each configured harness gets its files (.claude/agents/ for Claude Code), the project gets AGENTS.md, and each agent its .apx under .agent-pack/apx/.
agent-pack bundle allFeatures
Agents, rules, answer formats and teams are written once in .ap files and compiled into what each harness reads: Claude Code, Cursor, Junie and AGENTS.md.
Each agent compiles to one .apx: its definition and the engine that serves it, run by Node alone. The agent reads the blocks a task needs on demand, instead of the whole definition in its prompt.
A team is a folder of members and a flows.ap file that routes requests and orders the steps between members, with parallel groups, conditions, loops and a context mode per step.
A TEMPLATE is a typed answer format with slots, a layout and an example. An agent shapes its answer, or reads an incoming request, through one.
IF! and UNTIL! compile into a command the apx decides: it reads the session variables the condition depends on and asks a judge, answering open or closed, closed whenever in doubt.
The compiled files are all there is: the agents orchestrate themselves inside the harness, following the flows you wrote.
Example
EXPORT AGENT web-researcher AS web-researcher-role:
ABOUT Researches a question on the internet and answers with a cited source for every claim
MANDATE answer the user's question from independent web sources, citing each one
MUST cite a URL and a publication date for every finding
NEVER invent a source, a URL or a quote
ROLE web-researcher-role:
ABOUT a careful researcher who finds, checks and cites sources before drawing any conclusion
ALWAYS prefer the primary source over a report relaying it
WHEN asked to research a question:
DO split the question into the claims the answer depends on
UNTIL every claim has been checked
RUN verify-claim
PROCEDURE verify-claim:
ABOUT back one claim with independent sources before it enters the brief
DO search for the claim and read the most authoritative result
IF the sources disagree
DO add the conflict, with both sources, to the open questions
AS finding
TEMPLATE finding:
ABOUT one claim of the answer, backed by its sources
SLOTS:
claim: TEXT MAX_WORDS 30 "the claim, stated as fact or labelled as opinion"
sources: TEXT "each source as <url> (<publication date>)"
BODY:
- {claim} — {sources}
EXAMPLE:
- Paris hosted the 2024 Olympics — https://olympics.com (2024-08-11)bundle all writes| File | What it is |
|---|---|
.agent-pack/apx/<agent>.apx | The agent: its definition and the engine that serves it, one file, run by Node alone |
.claude/agents/<agent>.md, .cursor/rules/<agent>.mdc, … | What each harness loads — the whole definition, or (claude-code-apx) a pointer to the.apx |
AGENTS.md | The project context (from PROJECT.ap) and the orchestration: every team, its members and routing |
CLAUDE.md | One line, @AGENTS.md, for harnesses that read their own file |
.agent-pack/compiled/<agent>.ap.json | The compiled document every output is projected from |
Harnesses
adapter
Writes the whole definition to .claude/agents/<name>.md, playbooks to .claude/skills/.
adapter
Writes the agent’s own definition to .claude/agents/<name>.md, then a pointer to its apx.
adapter
Writes each agent and playbook to .cursor/rules/<name>.mdc.
adapter
Writes agents to .junie/AGENTS.md, playbooks to .junie/skills/<name>/SKILL.md.
file
Always written: the project context, every team, its members and routing.
Releases
2026-10-06
The agent-pack-developer example and the builtin scaffolds write the 0.27 syntax.
2026-10-06
Variables, checked conditions (IF!, UNTIL!), a compile-time judge, flows compiled to harness scripts.
2026-09-13
STORE working tables, the claude-code-apx adapter, the apc executable compiler.
Get involved