A universal git-native multimodal always learning AI Agent (TinyHuman)
$git clone https://github.com/open-gitagent/gitagentInstalls into the current project.
Install gitagent by running `git clone https://github.com/open-gitagent/gitagent`, then use it for the current task and follow its documentation at https://github.com/open-gitagent/gitagent.
| 1 | <p align="center"> |
| 2 | <img src="./gitagent-logo.png" alt="GitAgent Logo" width="200" /> |
| 3 | </p> |
| 4 | |
| 5 | <p align="center"> |
| 6 | <img src="https://img.shields.io/npm/v/gitagent?style=flat-square&color=blue" alt="npm version" /> |
| 7 | <img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen?style=flat-square" alt="node version" /> |
| 8 | <img src="https://img.shields.io/github/license/open-gitagent/gitagent?style=flat-square" alt="license" /> |
| 9 | <img src="https://img.shields.io/badge/TypeScript-5.7-blue?style=flat-square&logo=typescript&logoColor=white" alt="typescript" /> |
| 10 | </p> |
| 11 | |
| 12 | <h1 align="center">Gitagent</h1> |
| 13 | |
| 14 | <p align="center"> |
| 15 | <strong>A universal git-native multimodal always learning AI Agent (TinyHuman)</strong><br/> |
| 16 | Your agent lives inside a git repo — identity, rules, memory, tools, and skills are all version-controlled files. |
| 17 | </p> |
| 18 | |
| 19 | <p align="center"> |
| 20 | <a href="#one-command-install">Install</a> • |
| 21 | <a href="#quick-start">Quick Start</a> • |
| 22 | <a href="#sdk">SDK</a> • |
| 23 | <a href="#architecture">Architecture</a> • |
| 24 | <a href="#tools">Tools</a> • |
| 25 | <a href="#hooks">Hooks</a> • |
| 26 | <a href="#skills">Skills</a> • |
| 27 | <a href="#plugins">Plugins</a> |
| 28 | </p> |
| 29 | |
| 30 | --- |
| 31 | |
| 32 | ## Why Gitagent? |
| 33 | |
| 34 | Most agent frameworks treat configuration as code scattered across your application. Gitagent flips this — **your agent IS a git repository**: |
| 35 | |
| 36 | - **`agent.yaml`** — model, tools, runtime config |
| 37 | - **`SOUL.md`** — personality and identity |
| 38 | - **`RULES.md`** — behavioral constraints |
| 39 | - **`memory/`** — git-committed memory with full history |
| 40 | - **`tools/`** — declarative YAML tool definitions |
| 41 | - **`skills/`** — composable skill modules |
| 42 | - **`hooks/`** — lifecycle hooks (script or programmatic) |
| 43 | |
| 44 | Fork an agent. Branch a personality. `git log` your agent's memory. Diff its rules. This is **agents as repos**. |
| 45 | |
| 46 | ## One-Command Install |
| 47 | |
| 48 | Copy, paste, run. That's it — no cloning, no manual setup. The installer handles everything: |
| 49 | |
| 50 | ```bash |
| 51 | bash <(curl -fsSL "https://raw.githubusercontent.com/open-gitagent/gitagent/main/install.sh?$(date +%s)") |
| 52 | ``` |
| 53 | |
| 54 | This will: |
| 55 | - Install gitagent globally via npm |
| 56 | - Walk you through API key setup (Quick or Advanced mode) |
| 57 | - Launch the voice UI in your browser at `http://localhost:3333` |
| 58 | |
| 59 | > **Requirements:** Node.js 18+, npm, git |
| 60 | |
| 61 | ### Or install manually: |
| 62 | |
| 63 | ```bash |
| 64 | # Slim CLI + SDK (recommended in sandboxed/CI environments where supply-chain |
| 65 | # scanners reject larger bundles) |
| 66 | npm install -g @open-gitagent/gitagent |
| 67 | |
| 68 | # Add voice mode + web UI (the same web UI install.sh launches at :3333) |
| 69 | npm install -g @open-gitagent/voice |
| 70 | ``` |
| 71 | |
| 72 | `install.sh` installs both packages by default. Set `GITAGENT_SLIM=1` before |
| 73 | the curl-bash to skip voice. |
| 74 | |
| 75 | ## Migrating from 1.x → 2.0 |
| 76 | |
| 77 | Voice mode lives in `@open-gitagent/voice` now. The reason: as a single bundle, |
| 78 | the package was being blocked by some supply-chain scanners that flagged its |
| 79 | 3,800-line `dist/voice/ui.html` and the unused `baileys` dependency. Splitting |
| 80 | voice out drops the slim-core tarball from ~180 kB to ~85 kB and removes the |
| 81 | scanner triggers entirely. |
| 82 | |
| 83 | ```bash |
| 84 | # If you were on v1.x and used voice: |
| 85 | npm install -g @open-gitagent/gitagent@latest @open-gitagent/voice |
| 86 | |
| 87 | # If you only use the SDK / non-voice CLI: |
| 88 | npm install -g @open-gitagent/gitagent@latest |
| 89 | ``` |
| 90 | |
| 91 | The `gitagent` command and `@open-gitagent/gitagent` SDK exports are unchanged. |
| 92 | `gitagent --voice` dynamically loads `@open-gitagent/voice`; without it |
| 93 | installed, it prints a one-line install hint and exits cleanly. |
| 94 | |
| 95 | ## Quick Start |
| 96 | |
| 97 | **Run your first agent in one line:** |
| 98 | |
| 99 | ```bash |
| 100 | export OPENAI_API_KEY="sk-..." |
| 101 | gitagent --dir ~/my-project "Explain this project and suggest improvements" |
| 102 | ``` |
| 103 | |
| 104 | That's it. Gitagent auto-scaffolds everything on first run — `agent.yaml`, `SOUL.md`, `memory/` — and drops you into the agent. |
| 105 | |
| 106 | ### Local Repo Mode |
| 107 | |
| 108 | Clone a GitHub repo, run an agent on it, auto-commit and push to a session branch: |
| 109 | |
| 110 | ```bash |
| 111 | gitagent --repo https://github.com/org/repo --pat ghp_xxx "Fix the login bug" |
| 112 | ``` |
| 113 | |
| 114 | Resume an existing session: |
| 115 | |
| 116 | ```b |