Skip to content

Context & Skills

This section covers how mono-agent assembles the prompt for every turn: a required identity document, an optional soul document, the running conversation history, and any explicitly selected skills. All of it is declared in the context block of mono-agent.config.json and is coverage type config (with a few auto and code escape hatches noted below).

Each turn the agent builds a prompt from these layers:

LayerSourceCoverageKey
IdentityIDENTITY.md (or path)configcontext.identityPath
Soul (optional)SOUL.md (or path)configcontext.soulPath
Sessionhost-owned delivery and callback-safety guidance; physical route withheldautonone (auto-generated)
Conversation historyowner-only durable storeauto / code64 messages per exact conversation id, independent of runtime.maxTurns
Selected skills<skillsRoot>/<name>/SKILL.mdconfigcontext.skillsRoot, context.selectedSkills

Identity is the only required piece of contextcontext.identityPath is the one field in this section you cannot omit. Everything else is opt-in.

{
"context": {
"identityPath": "./IDENTITY.md",
"soulPath": "./SOUL.md",
"skillsRoot": "./skills",
"selectedSkills": ["research"],
"skillMaxBytes": 48000,
"skillDisclosure": "index"
}
}

Every field has a matching MONO_AGENT_* env var that overrides the JSON (env > JSON > defaults):

FieldEnv varDefault
context.identityPathMONO_AGENT_IDENTITY_PATH./IDENTITY.md
context.soulPathMONO_AGENT_SOUL_PATHunset (no soul)
context.skillsRootMONO_AGENT_SKILLS_ROOT./skills
context.selectedSkillsMONO_AGENT_SELECTED_SKILLSnone selected
context.skillMaxBytesMONO_AGENT_SKILL_MAX_BYTES48000
context.skillDisclosureMONO_AGENT_SKILL_DISCLOSUREfull

Paths are resolved relative to the agent folder. mono-agent init scaffolds an IDENTITY.md for you; see Folder Layout.

  • Identity & soul are plain markdown loaded into every prompt. Identity carries role and boundaries; soul is an optional secondary voice/guardrail document. See Identity & Soul.
  • Conversation history assembly is automatic (coverage auto): an owner-only, disk-backed store retains the latest 64 messages for each exact conversation id, independent of runtime.maxTurns, and survives process restarts. To swap in a custom store you must use the programmatic path — createConfiguredAgentResponder({ historyStore }) (coverage code); see Programmatic.
  • Selected skills are loaded explicitly and each is capped at context.skillMaxBytes bytes (default 48000, valid range 256–1,000,000). See Skills.
  • Identity & Soul — authoring IDENTITY.md and the optional SOUL.md.
  • Skills — the SKILL.md format, selectedSkills, and per-skill byte caps.
  • Assembly — the full prompt-assembly order and how the layers combine each turn.
  • Memory — recalled memory is appended to the user message each turn (not the system prompt).
  • Tools — tool definitions and policy live next to context in each turn.