Skip to main content
Get Fishnet protecting your AI agent in under 5 minutes.

Prerequisites

  • Linux or macOS system
  • Rust 1.85+ (if building from source)
  • An AI agent using OpenAI or Anthropic APIs

Install Fishnet

1

Download and install

curl -fsSL https://github.com/iamyxsh/fishnet/releases/latest/download/install.sh | sh
The install script places the binary in ~/.local/bin/fishnet and creates the data directory at /var/lib/fishnet (Linux) or /Library/Application Support/Fishnet (macOS).
2

Initialize Fishnet

Run the first-time setup wizard:
fishnet init
You’ll be prompted for:
  • Master password: Encrypts your API keys (minimum 8 characters)
  • First API service: openai or anthropic
  • Credential name: A label for this key (e.g., my-openai-key)
  • API key: Your actual API key
  • Daily budget: Maximum spend in USD per day (default: $20)
  • Rate limit: Requests per minute (default: 60)
Example:
Master password: ********
Confirm master password: ********
First API service: openai
First credential name: my-agent-key
First API key: sk-proj-...
Daily LLM budget (USD) [20.0]: 10
Rate limit per minute [60]: 30
Your master password is never stored. Only a derived key is kept in your system keychain (optional).
3

Start the server

fishnet start
You should see:
[fishnet] config loaded from ~/.config/fishnet/fishnet.toml
[fishnet] listening on http://localhost:8473
Fishnet is now running as a local proxy.
4

Configure your agent

Point your AI agent to use Fishnet’s proxy instead of the real API:For OpenAI:
export OPENAI_BASE_URL=http://localhost:8473/proxy/openai
For Anthropic:
export ANTHROPIC_BASE_URL=http://localhost:8473/proxy/anthropic
Your agent will continue using its existing API key environment variable (OPENAI_API_KEY, ANTHROPIC_API_KEY), but Fishnet will intercept the requests and use the vault credential instead.
5

Test the setup

Send a test request through Fishnet:
curl http://localhost:8473/proxy/openai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-anything" \
  -d '{
    "model": "gpt-4o-mini",
    "messages": [{"role": "user", "content": "Hello"}]
  }'
The Authorization header can be any value — Fishnet overrides it with the vault credential.

Check status

View runtime metrics and today’s spend:
fishnet status
Output:
Status: running
PID: 12345
Uptime: 2h 15m
Active alerts: 0 (critical: 0, warning: 0)
Today's spend (USD):
  openai           $0.002340
Today's requests:
  openai           23

Verify with doctor

Run diagnostics to confirm everything is working:
fishnet doctor
Output:
Fishnet doctor report:
  [PASS] fishnet_running         process appears to be running
  [PASS] credentials_present     2 credential(s) in vault
  [PASS] openai_base_url         OPENAI_BASE_URL=http://localhost:8473/proxy/openai
  [PASS] anthropic_base_url      ANTHROPIC_BASE_URL=http://localhost:8473/proxy/anthropic
  [PASS] upstream_reachable      openai reachable (status 200)

Access the dashboard

Open http://localhost:8473 in your browser. The dashboard shows:
  • Real-time spend tracking
  • Active alerts
  • Request history
  • Credential management
  • Security policy configuration

What’s protected

Fishnet is now intercepting all AI requests and enforcing:
  • Spend cap: Requests denied if daily budget exceeded
  • Rate limiting: Max 30 requests per minute (from your init config)
  • Credential isolation: Agent never sees real API keys
  • Audit logging: Every request recorded with cryptographic proof
  • Prompt drift detection: Alerts on unexpected system prompt changes

Next steps

Configure policies

Set spend limits, rate limits, and security policies

Explore security features

Learn about prompt drift, endpoint blocking, and ZK proofs

Set up alerts

Get notified via Discord/Slack when budgets or limits are hit

Integrate with your agent

Framework-specific guides for OpenClaw, LangChain, and CrewAI

Troubleshooting

If your agent can’t connect to Fishnet:
  1. Check if Fishnet is running: fishnet status
  2. Verify the port is correct (default: 8473)
  3. Ensure OPENAI_BASE_URL / ANTHROPIC_BASE_URL are set correctly
If requests are denied with budget_exceeded:
  1. Check today’s spend: fishnet status
  2. Increase the budget: fishnet policy edit and update daily_budget_usd
  3. Or wait until midnight UTC (daily limits reset)
If you see rate limit denials:
  1. Check fishnet status for request counts
  2. Increase the limit: fishnet policy edit and update rate_limit_per_minute
  3. Or space out your requests

Build docs developers (and LLMs) love