Local-first coding agent on Google Gemini + ADK
Project description
GemCode User Manual
This document is the primary user-facing manual for GemCode. It explains the product at a high level and points to the subsystem-specific documentation pages that provide production-grade depth.
What GemCode is
GemCode is a local-first, self-evolving coding agent built on Google Gemini and the Agent Development Kit (ADK). It operates against a chosen project root and provides:
- Autonomous multi-agent orchestration — agents delegate, verify, and fix each other's work
- Self-healing code — changes are auto-verified; failures are auto-fixed
- Self-evolving tools — the agent creates new reusable tools from repeated patterns
- Progressive learning — gets smarter with every session (memory, skills, project map)
- Scheduled habits — agents wake up on cron/interval to run tests, audits, checks
- Cross-machine agents — expose/consume agents via Google A2A protocol
- 58 built-in tools — filesystem, shell, web, search, memory, orchestration, synthesis
- Full ADK integration — native sub-agents, transfer_to_agent, output_key, workflow agents
All state lives under .gemcode/ in the project root. No external services required beyond a Gemini API key.
Runtime modes
| Mode | Purpose |
|---|---|
| One-shot CLI | Single prompt/response runs |
| REPL | Stateful terminal interaction |
| TUI | GemCode terminal UI (scrollback-style; tui/scrollback.py) |
| IDE stdio | Editor integration over JSONL stdin/stdout |
| Agent Mesh | In-process multi-agent orchestration (automatic) |
| Kaira daemon | Optional always-on background scheduler |
| A2A server | Cross-machine agent communication via Google A2A protocol |
| Live audio (experimental) | Microphone-driven Gemini Live sessions |
Recommended reading order
1. Setup and first use
2. Interactive use
3. Configuration and local assets
4. Tooling and safety model
5. Optional capability bundles
6. Integrations
7. Operations and release
8. .gemcode/ state reference
9. Architecture deep dive
Quickstart
Install
cd gemcode
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install -e ".[dev]"
Set your API key
export GOOGLE_API_KEY="your-key"
Start GemCode against a project
gemcode -C /path/to/project
One-shot run
gemcode -C /path/to/project "Explain this repository"
Mutating run
gemcode -C /path/to/project --yes "Fix the failing tests"
Essential concepts
Project root
Every GemCode run is anchored to a project root. This determines:
- what files are visible
- where
.gemcode/state is stored - what instruction files are loaded
- which repo-local assets are active
.gemcode/
GemCode stores project-local state under .gemcode/, including:
- sessions
- logs
- artifacts
- memory
- skills
- rules
- output styles
- hooks
- integration config
Reference:
Project instruction files
GemCode supports project instruction files loaded by the agent layer. The live code treats gemcode.md as the primary project instruction file and also supports legacy instruction filenames for compatibility.
Reference:
GemSkills
GemSkills are reusable prompt playbooks stored under:
.gemcode/skills/<name>/SKILL.md~/.gemcode/skills/<name>/SKILL.md
They support:
- creation
- session loading
- one-shot invocation
- iterative editing
Permissions
GemCode combines:
- workspace trust
- permission mode
- allow/deny settings
- blanket approval flags
- interactive approval prompts
Reference:
Super mode (fully autonomous)
Use when you want GemCode to run with all powers unlocked and zero friction. In super mode:
-
All capabilities auto-enable (memory, web search, agents, habits, triggers)
-
Default org members auto-create (kaira + verifier)
-
Habits auto-generate based on project type
-
Auto-verification runs after risky changes
-
No confirmation prompts for any operation
-
CLI:
gemcode -C . --super "your task" -
Env:
GEMCODE_SUPER_MODE=1 -
REPL/TUI:
/super(use/super offto clear)
In normal mode, GemCode asks on first run: "Enable autonomous mode? [Y/n]"
Details: ../docs/orchestration.md.
Common commands
Inspect models
gemcode models
Start the REPL
gemcode -C .
Attach a file to a one-shot turn
gemcode -C . --attach ./report.pdf "Summarize this"
Run the scheduler
gemcode kaira -C .
Orchestration (Agent Mesh + Multi-Agent)
GemCode includes a built-in multi-agent orchestration system that works automatically — no separate daemon required.
Key features:
- Native ADK sub-agents — org members are real ADK sub-agents with
transfer_to_agentrouting - Agent Mesh — async background execution with full GemCode sessions per agent
- Event Bus — agents communicate via pub/sub (no Unix sockets needed)
- Self-Healing — closed loop: change → verify → fix → verify → done
- Self-Triggers — agents auto-activate on events (verification, failure recovery)
- Tool Synthesis — agent creates new reusable tools from repeated patterns
- Delegation Learning — remembers which agents succeed at which tasks
- A2A Bridge — expose/consume agents across machines via Google A2A protocol
Quick example in the REPL:
> Analyze the auth module. Delegate security review to the verifier.
The LLM calls transfer_to_agent(agent_name='verifier') → ADK routes natively → verifier runs → result saved to session state.
For background work: org_delegate("kaira", "run tests") → mesh runs kaira as a full GemCode session → result flows back via fleet reports.
Docs:
Start the IDE bridge
gemcode ide --stdio
Run live audio
gemcode live-audio -C .
Status note:
live-audiois currently experimental and may fail due to upstream Gemini Live availability/reliability (for example transient1011internal errors).- Treat this as future scope for production workflows.
REPL command highlights
| Command | Purpose |
|---|---|
/help |
Command summary |
/status |
Model, capabilities, context, and runtime telemetry |
/context |
Context pressure and prompt budget telemetry |
/cost |
Token and cost estimate summary |
/attach |
Queue file attachments for the next turn |
/trust |
Manage workspace trust |
/init |
Generate project instructions |
/skills |
List skills |
/gemskill |
Load a skill into the session prompt |
/style |
Set session output style |
/rules |
Inspect active rules |
/diff |
Show current diff/checkpoint diff |
/rewind |
Restore checkpoints |
/review |
Run a parallel code review pipeline |
/eval |
Run evaluation gates |
/kaira |
Show scheduler usage help |
/super |
Super mode: auto-approve tools, no GemCode HITL · /super off |
Orchestration commands
| Command | Purpose |
|---|---|
/agent list |
Show all org members |
/agent tree |
Show org hierarchy |
/agent create |
Create a new agent member |
/agent assign <member> <task> |
Delegate work to a member |
/agent improve <member> <lessons> |
Improve a member's skill |
Intelligence features (automatic)
These work without configuration. In super mode, everything is enabled silently. In normal mode, GemCode asks once on first run.
| Feature | How it works |
|---|---|
| Codebase awareness | Builds a persistent understanding of the project from every tool call — file structure, imports/exports, recent changes, learned facts. The agent starts each turn already knowing the project. |
| Self-healing | After file changes, auto-runs tests/lint. If they fail, auto-fixes (up to 2 attempts). Closed loop: change → verify → fix → verify → done. |
| Tool synthesis | When the agent repeats multi-step operations, it can create a reusable tool (bash/python script) stored in .gemcode/synthesized_tools/. |
| Self-improving skills | When a delegation succeeds, the member's skill file gets a "Learned pattern" appended. Future invocations benefit from past successes. |
| Proactive memory | After exploring 5+ files or running 3+ commands, key discoveries are auto-saved to curated memory. Future sessions start with this knowledge. |
| Impact analysis | When a file changes, GemCode knows which other files are affected (via import tracking + learned correlations). Self-healing runs only relevant tests. |
| Auto-verification | After 3+ file writes, the verifier agent auto-checks for syntax errors, broken imports, and logic bugs. |
| Delegation suggestions | suggest_delegate(task) recommends the best agent based on historical success patterns. |
| Capability auto-enable | If a project consistently uses web search or memory, those capabilities auto-enable in future sessions. |
Tool Synthesis (self-evolving)
The agent can create new reusable tools when it detects repeated patterns:
# Create a tool
synthesize_tool("run-tests", "Run pytest with coverage", "pytest --cov=src -q")
synthesize_tool("deploy-staging", "Deploy to staging", "git push origin main && ssh staging 'cd app && git pull'")
# Use it later
run_synthesized_tool("run-tests")
run_synthesized_tool("deploy-staging")
# List all synthesized tools
list_synthesized_tools()
Tools persist in .gemcode/synthesized_tools/ across sessions.
Agent Habits (scheduled tasks)
Agents can run recurring tasks on a schedule — no daemon needed, runs inside the main GemCode process.
# From the agent (tools):
habits_add("test-watch", "kaira", "Run pytest -q and report", every_minutes=30)
habits_add("nightly-audit", "verifier", "Full security review", daily_at="02:00")
habits_add("hourly-status", "self", "Summarize recent changes", cron="0 * * * *")
# Management:
habits_list()
habits_pause("test-watch")
habits_resume("test-watch")
habits_remove("test-watch")
In super mode, GemCode auto-creates habits based on project type (test-watch for Python, lint-watch for Node).
Detailed behavior:
Capability overview
| Capability | What it adds |
|---|---|
| Codebase Awareness | Persistent understanding of the project — structure graph, change journal, insight cache. Compounds over time, zero extra cost |
| Agent Mesh | In-process multi-agent orchestration — each agent is a full GemCode session with own workspace, memory, and persistent history |
| Self-Healing | Closed loop: change → verify → fix → verify → done. Code repairs itself automatically |
| Tool Synthesis | Agent creates new reusable tools at runtime from repeated patterns |
| Agent Habits | Scheduled recurring tasks (cron/interval/daily) — agents wake up and do work autonomously |
| Self-Triggers | Agents auto-activate on events (verification after changes, failure recovery) |
| Self-Improving Skills | Skills evolve — successful patterns are appended automatically |
| Delegation Learning | Remembers which agents succeed at which tasks, suggests optimal routing |
| Proactive Memory | Auto-saves important discoveries to curated memory without being asked |
| A2A Bridge | Cross-machine agent communication via Google A2A protocol |
| Event Bus | In-memory pub/sub for agent-to-agent communication |
| Deep research | Research-focused tool routing and optional dedicated model path |
| Embeddings | Semantic search and optional embedding-backed memory |
| Memory | Retrieval-oriented persistent memory across sessions |
| Browser/computer use | Playwright-backed browser automation and inspection |
| Checkpoints | File mutations are reversible — undo any agent edit |
| Live audio | Gemini Live microphone sessions (experimental) |
Detailed behavior:
Integrations overview
| Integration | Entry point |
|---|---|
| IDE bridge | gemcode ide --stdio |
| Web/SSE | documented in docs/web-ui-contract.md |
| MCP | .gemcode/mcp.json |
| OpenAPI | .gemcode/openapi/ |
Detailed behavior:
Release and maintenance
Package version lives in:
gemcode/pyproject.toml
Release operations, troubleshooting, and PyPI workflow are documented in:
Documentation policy
This manual is intentionally concise. The detailed production documentation lives under docs/ and is organized by subsystem and operator concern so it can stay accurate as GemCode evolves.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gemcode-0.4.9.tar.gz.
File metadata
- Download URL: gemcode-0.4.9.tar.gz
- Upload date:
- Size: 355.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5f2fed5a3cc3f89b320464874c4d0d2e5e75cf2ff69a1222f74dac0b3413675
|
|
| MD5 |
2d2347576b1b317752d6adbd293424e0
|
|
| BLAKE2b-256 |
8d5a4d1a6feaec812d9183407d7e1f5d6ff57495036254f26006668265ce4cf3
|
Provenance
The following attestation bundles were made for gemcode-0.4.9.tar.gz:
Publisher:
publish-pypi.yml on Veoksha/GemCode
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gemcode-0.4.9.tar.gz -
Subject digest:
b5f2fed5a3cc3f89b320464874c4d0d2e5e75cf2ff69a1222f74dac0b3413675 - Sigstore transparency entry: 1431517176
- Sigstore integration time:
-
Permalink:
Veoksha/GemCode@4515ddf2bb612d6bdcf1d0d6009c82ceb420d7f7 -
Branch / Tag:
refs/tags/v0.4.9 - Owner: https://github.com/Veoksha
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@4515ddf2bb612d6bdcf1d0d6009c82ceb420d7f7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file gemcode-0.4.9-py3-none-any.whl.
File metadata
- Download URL: gemcode-0.4.9-py3-none-any.whl
- Upload date:
- Size: 383.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e844c56cd8cb15ae370fa3282e10a80ef40f48880c558e7adb65c554bba4476b
|
|
| MD5 |
aa2f1de2ee66d5a8c5430cc4d4273e44
|
|
| BLAKE2b-256 |
8c7e320da1292f15884d1b88c40c6dc00821d21863a729540053b3f1f4135b70
|
Provenance
The following attestation bundles were made for gemcode-0.4.9-py3-none-any.whl:
Publisher:
publish-pypi.yml on Veoksha/GemCode
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gemcode-0.4.9-py3-none-any.whl -
Subject digest:
e844c56cd8cb15ae370fa3282e10a80ef40f48880c558e7adb65c554bba4476b - Sigstore transparency entry: 1431517702
- Sigstore integration time:
-
Permalink:
Veoksha/GemCode@4515ddf2bb612d6bdcf1d0d6009c82ceb420d7f7 -
Branch / Tag:
refs/tags/v0.4.9 - Owner: https://github.com/Veoksha
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@4515ddf2bb612d6bdcf1d0d6009c82ceb420d7f7 -
Trigger Event:
push
-
Statement type: