What is OpenGAP?
OpenGAP is Define an agent as a git repository, export it anywhere. It sits in the Agent Frameworks & Builders category of the Agents & Automation tools and is open-source, written in TypeScript and licensed MIT. To get started: scaffold an agent.
Overview
OpenGAP — the Git Agent Protocol — is a file convention rather than a runtime: drop a defined set of files into a git repository and that repository becomes a portable agent definition. `agent.yaml` carries the manifest (name, version, model, skills, tools, compliance), `SOUL.md` the identity and communication style, `RULES.md` the hard constraints, and directories such as `skills/`, `tools/`, `workflows/`, `knowledge/`, `memory/` and `hooks/` hold the rest.
Because the definition is just files in git, version control, branching, diffing and review work on an agent the way they work on code. Agents also compose: a definition can `extend` a parent repository, or declare `dependencies` on other agent repositories pinned to a semver range and mounted into a subdirectory.
The `opengap` CLI is the reference implementation, published on npm as `@open-gitagent/opengap` (the older `gitagent` command is still installed as an alias). Its adapters are the point of the exercise: one definition exports to a plain system prompt, a Claude Code CLAUDE.md, OpenAI Agents SDK Python, CrewAI YAML, Cursor rules, Gemini CLI files, GitHub Copilot instructions and a dozen more. It also carries unusually detailed support for financial regulatory compliance — FINRA supervision and recordkeeping rules, Federal Reserve SR 11-7 model risk, SEC Reg S-P — plus a segregation-of-duties model with roles, a conflict matrix and strict or advisory enforcement.
What it does
- A git-native file layout — `agent.yaml`, `SOUL.md`, `RULES.md`, `skills/`, `tools/`, `workflows/`, `memory/`, `hooks/` — that any repository can adopt
- Adapters that export one definition to Claude Code, OpenAI Agents SDK, CrewAI, Cursor, Gemini CLI, Copilot, Codex, OpenCode, Lyzr, Nanobot and others
- Inheritance and composition: `extends` a parent agent repository, or declare versioned `dependencies` mounted as sub-agents
- Compliance as a first-class field — risk tier, frameworks, human-in-the-loop supervision, kill switch, audit logging and retention
- Segregation of duties with named roles, permissions, a conflict matrix and strict or advisory enforcement, declared in `DUTIES.md`
- `opengap run` executes an agent straight from a git repository or local directory through a chosen adapter
Getting started
Install the CLI from npm, scaffold a definition from a template, then validate and export it to whichever runtime you use.
Scaffold an agent
`init` writes the file layout. Templates run from `minimal` (agent.yaml plus SOUL.md) through `standard` and `full` to `llm-wiki`.
npx @open-gitagent/opengap init --template standardWrite the manifest
`agent.yaml` is the manifest. A minimal one needs little more than a spec version, name and description; a regulated one adds the compliance block.
spec_version: "0.1.0"
name: compliance-analyst
version: 1.0.0
description: Financial compliance analysis agent
model:
preferred: claude-opus-4-6
compliance:
risk_tier: high
frameworks: [finra, federal_reserve, sec]
supervision:
human_in_the_loop: always
kill_switch: trueValidate it
`validate` checks the definition against the spec; `--compliance` additionally checks it against the declared regulatory requirements.
opengap validate --compliance
opengap infoExport to a runtime
Pick the adapter for whatever you actually run. `system-prompt` produces a concatenated prompt that works with any LLM.
opengap export --format system-prompt
opengap export --format claude-codeOr run it directly
`run` executes an agent from a repository or directory through an adapter, optionally against a separate target workspace.
opengap run --dir ./agents/reviewer --workspace ~/code/my-app \
--adapter claude -p "Review this repository"Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Keep one agent definition under version control and run it on Claude Code, Cursor and CrewAI without maintaining three copies
- Review and diff changes to an agent's rules and skills in a pull request, the same way you review code
- Compose a team of agents from separate repositories, pinned to versions and mounted as dependencies
- Document supervision, audit logging and segregation of duties alongside the agent for a regulated deployment
How OpenGAP compares
OpenGAP alongside other open-source agent frameworks & builders tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| DeepSeek Harness | ★ 289k | DeepSeek AI's open-source agent harness (dsh), built on Cordis, where models, tools, skills, sessions, sandboxes, storage and the UI are all plugins composed through profiles. |
| AutoGPT | ★ 188k | One of the earliest autonomous agent projects, now a platform for building and running agents from reusable blocks and workflows. |
| DeerFlow | ★ 86k | ByteDance's open-source super agent harness built on LangGraph: skills, sub-agents, sandboxes, a filesystem and long-term memory for long-horizon research, coding and content tasks. |
| nanobot | ★ 50.5k | Lightweight self-hosted personal AI agent framework in Python, with a WebUI, terminal and chat-app channels, tools, long-term memory, MCP and scheduled automations. |
| LangGraph | ★ 45.6k | A library from the LangChain team for building stateful, graph-based agent workflows with explicit control over steps, memory, and human-in-the-loop checkpoints. |
| Agno | ★ 43.3k | A fast Python framework (formerly Phidata) for building agents with memory, tools, and multimodal inputs, plus a runtime for deploying them in production. |
| AgentGPT | ★ 36.3k | AgentGPT lets you name a custom AI, give it a goal, and watch it plan tasks, run them, and learn from the results, all from a web browser. |
| OpenGAP | ★ 3.2k | Define an agent as a git repository, export it anywhere |
