Understand the 'Agents as Repos' mental model
mainIn GitAgent, an agent is not just code; it is a git repository. All agent configurations, personality, rules, and memory are stored as plain text files within a directory. This allows you to use standard git primitives—such as git log to view memory evolution, git diff to track rule changes, and git branch to create experimental versions of your agent—to manage its lifecycle.
A typical GitAgent repository structure includes:
agent.yaml: The manifest containing model, tools, and runtime configuration.SOUL.md: Defines the agent's personality and identity.RULES.md: Defines behavioral constraints.DUTIES.md: Defines job responsibilities.AGENTS.md: Defines sub-agent relationships.memory/MEMORY.md: The primary memory file (automatically updated and committed by the agent).skills/: Directory containing custom skills (each with aSKILL.mdandscripts/).hooks/: Containshooks.yamlfor lifecycle hooks.tools/: Contains declarative tool definitions in.yamlfiles.
my-agent/
├── agent.yaml # The manifest — model, tools, runtime config
├── SOUL.md # Personality and identity
├── RULES.md # Behavioral constraints
├── DUTIES.md # Job responsibilities
├── AGENTS.md # Sub-agent relationships
├── memory/
│ └── MEMORY.md # Primary memory (auto-committed by the agent)
├── skills/
│ └── my-skill/
│ ├── SKILL.md # Skill definition
│ └── scripts/ # Supporting scripts
├── hooks/
│ └── hooks.yaml # Lifecycle hooks
└── tools/
└── *.yaml # Declarative tool definitions