dhanji/g3
experiments in goose
What it solves
g3 lets you describe a task in plain language and have an AI agent actually carry it out inside your project — reading and editing files, running shell commands, managing TODO lists, searching code, and even driving a desktop GUI or a browser. Unlike a chat window, it operates in your terminal and workspace.
It also solves the coordination problem of running multiple agents at once: Studio gives each agent its own isolated git worktree and branch, so several agents can work on the same codebase in parallel without stepping on each other.
How it works
g3 is a Rust workspace split into focused crates:
- g3-core — the brain: conversation orchestration, tool execution, streaming response parsing, and task management.
- g3-providers — a unified interface to LLM backends: Anthropic (Claude), Databricks, and local models via llama.cpp with Metal acceleration on macOS. Includes OAuth authentication and dynamic provider selection.
- g3-config — environment-based configuration for credentials, model selection, and runtime options.
- g3-execution — task planning and decomposition, sequential or parallel strategies, retries, and progress tracking.
- g3-computer-control — experimental GUI automation: mouse and keyboard control, UI element inspection, screenshots, and OCR via Tesseract.
- g3-cli — the terminal interface: task submission, monitoring, configuration, and session management.
g3 watches its context window and manages it automatically: when usage hits thresholds (50, 60, 70, 80 percent), it thins the context by replacing large tool results with file references; at 80 percent it auto-compacts the conversation into a summary. You can also trigger these manually with control commands like /compact, /thinnify, and /skinnify.
You can run g3 in several modes: single-shot tasks, an interactive chat, an accumulative autonomous mode that builds up requirements and re-runs the agent loop, a planning mode with git integration and requirement files, and an agent mode that loads specialized personalities (e.g., carmack for code readability, hopper for testing, euler for architecture, scout for research).
Skills follow the open Agent Skills specification. Directories are scanned in priority order (embedded, then global ~/.g3/skills/, extra paths, workspace .g3/skills/, then repo skills/); a summary of each skill is injected into the system prompt, and the full SKILL.md is read only when needed. An embedded research skill runs as a background process and saves reports to .g3/research/.
Errors are handled gracefully: recoverable failures (rate limits, timeouts, network issues, server errors) are retried with exponential backoff plus jitter, while non-recoverable errors fail fast with detailed logs saved to .g3/errors/. Duplicate tool calls are prevented only when identical calls appear back-to-back without intervening text.
The README includes a performance comparison for agentic tasks: cloud models like Claude Opus 4.5 and Gemini 3 Pro score highest, while local models (Qwen3-14B, GLM-4 9B) work for simpler tasks, with some smaller/MoE models failing on tool-calling loops.
Who it's for
- Developers who want an AI assistant that operates inside their project directory and executes real commands.
- Teams that want to run several coding agents in parallel on the same repository without merge conflicts (via Studio).
- People who need offline or privacy-preserving development with local models.
- Anyone automating repetitive tasks — file manipulation, refactoring, scaffolding, data processing, API integration, documentation, and even desktop or browser automation.
Highlights
- Modular Rust architecture with clear separation of core, providers, execution, config, CLI, and computer-control crates.
- Multiple LLM providers — Anthropic, Databricks — plus local models through llama.cpp with Metal acceleration on macOS.
- Smart context management: automatic monitoring, thinning at 50/60/70/80 percent thresholds, and auto-compaction at 80 percent.
- Manual control commands:
/compact,/thinnify,/skinnify,/readme,/stats,/help. - Rich tool ecosystem: file operations, shell execution, syntax-aware code search via tree-sitter (Rust, Python, JavaScript, TypeScript, Go, Java, C, C++), TODO management, and structured output.
- Agent Skills support with the open agentskills.io format, including embedded skills that work anywhere.
- Built-in research skill that runs asynchronously in the background and produces reports.
- Eight built-in specialized agents covering readability, testing, architecture, memory, concurrency, refactoring, adversarial testing, and research.
- Studio multi-agent workspace manager using git worktrees with run/review/accept/discard workflow.
- WebDriver browser automation (headless Chrome by default, Safari as an alternative).
- Configurable retries with exponential backoff and error persistence for post-mortem analysis.
- Session logs saved automatically to
.g3/sessions/.
Related
- Project
- Project
- Project
- Project