Open Standard v0.1.0
    GitAgent

    GitAgentProtocol

    (Open GAP)

    your repository becomes your agent

    The open standard for defining, versioning, and running AI agents natively in git.

    A git-native, framework-agnostic, open standard for defining AI agents. Version-controlled config that exports to Claude Code, OpenClaw, Lyzr Agent, Chimera, NanoBot, CrewAgent, and Agents SDK.

    Maintained by team @Lyzr

    $ npx @open-gitagent/gitagent@latest run -r https://github.com/shreyas-lyzr/architect -a claude

    Runs the Git Agent Protocol, pulls the Architect agent from GitHub, and launches it as a Claude Code agent.

    Supports

    terminal
    Easy versioning
    devstagingmain
    $ tree my-agent-repository/
    my-agent-repository/
    ├── agent.yamlconfig
    ├── SOUL.mdcore
    ├── RULES.md
    ├── AGENTS.md
    ├── INSTRUCTIONS.md
    ├── scheduler.yml
    ├── skills/capability
    │ └── code-review/
    │ └── SKILL.md
    ├── tools/capability
    │ └── search.yaml
    ├── knowledge/
    │ └── index.yaml
    ├── memory/
    │ ├── MEMORY.md
    │ └── runtime/live
    │ ├── dailylog.md
    │ ├── key-decisions.md
    │ └── context.md
    ├── hooks/
    │ ├── hooks.yaml
    │ ├── bootstrap.md
    │ └── teardown.md
    ├── skillflows/automation
    │ └── code-review-flow.yaml
    └── compliance/governance
    └── regulatory-map.yaml

    AI Agent Design Patterns Built on Git

    A gitagent is your git repository as an agent — complete with version control, branching, pull requests, and collaboration built in. These are the architectural patterns that emerge when you define agents as git-native file systems.

    Human-in-the-Loop for RL Agents

    When an agent learns a new skill or writes to memory, it can open a branch + PR for human review before merging.

    Human-in-the-Loop for RL Agents: agents create branches and PRs for human review before updating memory or skills
    LLM Wiki — Persistent Knowledge Base

    Instead of RAG that rediscovers knowledge on every query, the LLM incrementally builds a wiki from raw sources in knowledge/. Compiled pages live in memory/wiki/ with cross-references, an index.md catalog, and a chronological log.md. Three skills — ingest, query, lint — maintain the knowledge base over time. Inspired by Karpathy's LLM Wiki pattern. Scaffold with gitagent init --template llm-wiki.

    LLM Wiki: raw sources in knowledge/ compiled into interlinked wiki pages in memory/wiki/ via ingest, query, and lint skills
    Agent Versioning

    Every change to your agent is a git commit. Roll back broken prompts, revert bad skills, and explore past versions — full undo history for your agent, powered by git.

    Agent Versioning: git commit history showing agent changes that can be reverted
    Live Agent Memory

    The memory/ folder holds a runtime/ subfolder where agents write live knowledge — dailylog.md, key-decisions.md, and context.md — persisting execution state across sessions.

    Live Agent Memory: memory/ folder with runtime logs, key decisions, and context files
    SkillsFlow

    Deterministic, multi-step workflows defined in workflows/ as YAML. Chain skill:, agent:, and tool: steps with depends_on ordering, ${{ }} template data flow, and per-step prompt: overrides.

    SkillsFlow: deterministic multi-step workflows chaining skills, agents, and tools via YAML with template data flow
    Stateless Compute, Git as State

    The VM is stateless. Git is the state. Agents run in ephemeral compute, committing every meaningful event — bootstrap, execute, checkpoint, teardown — to a runtime/<date>/<job-id> branch. Full audit trail, deterministic replay, and failure recovery — all from git history.

    Stateless Compute: ephemeral VMs commit every event to git runtime branches for audit and recovery
    Shared Context & Skills via Monorepo

    Anything placed at the root — context.md, skills/, tools/ — is automatically shared across every agent in the monorepo. No duplication, one source of truth.

    Shared Context: root-level context.md, skills/, tools/, and knowledge/ inherited by all agents
    Branch-based Deployment

    Use git branches to promote agent changes through environments — just like shipping software.

    Branch-based Deployment: dev, staging, and main branches for promoting agent changes
    Knowledge Tree

    The knowledge/ folder stores entity relationships as a hierarchical knowledge tree + embeddings — letting agents reason over structured data at runtime.

    Knowledge Tree: the knowledge/ folder stores entity relationships as a directory tree with embeddings
    Agent Forking & Remixing

    Fork any public agent repo, customize its SOUL.md, add your own skills, and PR improvements back upstream — open-source collaboration for AI agents.

    Agent Forking & Remixing: fork an agent, customize it, and contribute back via pull request
    CI/CD for Agents

    Run gitagent validate on every push via GitHub Actions. Test agent behavior in CI, block bad merges, and auto-deploy to production — treat agent quality like code quality.

    CI/CD for Agents: GitHub Actions pipeline with validate, test, merge, and deploy stages
    Agent Diff & Audit Trail

    git diff shows exactly what changed between agent versions. git blame traces every line to who wrote it and when — full traceability out of the box.

    Agent Diff & Audit Trail: git diff and git blame showing full traceability of agent changes
    Tagged Releases

    Tag stable agent versions like v1.1.0. Pin production to a tag, canary new versions on staging, and roll back instantly if something breaks.

    Tagged Releases: git timeline with version tags, production and staging pointers, and instant rollback
    Secret Management via .gitignore

    Agent tools that need API keys or credentials read from a local .env file — kept out of version control via .gitignore. Agent config is shareable, secrets stay local.

    Secret Management: version-controlled agent config separated from ignored .env and credentials
    Agent Lifecycle with Hooks

    Define bootstrap.md and teardown.md in the hooks/ folder to control what an agent does when it starts up and what it should do before it stops — injecting lifecycle logic at key points.

    Agent Automation Hooks: hooks/ folder with bootstrap.md and teardown.md for agent lifecycle events
    Segregation of Duties (SOD)

    No single agent should control a critical process end-to-end. Define roles (maker, checker, executor, auditor) in agent.yaml + DUTIES.md with conflict matrices and handoff rules — gitagent validate catches violations before deployment.

    Segregation of Duties: conflict matrix with maker, checker, executor, auditor roles and DUTIES.md policy

    Why GitAgent: The Git-Native AI Agent Standard

    Everything your agent needs, defined in files you already know how to manage.

    Git-Native

    Version control, branching, diffing, and collaboration built in. Your agent definition is just files in a repo.

    Framework-Agnostic

    Works with Claude Code, OpenAI, CrewAI, LangChain, and more. Define once, export anywhere.

    Compliance-Ready

    First-class FINRA, SEC, and Federal Reserve support. Audit logging, supervision, and model risk management.

    Composable

    Skills, tools, sub-agents, and workflows. Agents can extend, depend on, and delegate to each other.

    How the GitAgent Agent Framework Works

    Three files define your agent. Everything else is optional.

    spec_version: "0.1.0"
    name: code-review-agent
    version: 1.0.0
    description: Automated code review agent
    author: gitagent-examples
    license: MIT
    model:
      preferred: claude-sonnet-4-5-20250929
      fallback:
        - claude-haiku-4-5-20251001
      constraints:
        temperature: 0.2
        max_tokens: 4096
    skills:
      - code-review
    tools:
      - lint-check
      - complexity-analysis
    runtime:
      max_turns: 20
      timeout: 120

    Run AI Agents from Git

    Clone any agent repo and run it instantly. One command — no setup, no config files to copy.

    terminal
    $ gitagent run -r "https://github.com/shreyaskapale/shreyas-agent" -a claude
    Clones the repo (cached at ~/.gitagent/cache/)
    Reads agent.yaml + SOUL.md + skills
    Launches Claude Code with the agent's full identity
    -b developspecific branch--refreshforce re-clone-p "Review my code"one-shot prompt-a gitauto-detect adapter

    Export to Any AI Framework

    One agent definition. Every framework.

    Claude Code

    Export to CLAUDE.md with skills, model hints, and compliance.

    $ gitagent export -f claude-code
    OpenAI Agents SDK

    Generate Python code with Agent(), Tool stubs, and type mappings.

    $ gitagent export -f openai
    CrewAI

    YAML crew config with role/goal extraction and sub-agent mapping.

    $ gitagent export -f crewai
    OpenClaw

    Workspace with config JSON, AGENTS.md, tools, and skills.

    $ gitagent export -f openclaw
    Nanobot

    Config JSON + system prompt for Nanobot runtime.

    $ gitagent export -f nanobot
    Lyzr Studio

    API payload with provider mapping and credential IDs.

    $ gitagent export -f lyzr
    GitHub Models

    Chat completions payload with model namespace mapping.

    $ gitagent export -f github
    System Prompt

    Single concatenated markdown for any LLM.

    $ gitagent export -f system-prompt

    Git Agent Protocol: Build & Run AI Agents

    Everything you need to build, validate, run, and ship agents.

    init
    $ gitagent init --template <minimal|standard|full>

    Templates: minimal (2 files), standard (skills + tools), full (compliance + hooks + memory)

    validate
    $ gitagent validate --compliance

    JSON schema validation, skill checks, and optional regulatory compliance audit

    run
    $ gitagent run -a <adapter> -p "prompt"

    Adapters: claude, openai, crewai, openclaw, nanobot, lyzr, github, git (auto-detect)

    export
    $ gitagent export --format <format> -o output

    Formats: system-prompt, claude-code, openai, crewai, openclaw, nanobot, lyzr, github

    import
    $ gitagent import --from <format> <path>

    Convert existing agent configs into gitagent format

    install
    $ gitagent install

    Shallow-clones dependencies at specified versions into mount paths

    skills
    $ gitagent skills search "code review"

    Registries: SkillsMP marketplace, GitHub repos, local filesystem

    audit
    $ gitagent audit

    FINRA 3110, SEC 17a-4, SR 11-7, CFPB checks with pass/fail/warn indicators

    info
    $ gitagent info

    Shows config, model, skills, tools, compliance, and SOUL.md preview

    lyzr
    $ gitagent lyzr run -r <repo> -p "Hello"

    One command: clone → create agent on Lyzr → chat. Saves agent ID for reuse

    Framework Adapters: One Standard, Every Runtime

    One agent definition. Eight runtime targets.

    Claude Codeclaude
    ModeInteractive / one-shot
    ReqClaude Code CLI
    Append system promptSub-agentsHook mappingPermission modes
    OpenAI Agents SDKopenai
    ModeOne-shot
    ReqOPENAI_API_KEY, Python 3
    Auto-generated Python codeTool function stubsType mappings
    CrewAIcrewai
    ModeOne-shot
    ReqCrewAI CLI
    YAML config exportRole/goal extractionSub-agent mapping
    OpenClawopenclaw
    ModeOne-shot
    ReqANTHROPIC_API_KEY, OpenClaw CLI
    Auto-provision authWorkspace generationHITL → thinking=high
    Nanobotnanobot
    ModeInteractive / one-shot
    ReqANTHROPIC_API_KEY, Nanobot CLI
    Auto-provision authConfig + system promptEnvironment variables
    Lyzr Studiolyzr
    ModeOne-shot
    ReqLYZR_API_KEY
    REST API deploymentAgent ID persistenceProvider auto-mapping
    GitHub Modelsgithub
    ModeOne-shot (streaming)
    ReqGITHUB_TOKEN (models:read)
    Model namespace mappingStreaming responsesMulti-provider support
    Git (Auto-Detect)git
    ModeAuto
    ReqDepends on detected adapter
    .gitagent_adapter hintModel-based detectionFile-based fallback

    AI Agent Skills System

    Reusable capability modules following the Agent Skills standard.

    SKILL.md Format

    ---
    name: code-review
    description: Thorough code reviews
    license: MIT
    compatibility: ">=0.1.0"
    allowed-tools: Read Edit Grep Glob Bash
    metadata:
      author: "Jane Doe"
      version: "1.0.0"
      category: "developer-tools"
    ---
    
    # Instructions
    
    Review the code for:
    1. Security vulnerabilities
    2. Performance issues
    3. Code style consistency

    Discovery Priority

    1<agent>/skills/Agent-local
    2<agent>/.agents/skills/agentskills.io
    3<agent>/.claude/skills/Claude Code
    4<agent>/.github/skills/GitHub
    5~/.agents/skills/Personal (global)

    Skill CLI

    Search SkillsMP or GitHub
    $ gitagent skills search "code review"
    Install to global or local
    $ gitagent skills install code-review --global
    List discovered skills
    $ gitagent skills list
    Inspect skill metadata
    $ gitagent skills info code-review

    Registries

    SkillsMPREST API marketplace
    GitHubSparse clone from repos
    LocalFilesystem path copy

    SkillsFlow

    Deterministic, multi-step workflows that chain skills together via YAML in workflows/.

    workflow
    name: code-review-flow
    description: Full code review pipeline
    triggers:
      - pull_request
    
    steps:
      lint:
        skill: static-analysis
        inputs:
          path: ${{ trigger.changed_files }}
    
      review:
        agent: code-reviewer
        depends_on: [lint]
        prompt: |
          Focus on security and performance.
          Flag any use of eval() or raw SQL.
        inputs:
          findings: ${{ steps.lint.outputs.issues }}
    
      test:
        tool: bash
        depends_on: [lint]
        inputs:
          command: "npm test -- --coverage"
    
      report:
        skill: review-summary
        depends_on: [review, test]
        conditions:
          - ${{ steps.review.outputs.severity != 'none' }}
        inputs:
          review: ${{ steps.review.outputs.comments }}
          coverage: ${{ steps.test.outputs.report }}
    
    error_handling:
      on_failure: notify
      channel: "#eng-reviews"

    Key Concepts

    Deterministic Execution

    Skills run in declared order, not LLM discretion. Every run follows the same path.

    Data Flow via Templates

    Chain outputs to inputs with ${{ steps.X.outputs.Y }} template syntax.

    Per-Step Prompting

    Add extra context per step with the prompt: field — guide the agent without changing the skill.

    Mixed Step Types

    Combine skill:, agent:, and tool: steps in a single flow for maximum flexibility.

    Execution Pipeline

    1lintskill
    2reviewagent
    3testtool
    4reportskill

    AI Agent Compliance & Governance

    First-class regulatory support baked into the manifest. Run gitagent audit for a full report.

    Risk Tiers

    LowMinimal — standard logging
    StandardAudit logging recommended
    HighHITL required, audit logging, compliance artifacts
    CriticalKill switch, immutable logs, quarterly validation

    Compliance Artifacts

    compliance/
    ├── risk-assessment.md
    ├── regulatory-map.yaml
    └── validation-schedule.yaml

    Regulatory Frameworks

    FINRARule 3110, 4511, 2210

    Supervisor assignment, HITL, escalation, retention (6y+), fair/balanced comms

    Federal ReserveSR 11-7, SR 23-4

    Model inventory, validation cadence, ongoing monitoring, vendor due diligence

    SECReg S-P, 17a-4

    Audit logging, PII handling, retention (3y+)

    CFPBCircular 2022-03

    Bias testing, fair lending analysis

    Frequently Asked Questions

    Common questions about the GitAgent open AI agent standard.

    Quick Start: Define Your First AI Agent

    Seven commands from install to deploy.

    terminal
    $ npm install -g gitagent # Install the CLI
    $ gitagent init --template standard # Scaffold an agent
    $ gitagent validate # Check it's valid
    $ gitagent run -d ./my-agent # Run with Claude Code
    $ gitagent run -a github -p "Review" # Run with GitHub Models
    $ gitagent export --format openai # Export for OpenAI SDK
    $ gitagent run -r <repo> -a claude # Run with Claude Code