Governed local AI agents β one Go binary, zero cloud.
Run autonomous AI agents on your machine with policy enforcement on every tool call. No cloud. No API keys. No data leaves your laptop.
Website Β· Docs Β· Roadmap Β· AgentGuard
brew tap AgentGuardHQ/tap
brew install shellforgeOr from source: git clone https://github.com/AgentGuardHQ/shellforge.git && cd shellforge && go build -o shellforge ./cmd/shellforge/
brew install ollama
ollama serve # start the model server (leave running)ollama pull qwen3:8b # 8B β good balance (needs ~6GB RAM)
# or: ollama pull qwen3:30b # 30B β best quality (needs ~19GB, M4 Pro recommended)
# or: ollama pull qwen3:1.7b # 1.7B β fastest, minimal RAMcd ~/your-project # navigate to any repo you want to work in
shellforge setup # creates agentguard.yaml + output dirsThis creates agentguard.yaml (governance policy) in your project root. Edit it to customize which actions are allowed/denied.
shellforge agent "describe what this project does"
shellforge agent "find test gaps and suggest improvements"
shellforge agent "create a hello world program"Every tool call (file reads, writes, shell commands) passes through governance before execution.
Requirements: macOS (Apple Silicon or Intel) or Linux
ShellForge is a governed agent runtime β not an agent framework, not an orchestration layer, not a prompt wrapper.
It sits between any agent driver and the real world. The agent decides what it wants to do. ShellForge decides whether it's allowed.
Agent Driver (Goose, Claude Code, Copilot CLI)
β ShellForge Governance (allow / deny / correct)
β Your Environment (files, shell, git)
The core insight: ShellForge's value is governance, not the agent loop. Goose handles local agent execution. Dagu handles workflow orchestration. ShellForge wraps them all with AgentGuard policy enforcement on every tool call.
| Layer | Project | What It Does |
|---|---|---|
| Infer | Ollama | Local LLM inference (Metal GPU on Mac) |
| Optimize | RTK | Token compression β 70-90% reduction on shell output |
| Execute | Goose | AI coding agent with native Ollama support (headless) |
| Orchestrate | Dagu | YAML DAG workflows with scheduling and web UI |
| Govern | AgentGuard | Policy enforcement on every action β allow/deny/correct |
| Sandbox | OpenShell | Kernel-level isolation (Docker on macOS) |
| Scan | DefenseClaw | Supply chain scanner β AI Bill of Materials |
shellforge status
# Ollama running (qwen3:30b loaded)
# RTK v0.4.2
# AgentGuard enforce mode (5 rules)
# Dagu connected (web UI at :8080)
# OpenShell Docker sandbox active
# DefenseClaw scanner ready| Command | Description |
|---|---|
shellforge run <driver> "prompt" |
Run a governed agent (goose, claude, copilot, codex, gemini) |
shellforge setup |
Install Ollama, create governance config, verify stack |
shellforge agent "prompt" |
Run a governed agent β every tool call checked |
shellforge qa [dir] |
QA analysis β find test gaps and issues |
shellforge report [repo] |
Generate a status report from git + logs |
shellforge serve agents.yaml |
Daemon mode β run a 24/7 agent swarm |
shellforge status |
Show ecosystem health |
shellforge version |
Print version |
ShellForge governs any CLI agent driver via AgentGuard hooks. Each driver keeps its own model and agent loop β ShellForge ensures governance is active and spawns the driver as a subprocess.
# Run any driver with governance
shellforge run claude "review this code"
shellforge run codex "generate tests"
shellforge run copilot "update docs"
shellforge run gemini "security audit"Orchestrate multiple drivers in a single Dagu DAG:
dagu start dags/multi-driver-swarm.yamlSee dags/multi-driver-swarm.yaml and dags/workspace-swarm.yaml for examples.
βββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Dagu (Orchestration) β
β YAML DAGs Β· Cron scheduling Β· Web UI Β· Retries β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β task
ββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ
β Goose (Execution Engine) β
β Agent loop Β· Tool calling Β· Ollama-native β
β Uses Ollama for inference β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β tool call
ββββββββββββͺβββββββββββ
β AgentGuard β
β Governance Kernel β
β allow Β· deny Β· auditβ
β every. single. call.β
ββββββββββββͺβββββββββββ
β approved
ββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ
β Your Environment β
β Files Β· Shell (RTK) Β· Git Β· Network β
β Sandboxed by OpenShell β
βββββββββββββββββββββββββββββββββββββββββββββββββββββ
ShellForge's core value. Every tool call passes through agentguard.yaml before execution.
# agentguard.yaml β policy-as-code for every agent action
mode: enforce # enforce | monitor
policies:
- name: no-force-push
action: deny
pattern: "git push --force"
- name: no-destructive-rm
action: deny
pattern: "rm -rf"
- name: no-secret-access
action: deny
pattern: "*.env|*id_rsa|*id_ed25519"When an action is denied, ShellForge's correction engine feeds structured feedback back to the model so it can self-correct β not just fail.
Run a 24/7 agent swarm on your Mac with memory-aware scheduling:
shellforge serve agents.yamlAuto-detects RAM, calculates max parallel Ollama slots, queues the rest.
# agents.yaml
max_parallel: 0 # 0 = auto-detect from RAM
model_ram_gb: 19 # qwen3:30b Q4
agents:
- name: qa-agent
system: "You are a QA engineer."
prompt: "Analyze the repo for test gaps."
schedule: "4h"
priority: 2
timeout: 300
enabled: trueMemory budget (qwen3:30b Q4):
| Mac | RAM | Free for KV | Max Parallel |
|---|---|---|---|
| M4 Pro 48GB | 48 GB | ~25 GB | 3-4 agents |
| M4 32GB | 32 GB | ~9 GB | 1-2 agents |
Tip: OLLAMA_KV_CACHE_TYPE=q8_0 halves KV cache memory β doubles agent capacity.
| Model | Params | RAM | Best For |
|---|---|---|---|
qwen3:1.7b |
1.7B | ~1.2 GB | Fast tasks, prototyping |
qwen3:4b |
4B | ~3 GB | Balanced reasoning |
qwen3:30b |
30B | ~19 GB | Production quality (M4 Pro 48GB) |
mistral:7b |
7B | ~5 GB | Complex analysis |
- Ollama uses Metal GPU acceleration β no CUDA needed
- KV cache quantization (
OLLAMA_KV_CACHE_TYPE=q8_0) halves memory per agent slot - OpenShell requires Docker via Colima
| Project | What It Does |
|---|---|
| AgentGuard | Governance kernel β policy enforcement for any agent driver |
| AgentGuard Cloud | SaaS dashboard β observability, session replay, compliance |
| ShellForge | Governed local agent runtime β the onramp to AgentGuard |
git checkout -b feat/my-feature
go build ./cmd/shellforge/
go test ./...See docs/roadmap.md for what's planned.