Agent harness
In plain terms
A framework is the engine (models, tools, sessions). A harness is the seatbelt + backpack the agent wears so it can work in a real repo:- read the project’s rules (
AGENTS.md) - open a skill booklet only when needed (
SKILL.md) - stay inside one folder (
workspace) - write notes to its future self
- remember tiny standing facts
- ask a helper to do a subtask
- search older chats
DeepAgent. That would copy the whole engine. The harness is just extra switches on Agent.
One-line start
Agent.deep(config) is the same as new Agent({ ...defaults, ...config }). Your config wins.
What deep() turns on
Turn any of them off:
deep():
1. Project rules — AGENTS.md
Put a file in the repo:
contextFiles: true, that text is added to the system prompt.
Also accepted (first match wins, walking up to the git root): .agentium.md, AGENTS.md, CLAUDE.md, .cursorrules.
Obvious prompt-injection (“ignore previous instructions”) is blocked, not loaded.
2. Skills — SKILL.md
A skill is a folder with a booklet:
get_skill_instructions. That is progressive disclosure.
3. Workspace vs durable notes
Two different “filesystems”. Easy to mix up:4. Standing memory files
fileMemory: true gives a memory tool with a hard character cap.
target: "memory"→ environment / project facts (MEMORY.md)target: "user"→ this person’s preferences (USER.md)
memory: { storage } (session history + summaries + vector learnings). You can use both.
5. Subagents
subagents: true adds the task tool.
The child:
- gets a new message list (no giant parent history)
- can have its own instructions
- returns one final report
subagent.start, subagent.complete, subagent.error.
Max nesting: subagents: { maxDepth: 2 }.
6. Learnings
learning: true wraps the existing vector store (LearnedKnowledge, collection agentium_learnings). It does not invent a second memory brain.
- Tests / demos:
learning: true(hash embedder + in-memory vectors) - Production: pass a real store
What we did not add
- A
DeepAgentclass — it would duplicateAgent - A rewrite of
MemoryManager— files + session search sit beside it - Using the event bus to skip tools — that’s
loopHooks