The agent init template applies when the target will be operated, modified, or assisted by an AI agent. It does not prescribe a universal agent file tree. Instead, it determines what this specific agent target requires — which instructions exist, what tools are accessible, what context is needed — and creates only the artifacts that materially improve the agent’s ability to operate.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/bitwikiorg/init.md/llms.txt
Use this file to discover all available pages before exploring further.
Template metadata
| Field | Value |
|---|---|
| Name | Agent Init Protocol |
| Target | AI agent, agent workspace, agent-enabled repository, automation worker, or tool-using assistant environment |
| Purpose | Inspect what an agent requires to operate in a specific target, create or configure only applicable instructions, tools, prompts, state, and validation checks, and report agent readiness |
| Modes | Active, Dry Run, Repair, Reinitialize |
| Creates | AGENTS.md when agent operation applies and valid instructions are absent; SELF.md when identity, role, capabilities, or boundaries must be explicit; USER.md when operator context is required for correct interaction; TOOLS.md when tool availability, permissions, or invocation rules must be documented; STATE.md or PLAN.md when current condition or pending work must be externalized |
| Configures | Agent instructions; model or provider settings when applicable; tool definitions; prompt files; workspace directories; state or context references; expected inputs and outputs |
| Validates | Instructions are target-specific and internally consistent; required tools or providers are accessible where validation is permitted; startup path, prompts, and expected outputs are clear; existing instructions are preserved or repaired without unnecessary replacement |
| Optional outputs | AGENTS.md; SELF.md; USER.md; TOOLS.md; STATE.md; PLAN.md; SNAPSHOT.md; prompt files; tool registry; startup validation report |
When to use
Use this template when the target is an AI agent, agent workspace, agent-enabled repository, automation worker, tool-using assistant environment, or system whose operation depends on agent instructions.When NOT to use
Do not create generic agent files in every project. Agent artifacts are useful only when they materially improve operation. If the target is a software project that happens to have some agents working in it occasionally, the development project template is likely more appropriate —AGENTS.md is one conditional output of that template, not a reason to switch to the agent template.
Conditional artifacts
The agent template creates only artifacts the specific agent target requires. Each possible output has a condition:| Artifact | Condition |
|---|---|
AGENTS.md | Agent operation applies and valid instructions are absent |
SELF.md | Identity, role, capabilities, or boundaries must be explicit |
USER.md | Operator context is required for correct interaction |
TOOLS.md | Tool availability, permissions, or invocation rules must be documented |
STATE.md / PLAN.md | Current condition or pending work must be externalized |
SNAPSHOT.md | A point-in-time state record is useful for handoff or audit |
| Prompt files | The agent’s startup path requires structured prompt input |
| Tool registry | Tool definitions, permissions, or schemas need a central reference |
What it configures
- Agent instructions (scope, role, boundaries, behavior rules).
- Model or provider settings when applicable.
- Tool definitions, permissions, and invocation rules.
- Prompt files and prompt references.
- Workspace directories.
- State or context references.
- Expected inputs and outputs.
The procedure
INSPECT
Identify the agent’s intended role and the target it operates on.
- Inspect existing
AGENTS.mdfiles, prompts, tool definitions, provider or model configuration, workspace directories, state files, context files, schedules, expected inputs and outputs, permissions, and operator constraints. - Preserve valid existing instructions. Respect nested instruction scopes when they exist.
- Use existing agent files, project docs, tool schemas, prompt files, configuration, and user instructions as sources.
DETERMINE
Decide what the agent needs to become operational in this target.
- Identify required instructions, tool access, prompt structure, provider configuration, state representation, context handoff, validation checks, and boundaries.
- Produce a target-specific agent initialization plan.
- Create
AGENTS.mdonly when agent operation applies and no valid instruction file exists. - Create
SELF.mdonly when identity, role, capabilities, or boundaries need to be explicit. - Create
USER.mdonly when operator context materially affects operation. - Create
TOOLS.mdonly when tool permissions or invocation rules need durable documentation. - Create
STATE.mdorPLAN.mdonly when current condition or pending work must be externalized. - Create
SNAPSHOT.mdonly when a point-in-time state record is useful.
CREATE
Create only applicable artifacts from the conditional list above.
- Every artifact must be derived from the target. Do not copy generic instruction files without adaptation.
- Preserve and repair existing valid instructions rather than replacing them.
CONFIGURE
Make the agent artifacts usable together.
- Configure instruction precedence, model or provider settings, tool permissions, prompt references, state locations, input and output conventions, schedules when applicable, and validation commands.
- Configure only what is required for this agent target.
VALIDATE
Confirm the agent can operate with the initialized instructions and tools.
- Check instruction consistency, required files, tool availability, provider configuration, prompt references, expected input and output paths, state handoff, and any startup or dry-run command the target supports.
- Report status as
OPERATIONAL,OPERATIONAL_WITH_WARNINGS,BLOCKED, orDRY_RUN_COMPLETE.
Agent-specific notes
- Different targets need different instructions. An
AGENTS.mdwritten for one repository is not valid for another. Instructions must reflect the specific target’s structure, tools, and conventions. - Nested projects may require nested instruction files. When a monorepo contains sub-packages that agents operate on independently, each sub-package may need its own scoped
AGENTS.md. - Tool access must reflect real permissions. Do not document tools the agent cannot actually access. Do not omit tools the agent requires. The tool definitions created or referenced in this template must match the runtime environment.
- Agent readiness is validated by the target’s startup path. The validation step uses the specific checks the target supports — not a generic checklist applied to every agent.