Full layout
Directory semantics
agent.yaml (required)
The agent manifest. Its presence in a directory marks that directory as an OpenGAP agent root. A runtime starts by reading this file.
See Agent Manifest for the full schema.
skills/
Each .py file (or Python package) in skills/ that exports a @skill-decorated function is loaded as a skill. The runtime loads all skills before starting the agent loop.
Subdirectories are treated as package skills — the runtime imports the package and looks for @skill-decorated functions in __init__.py.
Files matching the exclude glob in agent.yaml are ignored.
hooks/
Each .py file in hooks/ that exports hook-decorated functions is loaded. Hook discovery is automatic — the runtime looks for functions decorated with @hooks.before_run, @hooks.after_run, etc.
File names do not matter for hook loading. Use descriptive names (audit.py, validation.py) for maintainability.
flows/
Each .yaml file in flows/ is a SkillsFlow definition. Flows are loaded and exposed to the agent as skills unless expose_as_skill: false is set in the flow file.
memory/config.yaml
An optional override for the memory configuration. If present, its settings merge with (and take precedence over) the memory: section in agent.yaml.
plugins/
Each .py file in plugins/ that defines a class inheriting from a GitAgent plugin base class is loaded as a plugin.
prompts/
Store prompt templates here for use in system prompts or skill implementations. Reference them from agent.yaml:
tests/
Tests for skills and flows. The runtime’s test runner (gitagent test) discovers and runs any file matching test_*.py in this directory.
Multiple agents in a monorepo
A repository can contain multiple agents:agent.yaml, reference shared skills:
agent.yaml. All relative paths in agent.yaml are relative to the agent root.
Non-Python runtimes
While GitAgent uses Python@skill-decorated functions, the OpenGAP spec allows skill implementations in any language. A non-Python runtime implements the same discovery convention but can load skills from different file types.
The spec requires:
agent.yamlat the root (required for any runtime)- Skills in
skills/(implementation language is runtime-specific) - Hooks in
hooks/(implementation language is runtime-specific)
Path configuration overrides
All directory paths can be overridden inagent.yaml:
skills/ directory isn’t appropriate.