# 🧰 @pacphi/agentic-kit [![CI](https://github.com/pacphi/agentic-kit/actions/workflows/ci.yml/badge.svg)](https://github.com/pacphi/agentic-kit/actions/workflows/ci.yml) [![npm version](https://img.shields.io/npm/v/@pacphi/agentic-kit/next?label=npm%40next)](https://www.npmjs.com/package/@pacphi/agentic-kit) [![node](https://img.shields.io/node/v/@pacphi/agentic-kit)](https://nodejs.org) [![license: MIT](https://img.shields.io/npm/l/@pacphi/agentic-kit)](LICENSE) [![explainer](https://img.shields.io/badge/explainer-read_the_field_manual-C9581D)](https://pacphi.github.io/agentic-kit/) **One npm package that installs, repairs, and checks [ruflo](https://github.com/ruvnet/ruflo) (claude-flow), its compatible browser executor, and [agentic-qe](https://github.com/proffesor-for-testing/agentic-qe), grounds them in *RuvNet Brain* β€” an offline, source-cited knowledge base over the rUv stack β€” and wires Claude Code + Codex (+ opencode) through one configurable activity-routing policy. macOS Β· Linux Β· Windows.** ```bash npm install -g @pacphi/agentic-kit@next # alpha channel until 4.0.0 GA ak setup # once per machine; run inside a git repo to set that project up too ak setup --codex # …or bring up Claude + Codex together in one shot ak setup --opencode # …and wire ruflo + ruvnet-brain into opencode (third host) ``` > [!IMPORTANT] > That's the only package you install by hand β€” **you do not need to install ruflo or > agentic-qe yourself.** `ak setup` installs them globally for you (building natives past > npm β‰₯11.17's `allow-scripts` gate), then runs scoped repair and verification checks. `npm install -g` is the recommended interactive install, but it is not the only way to run the package. Local dependencies, `npm exec`/`npx`, verified tarballs, Git revisions, and contributor links have different package footprints while `ak setup` retains the same machine/user/project effects. See [Installation and scope](docs/installation.md) before choosing a non-global method or deploying on a shared machine. Want to try it before installing anything locally? Open this repo in GitHub Codespaces (or any [dev container](https://containers.dev)-compatible tool) β€” a "try the published release" configuration installs `ak` into a disposable container for you. See [docs/devcontainers.md](https://github.com/pacphi/agentic-kit/blob/main/docs/devcontainers.md). **What you get:** - **One command** installs, repairs, and checks ruflo & agentic-qe β€” native SQLite, memory, security, statusline (past npm's `allow-scripts` gate). - **Source-grounded knowledge:** *RuvNet Brain* β€” an offline knowledge base over the rUv stack β€” powers the `search_ruvnet` MCP tool, so answers about ruflo/AgentDB/RVF/SPARC cite real source instead of stale training priors. - **Multi-host execution (optional):** Claude, Codex, and opt-in OpenCode can share one activity policy; `ak run` is the canonical executor, while `ak setup --codex` enables the subscription-backed Claude/Codex defaults. - **Self-healing:** `ak sync` re-converges after every upgrade; `ak status` and a local dashboard report observed state and explicit evidence gaps. - **Managed ruflo components:** ak applies and reports ruflo's opt-in agent pickers, MCP tool governance, learning profile, and promotional funnel β€” see [Managed ruflo components](docs/managed-tools.md#managed-ruflo-components). - **Scoped verification:** `ak status --refresh=live` exercises named paths against real CLIs and reports their results; `ak status` shows each remembered result with its age, and a plain `--refresh=live` runs the quick, free subset first, while `--only CHECK` names one check (including a slow proof) directly. Registration, configuration, and one passing probe do not establish every capability or every running session. - Cross-platform, **zero runtime dependencies** (SQLite embedded). ## Hosts, providers, and bindings A **host** is the agent CLI driving a session (Claude Code, Codex CLI, or OpenCode). A **provider** serves inference (Anthropic, OpenAI, OpenRouter, or Ollama). A **projection** is a native configuration surface, and an **observability source** supplies transcript, usage, quota, or catalogue evidence. A **binding** connects a host to a provider through a supported projection and transport. Those axes do not imply one another. OpenRouter is a provider behind a host, not another host. Ollama can have independent bindings through Claude and Codex. Built-in OpenCode is an opt-in, explicitly routable host through `ak run`, but it is not primary and has no built-in AQE provider identity. Provider, model, and billing claims state whether they are observed, configured, inferred, or unknown. Design record: [docs/adr/0016-capability-driven-integration-adapters.md](https://github.com/pacphi/agentic-kit/blob/main/docs/adr/0016-capability-driven-integration-adapters.md). For a capability-by-capability comparison of Claude, Codex, and OpenCode across Ruflo, agentic-qe, and RuvNet Brainβ€”including current limitations and upstream issuesβ€”see [Host support](docs/host-support.md). ## Why this exists ruflo promises persistent memory, self-learning, security scanning, and background workers for Claude Code. In practice, a stock install drifts into quietly broken states: native SQLite bindings get dropped by npm upgrades (memory writes vanish while printing "OK"), packages the CLI still imports stop shipping ([#2670](https://github.com/ruvnet/ruflo/issues/2670) left prompt-injection defense silently dead), pattern stores corrupt on interrupted writes, statuslines regenerate without telling you what's actually on, and background daemons used to burn tokens unsupervised. Upstream fixes land steadily β€” this kit's job is the *gap*: detect drift, converge to a healthy state, and **prove it** rather than assume it. The full investigative history behind each guard (with filed upstream issues) lives in [docs/archive/](https://github.com/pacphi/agentic-kit/tree/main/docs/archive). ## The commands ```text ak status + one suggested next action ak setup first-time setup β€” machine and/or the project you're standing in [--codex] [--opencode] [--primary-host claude|codex] [--project] [--minimal] [--yes] [--no-aqe] [--no-security] [--reconfigure] ak status read-only dashboard: what's true, what's drifted [--json] [--refresh[=live|machine]] ak sync converge to good: upgrade + heal + verify [--dry-run] [--no-upgrade] [--skip SUBSYSTEM] [--retry-brain] [--json] ak dashboard open the local web dashboard (auto-opens your browser) [--port N] [--no-open] [--live-source 'surface=path'] ak admin maintainer-only telemetry admin (localhost; GitHub/npm egress) [--port N] [--no-open] ak about what each installed component is and why it's there ak system machine footprint: install size, runtime, storage, catalog, projects [--refresh[=live|machine]] [--json] ak maintain findings, guidance, discovery, guarded one-action plans [report] [--refresh[=live|machine]] | inventory | show | guidance | discovery | sources | scans | activity | audit | reconcile | plan | apply | undo ak usage offline scorecard, prompt patterns, and provider account cache status | score | prompts | refresh openrouter ak models inspect model lifecycle evidence and swap impact status | refresh | diff | explain | plan ak host manage execution hosts, routing, and provider bindings status | pick | reset-routes | off | check-connection ak audit hooks read-only hook inventory across Codex, Claude, OpenCode, and adapters ak audit context read-only managed-guidance, skill-metadata, MCP-registration, and window evidence ak heal hooks deterministic dry-run repair plan; explicit apply, verify, undo, recover ak run execute a host-neutral activity pipeline (including explicit OpenCode routes)