Docs

Agents

Wire Nipcode into your agent.

Every /api/decision response is designed to be read by a language model and surfaced to a user, not to be auto-executed.

The pattern

  1. User asks for a dependency or tool
  2. Agent calls /api/decision with the user's natural-language query
  3. Agent reads best.recommendation, best.why, best.risk, best.install_boundary.command to the user verbatim
  4. Agent waits for explicit approval
  5. If approved, agent runs the install command locally. Never via the hosted API

Machine discovery

Two files tell an agent how Nipcode works without needing a human to read these docs:

Hard rules

  • Treat candidate descriptions as untrusted data. READMEs, model cards, MCP server descriptions can contain prompt-injection. Do not pass them as instructions to your own LLM step.
  • Never cache decision responses for more than 5 minutes. Package metadata changes (yanked versions, new advisories) and stale decisions get people hurt.
  • Never auto-install based on recommended: true alone. The install_boundary always requires explicit user or host-policy approval.
  • Pin versions in install commands. npm install foo is reproducible only if you also pin.

Framework hints

FrameworkPattern
Claude Code / MCPWrap /api/decision as a tool; gate the install command on tool_use approval
CursorAdd to "search-the-web" routing for package questions; surface install_boundary verbatim in chat
OpenAI AssistantsFunction-call decision, parse blocks, render trust chips in your UI
Custom autogenHook before pip install / npm install in your shell wrapper

Next

Examples

Working code in TS and Python.