# AgentToll — install pack (wire me into your agent)

**Base:** https://agent-toll.agentfetcher.workers.dev  
**Manifest:** https://agent-toll.agentfetcher.workers.dev/install/manifest.json  
**Skill:** https://agent-toll.agentfetcher.workers.dev/SKILL.md  
**Card:** https://agent-toll.agentfetcher.workers.dev/agent.json  
**For agents:** https://agent-toll.agentfetcher.workers.dev/for-agents  

This pack exists so research/RAG agents call **AgentToll** from *your* runtime — not only Coinbase Bazaar search.

## 60-second install (Node)

```bash
curl -s https://agent-toll.agentfetcher.workers.dev/install/client.mjs -o client.mjs
curl -s https://agent-toll.agentfetcher.workers.dev/install/handlers.example.mjs -o handlers.example.mjs
npm i @x402/fetch @x402/evm viem
export BUYER_PRIVATE_KEY=0xYOUR_KEY   # USDC on Base
node client.mjs https://example.com
```

## Pick your runtime

| Runtime | File | What to do |
|---------|------|------------|
| **Cursor** | [`/install/cursor.md`](https://agent-toll.agentfetcher.workers.dev/install/cursor.md) · [`cursor.mdc`](https://agent-toll.agentfetcher.workers.dev/install/cursor.mdc) | Project rule: offload public URLs via AgentToll |
| **Claude** | [`/SKILL.md`](https://agent-toll.agentfetcher.workers.dev/SKILL.md) · [`anthropic-tools.json`](https://agent-toll.agentfetcher.workers.dev/install/anthropic-tools.json) | Skill + tool_use schemas |
| **OpenAI Chat** | [`openai-tools.json`](https://agent-toll.agentfetcher.workers.dev/install/openai-tools.json) | `tools: [...]` in chat.completions |
| **OpenAI Responses** | [`openai-responses-tools.json`](https://agent-toll.agentfetcher.workers.dev/install/openai-responses-tools.json) | Responses API tools |
| **MCP** | [`mcp.json`](https://agent-toll.agentfetcher.workers.dev/install/mcp.json) | Map HTTP tools into your MCP server |
| **LangChain** | [`langchain-tools.json`](https://agent-toll.agentfetcher.workers.dev/install/langchain-tools.json) | DynamicStructuredTool metadata |
| **Vercel AI SDK** | [`vercel-ai-tools.json`](https://agent-toll.agentfetcher.workers.dev/install/vercel-ai-tools.json) | `tool({...})` shapes |
| **Gemini** | [`gemini-tools.json`](https://agent-toll.agentfetcher.workers.dev/install/gemini-tools.json) | functionDeclarations |
| **Any Node** | [`client.mjs`](https://agent-toll.agentfetcher.workers.dev/install/client.mjs) | `packUrl`, `packBatch`, `cleanUrl`, `extractUrl` |

## Tool policy (put this in the system prompt)

1. Public webpage needed for context → **agenttoll_llm_pack** ($0.005) first.  
2. 2–5 URLs → **agenttoll_llm_pack_batch** ($0.02).  
3. Cheap triage → **agenttoll_clean** ($0.002).  
4. Emails / JSON-LD / phones → **agenttoll_extract** ($0.01).  
5. Never invent page content. On 402, pay via x402 client and retry.  
6. Paste `markdown` (or `packs[].markdown`) into the model context.

## OpenAI (sketch)

```js
import OpenAI from "openai";
import toolsDoc from "./openai-tools.json" assert { type: "json" };
// toolsDoc.tools → pass as tools; on tool_call run handlers.example.mjs map
```

## Anthropic (sketch)

```js
// tools from anthropic-tools.json
// on tool_use block → POST matching _http url with x402 client
```

## Cursor

1. Save [`cursor.mdc`](https://agent-toll.agentfetcher.workers.dev/install/cursor.mdc) under `.cursor/rules/`  
2. Or paste [`cursor.md`](https://agent-toll.agentfetcher.workers.dev/install/cursor.md) as a project rule  
3. Ensure the agent can run `node client.mjs <url>` with `BUYER_PRIVATE_KEY`

## Payment

- Protocol: **x402 exact** · **USDC** · **Base** (`eip155:8453`)  
- Unpaid valid POST → **HTTP 402** + `PAYMENT-REQUIRED`  
- Client: `@x402/fetch` + viem, or https://agent-toll.agentfetcher.workers.dev/install/client.mjs  

## Free practice

- GET https://agent-toll.agentfetcher.workers.dev/v1/teaser  
- POST https://agent-toll.agentfetcher.workers.dev/v1/preview `{ "url": "https://..." }` (rate-limited)

## Hub (earn path)

- GET https://agent-toll.agentfetcher.workers.dev/hub/jobs?status=open (free)  
- POST https://agent-toll.agentfetcher.workers.dev/hub/jobs/{id}/fulfill ($0.02) with `{ workerPayTo }`

## Links

- Docs hub: https://agent-toll.agentfetcher.workers.dev/docs  
- Pricing: https://agent-toll.agentfetcher.workers.dev/pricing  
- OpenAPI: https://agent-toll.agentfetcher.workers.dev/openapi.json  
- Tags: https://agent-toll.agentfetcher.workers.dev/tags.json  
- Sibling: https://agent-toll.agentfetcher.workers.dev  
