Skip to content

ninemindai/agentgem

Repository files navigation

AgentGem — your agent works locally. Gem it.

npm version CI MIT license Node version Built on AgentBack MCP-native

Watch the 60-second AgentGem reel — your agent works locally, Gem it.
▶  Watch the 60-second reel

A local web UI that introspects your coding-agent config, redacts secrets at capture, and builds a portable, composable Gem.

agentgem.ninemind.ai · browse the public marketplace at app.agentgem.ai (early testbed — hosted data may be reset)

AgentGem reads your coding-agent config — skills, MCP servers, and CLAUDE.mdredacts secrets the moment they're read, and produces a Gem: a manifest + lock archive you can publish to a GitHub-backed registry, merge with other Gems, and deploy to several targets. A browser can't read ~/.claude (it's sandboxed), so AgentGem runs a small server on your machine; secrets never leave your device — what crosses any boundary is a config shape with <redacted> in place of every sensitive value.

Built on AgentBack, ninemind's AI-native API/MCP framework: every operation is defined once as a Zod contract and exposed as a REST endpoint, an MCP tool, and an OpenAPI 3.1 document — so the web page and your local agent call exactly the same thing.

What it provides

  • Secret-safe capture — redaction by value and by key name, before anything reaches a REST response, an MCP result, the live preview, or the built Gem.
  • A neutral Gem source — a manifest + lock archive that isn't tied to any runtime. Build once; install into a local testbed, merge, publish, or compile to a target without re-reading raw config.
  • Composition — the manifest/lock split lets small, focused Gems be reconciled into larger agents with a single re-resolved lock, not a pile of overlapping config.
  • Workflow-aware recommendationsAnalyze scans your agent's session history to see which skills, MCP servers, and hooks you actually use, and suggests ready-to-build Gems grouped by recurring workflow. It also distills brand-new draft skills from the procedures you repeat by hand — review them and fold them straight into a Gem.
  • Cross-session recallRecall searches across every past session by what happened inside it (an instant, local, secret-scrubbed index), then lets you chat with or extract across the ones that matter. The same intelligence is the agentgem-goldmine MCP server, so any coding agent can query your history.
  • Context-hygiene detectioncontext hygiene grades each session for context bloat with LLM-free detectors, marks a deterministic "cut here at turn N", and — via agentgem warm --watch --nudge — raises a live OS notification when a running session's context gets heavy.
  • Chat, and PlayChat with a local coding agent from inside the console and distill the conversation into a Gem; Play builds AI-generated mini-games, sealed to run anywhere and versioned as first-class game Gems.
  • Deploy targets — Eve and OpenAI Sandbox (code-gen), Flue (materialize, deployable to Cloudflare), and Bedrock AgentCore (managed backend); code-gen targets share a common compose step.
  • Agent-to-agent (A2A) — export a Gem as an A2A Agent Card or a runnable A2A server so other agents can discover and call it.
  • A native desktop app — a macOS/Windows/Linux build alongside the npx CLI, hosting the same local server in its own window.
  • A GitHub-backed registry + public marketplace — publish, resolve, merge, and install composable Gems over the same archive format, and browse published Gems and curated skills at app.agentgem.ai — star, review, preview, and copy an install command. The hosted marketplace is an early testbed: treat it as a preview, and expect accounts, stars, and reviews to be reset occasionally.
  • Registry-free sharing & identityagentgem get installs a published Gem with one command; agentgem send / receive pass one directly over an encrypted, one-time hand-off; agentgem bind ties a GitHub identity to this machine's signing key; agentgem verify checks a Gem runs across your local agents.
  • An agent-native path — every operation is also an MCP tool, so your local agent can build Gems over /mcp with no browser involved.

A tour of the console

Recall — a search box over every past session, with project, agent, and time-window filters and a selection bar with 'Chat with these' and 'Extract across these' exits

Recall — search across every past session by what happened inside it, then chat with or extract across the ones that matter.

A session's context timeline — an SVG bloat curve with skill and subagent markers, a 'bounded' hygiene verdict, a biggest-context-jumps rail, a process-quality bar, and a Map/Transcript toggle

Context hygiene — a per-session bloat timeline, the biggest context jumps, and a deterministic "cut here at turn N".

The Play Arcade — a grid of AI-generated mini-games, each a live click-through thumbnail with a genre tag and an offline or live-capability pill

Play — AI-generated mini-games, built by chatting and sealed to run anywhere, each a first-class game Gem.

The Chat tab — an agent dropdown for Claude Code, a 'Start in' launcher toggling between Neutral and a project, and a message box

Chat — drive a local coding agent grounded in your transcripts, then distill the conversation into a Gem.

Quickstart

Needs Node.js ≥ 24. From the directory of the agent project you want to package, run it without installing:

npx @ninemind/agentgem         # npm
pnpm dlx @ninemind/agentgem    # pnpm
agentgem listening at http://127.0.0.1:4317
  UI:       http://127.0.0.1:4317/
  API:      http://127.0.0.1:4317/api/inventory  ·  POST http://127.0.0.1:4317/api/gem
  Explorer: http://127.0.0.1:4317/explorer/
  MCP:      http://127.0.0.1:4317/mcp

Open http://127.0.0.1:4317/, then:

  1. Open a testbed — click Create / open testbed…. AgentGem detects the project you launched from (it has a .claude/.codex) and also lists ones from your Claude/Codex session history. Pick it and click Use this.
  2. Pick artifacts — the project's skills / MCP servers / CLAUDE.md show on the left; Import from machine… pulls in global ones. Tick what you want, name the Gem.
  3. Watch it seal — the live gem.json renders with every secret as <redacted>. Download it — that archive is what every target and the registry consume.

The AgentGem Gem Builder: selected skills and MCP servers on the left, the live gem.json on the right with every secret shown as <redacted>

Prefer a persistent command? Install it globally:

npm install -g @ninemind/agentgem     # npm
pnpm add -g @ninemind/agentgem        # pnpm
agentgem --port 8080                  # honors $PORT; append ?dir=/path/to/.claude for another config
Path What it is
/ The Gem Builder web UI
/explorer Swagger UI for the REST API (from the OpenAPI document)
/mcp The MCP endpoint — the same contract, for your agent

From source

To hack on AgentGem, clone the repo. It's a pnpm project (npm works too), and AgentBack uses legacy decorators, so it builds with tsc then runs dist/:

pnpm install     # or: npm install
pnpm dev         # or: npm run dev   — build + start in one step
pnpm test        # or: npm test      — tsc -b && vitest run, against compiled dist/
pnpm clean       # or: npm run clean — rm -rf dist *.tsbuildinfo (run before re-testing after moves)

See CONTRIBUTING.md for the full workflow.

Desktop app

Prefer a double-click app over the CLI? AgentGem ships a native desktop build for macOS, Windows, and Linux — download it from Releases (a desktop-v* build). It hosts the same local server in its own window, adds a native folder picker, app menu, and system tray, and never sends secrets off your machine.

The builds are currently unsigned: on macOS right-click → Open, on Windows choose More info → Run anyway the first time.

To run or package it from source, see the desktop guide — in short, pnpm -C desktop dev to run, pnpm -C desktop dist to build installers.

Layering

Depends on AgentBack: @agentback/core (lifecycle), @agentback/rest + @agentback/rest-explorer (HTTP + Swagger UI), @agentback/mcp + @agentback/mcp-http (MCP over HTTP), and @agentback/openapi (the OpenAPI 3.1 document). The web UI, the REST API, and the MCP endpoint are three boundaries over one set of Zod contracts — src/index.ts wires them onto a single RestApplication.

For deeper reference, see docs/: getting started · desktop app · analyze · concepts · targets & deploy · GitHub App · A2A · registry.

License

MIT © ninemind.ai

About

Own the goldmine of how you get AI to deliver. AgentGem distills your coding-agent sessions into portable, composable Gems — remix and deploy across any harness. Secrets redacted at capture.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

23 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors