# PromptForce / Prefex

> LLM inference proxy: routing + prompt-cache assist + session memory + compression, behind one `base_url` change.

## Install

```bash
curl -fsSL https://promptforce.ai/install.sh -o install.sh && bash install.sh
```

Windows:

```powershell
irm https://promptforce.ai/install.ps1 | iex
```

## Configure

Point your client at the local proxy — one environment variable:

```bash
export ANTHROPIC_BASE_URL="http://localhost:8019"
```

Or in Claude Code's `~/.claude/settings.json`:

```json
{ "env": { "ANTHROPIC_BASE_URL": "http://localhost:8019" } }
```

All proxy behavior (router thresholds, cache TTLs, compression tier) is
configured in `~/.prefex/config.yaml`:

```yaml
prefex:
  mode: live
  router:
    enabled: true
    strong_model: claude-sonnet-4-6
    weak_model: claude-haiku-4-5-20251001
    cost_threshold: 0.4
  kv_cache:
    enabled: true
    ttl_seconds: 86400
  compression:
    enabled: true
    tier: standard
```

## Usage

```bash
prefex start   # starts the daemon, patches ~/.claude/settings.json
prefex reload  # hot-reload config, no restart
prefex stop    # kills the daemon, restores settings.json
```

Dashboard at `http://localhost:8019` reports an honest "Saved by prefex"
figure — incremental savings beyond native prompt caching, not a vibes-based
counterfactual.

## Agent access

- MCP server: `https://www.promptforce.ai/api/mcp` (card at
  `/.well-known/mcp.json`) — `search_catalog`, `get_install_command`,
  `get_product_overview` tools.
- `llms.txt` and `openapi.json` are published at the site root.
