agent-kit
Toolkit for CLI tools integrating with AI agent loops.
agent-kit provides shared infrastructure so CLI tools can install skill definitions, detect agent environments, coordinate across sessions, and integrate cleanly with any AI coding assistant — Claude Code, Codex, OpenCode, Pi, Grok, or plain API calls.
Features
- Skill Management — Install, check, and uninstall SKILL.md files for agent environments
- Environment Detection — Auto-detect Claude Code, OpenCode, Codex, or generic environments
- Hook System (
hooksfeature) — File-based event coordination between multiple agent sessionsHookRegistry— fire/poll/gc events in.agent-doc/hooks/directoriesHookTransporttrait — abstract delivery (file, Unix socket, chain)FileTransport— JSON file events, always availableSocketTransport— Unix domain socket delivery with ack protocolChainTransport— try transports in order until one succeeds
- Instruction Audit (
auditfeature) — Validate instruction files viainstruction-filescrate
Usage
Add to your Cargo.toml:
[]
= "0.3"
# Optional features:
# agent-kit = { version = "0.3", features = ["hooks"] }
# agent-kit = { version = "0.3", features = ["audit"] }
Skill Management
Bundle a SKILL.md in your crate and use SkillConfig to manage installation:
use SkillConfig;
const BUNDLED_SKILL: &str = include_str!;
const VERSION: &str = env!;
Hook System
Coordinate multiple agent sessions via file-based events:
use ;
let registry = new;
// Fire an event
registry.fire?;
// Poll for events
let events = registry.poll?;
// Deliver via transport chain (socket first, file fallback)
let transport = new;
registry.fire_and_deliver?;
Roadmap
- Structured output for agents (
--agent-outputflag support) - Context injection (CLAUDE.md / AGENTS.md management)
- MCP tool description generation
- MCP transport for hook delivery
License
MIT