agent_gc
Health Uyari
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 6 GitHub stars
Code Gecti
- Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Gecti
- Permissions — No dangerous permissions requested
Bu listing icin henuz AI raporu yok.
Agents Garbage Collector
Agent GC
Documentation: https://dimitreee.github.io/agent_gc/
Your coding agent pays for everything it loads before you type a word: plugins, skills, MCP servers, hook output, instructions. After a year or two of trying things, that is often 50–70k tokens per session, and a lot of it is stuff you forgot you installed.
Agent GC is a small tray app for macOS and Linux that
- measures what a session start really costs, from your agent's own transcripts;
- shows where it goes: every plugin, skill, MCP server and hook, heaviest first, with notes like duplicate, not connecting, unused 30 days, loaded while disabled;
- lets you switch any of them off and back on, or everything unused for 30 days at once — nothing is deleted, every config edit is backed up first. Once you turn on automatic mode, sources unused for 30 days are switched off for you, and each one can be brought back in one step;
- quietly cleans up what agents leave behind: old temp dirs, interrupted plugin installs, orphaned MCP server processes, merged worktrees. Everything it removes stays restorable for a while (temp files a day, the rest a week; orphaned processes are paused for an hour first).
Nothing leaves your machine. No telemetry, no network calls of its own. To look around it runs git, ps and, to count their tools, your configured stdio MCP servers (a repository's .mcp.json servers only in folders you trusted in Claude Code; remote servers are never contacted). A server started through npx/uvx may download its package, as it would in your agent. Opt-in features also run your own status line command (limits), osascript/tmux to type into a session you chose (top), and launchctl/systemctl for the login service (auto on).
Supported today: Claude Code (including several installs via CLAUDE_CONFIG_DIR), Codex CLI ($CODEX_HOME: start cost from its session rollouts, AGENTS.md, skills, MCP servers switched with Codex's own enabled key, orphaned MCP helpers) and Hermes Agent ($HERMES_HOME: start cost of sessions caught at their first request, SOUL.md, skills switched through skills.disabled, MCP servers switched with Hermes' own enabled key, live sessions in agent-gc top). Cursor and Gemini CLI are next.
How it works: Agent GC: a garbage collector for what coding agents leave behind — the collector's model (roots, one mark function, a barrier, generations, a pacer), the restorable quarantine, live mode, and how it is tested.
Read the write-up on dev.to: I wrote a garbage collector for what my coding agents leave behind — the shorter, story-style version.
Install
brew install dimitreee/tap/agent-gc # CLI, macOS and Linux
brew install --cask dimitreee/tap/agent-gc-app # menu bar app, macOS
npm i -g agent-gc-cli # or try once: npx agent-gc-cli scan
curl -fsSL https://raw.githubusercontent.com/Dimitreee/agent_gc/main/install.sh | sh
Or download the latest build straight from CI:
| macOS (Apple Silicon and Intel) | AgentGC-mac.dmg |
| Linux AppImage | AgentGC-linux.AppImage |
| Linux .deb | AgentGC-linux.deb |
| CLI only, macOS | agent-gc-cli-macos.tar.gz |
| CLI only, Linux x86_64 | agent-gc-cli-linux-x86_64.tar.gz |
Every green build of main is published as a release; checksums are in SHA256SUMS.
macOS says the app can't be opened: the build is not signed with an Apple Developer ID yet. Right-click the app → Open, or run xattr -dr com.apple.quarantine "/Applications/Agent GC.app".
Linux: the tray icon needs libayatana-appindicator3-1 (pulled in by the .deb).
What it won't do without asking
- Nothing is removed or switched off until you confirm automatic mode once (Clean automatically in the app or the TUI,
agent-gc clean --yesoragent-gc auto on). - Everything is reversible: removed items stay restorable for a while (temp files a day, the rest a week), and a switched-off source can be switched back on at any time.
- It never kills an agent session, never touches agent memory and never deletes a config.
The full rules, what is cleaned and when: Automatic cleaning.
Documentation
agent-gc --help lists every command; agent-gc <command> --help explains one.
https://dimitreee.github.io/agent_gc/
- Quick start — install, see your own start cost, switch something off, in five minutes
- Start cost & context sources — what the notes mean, switching off and back on, per-installation budget
- Repository budget —
.agent-gc.toml: how many tokens a session in this repo should cost - agent-gc top — live view of running Claude Code sessions and subagents, plan limits per session, why a stalled session is stuck
- agent-gc sched — warn and stop stuck or runaway agents
- CLI reference — every command and flag
- How it works — the collector's design, safety argument and evaluation
The site's source is in site/.
Build
cd app && npm ci && npm run build && cd ..
cargo test --workspace
cd app && npm run tauri dev
Adding an agent
Each agent is one module implementing the Agent trait in crates/core/src/agent.rs: find its installs, measure start cost, list context sources, switch them, list its garbage. See crates/core/src/claude/ for the reference implementation.
License
MIT
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi