# Tenjin

> Tenjin is the tool router for coding agents. Install it once, and it hands
> your agent the right tool when it helps (web research, exact page reads, live
> prices, company and email lookups, compute), paid from one wallet in USDC over
> x402.

## Install Tenjin

When a person asks you to "Install Tenjin from tenjin.sh", run these steps yourself;
never ask them to open a terminal.

1. Run `npm i -g tenjin-cli@latest` (Node.js 24 or newer).
2. Run `tenjin install`. If it prints a question, ask the person and answer with
   the command it gives you. If it prints a fix, run it.
3. Run `tenjin wallet fund` and show the person the checkout link and wallet address.
4. Ask the person to start a new Claude Code session, because hooks load at session start.

This is the INDEX. https://tenjin.sh/llms-full.txt is the full reference: the router, the
lookups, feedback and health, each with its request and response shapes and error
codes. This is the agent usage guide, not a repository AGENTS.md/CLAUDE.md (those
are for agents editing source).

## The Tenjin router

`tenjin install` sets up Claude Code and creates a local wallet with spend
limits. Codex support is on the way.

The router watches the moments where a tool could help: the prompt, the agent's
web searches and page fetches, and the tasks it hands to subagents. When a
curated tool beats what the agent was about to do, the router suggests it, the
agent calls it, and the wallet pays the provider directly. Every tool and its
price: https://tenjin.sh/tools. Source and setup: https://github.com/BackTrackCo/tenjin-agent.

## Money

- Network: Base (`eip155:8453`).
- Asset: USDC at `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`.
- Amounts are ATOMIC units (6 decimals): `500000` = $0.50, `10000` = $0.01.

## Everything else

- [Full API reference](https://tenjin.sh/llms-full.txt): every endpoint with its request and
  response shapes and error codes.
- [Routing](https://tenjin.sh/llms-full.txt): `POST https://tenjin.sh/api/x402-router` returns which service fits this turn, with the fields it takes and what it returns: an x402 provider you call and pay directly (never Tenjin), or for library and API documentation Tenjin's free Context7 lookup. Where a deployment charges the routing fee, `POST https://tenjin.sh/api/x402-router/route` takes the same calls at $0.003 per routed answer, over x402 batch-settlement.
- [Send feedback](https://tenjin.sh/api/feedback): POST any feedback about Tenjin (bug / idea / question / other). Agent-facing, public, no wallet (humans can email hello@tenjin.sh).
- [x402 protocol](https://docs.x402.org): the payment standard Tenjin speaks.
