# InferTheta > InferTheta is decision infrastructure for agents: design Bayesian networks, fill CPTs, set evidence, run inference, and return structured explanations so decisions under uncertainty are auditable to humans. ## Production Agent API (preferred) Base URL: https://infertheta-agent-engine-production.up.railway.app - Discovery: https://infertheta-agent-engine-production.up.railway.app/ - OpenAPI: https://infertheta-agent-engine-production.up.railway.app/openapi.json - Pricing: https://infertheta-agent-engine-production.up.railway.app/v1/pricing - Policy: https://infertheta-agent-engine-production.up.railway.app/v1/policy - This file: https://infertheta-agent-engine-production.up.railway.app/llms.txt ## For AI agents ### Access (no Auth0) 1. **Free sandbox:** `POST /v1/sandbox` → receive an `apiKey` + small credit balance. 2. **Pay-per-call:** `GET /v1/pricing` → `POST /v1/checkout` `{ "pack": "starter" }` → open `checkoutUrl` (human completes Stripe Checkout) → `GET /v1/checkout/{sessionId}` returns `apiKey` once. 3. Call tools with `Authorization: Bearer ` or `X-API-Key: `. 4. Top up: `POST /v1/checkout` `{ "pack": "builder", "topUp": true }` with your existing key — again, a human opens the checkout URL. Agents should not enter card numbers or SMS codes. Return the `checkoutUrl` to a human when credits are needed. Default costs (credits): request=1, mutation=5, inference=10, evaluate=15, explain=20. ### Recommended workflow 1. `POST /v1/sandbox` or paid checkout → store `apiKey` 2. `POST /v1/networks` — create empty or upload JSON 3. `POST /v1/networks/{id}/build` or `/nodes` `/edges` `/cpt` — design + fill CPTs 4. `POST /v1/networks/{id}/evidence` — observe facts 5. `POST /v1/networks/{id}/inference` — compute posteriors 6. `POST /v1/networks/{id}/evaluate-decision` — choose action 7. `POST /v1/networks/{id}/explain` — auditable why for a human ### HTTP first (remote agents) Prefer the production OpenAPI surface above. No repo clone required. Example: ```http POST /v1/sandbox HTTP/1.1 Host: infertheta-agent-engine-production.up.railway.app Authorization: Bearer GET /v1/keys/me ``` ### Optional: local MCP (Cursor / Claude Desktop) Stdio MCP runs inside a clone of this repo (same engine as the HTTP API). Useful for local development; remote agents should use HTTP. ```json { "mcpServers": { "infertheta": { "command": "npx", "args": ["tsx", "scripts/mcp/server.ts"], "cwd": "", "env": { "AGENT_API_AUTH": "on", "INFERTHEETA_API_KEY": "" } } } } ``` Or: `npm run mcp` ## Human product - Marketing site / modelling docs: https://infertheta.com/ (agents: https://infertheta.com/llms.txt) - Web IDE (Auth0 + subscription): run locally with `npm run dev` (port 8080), or your deployed human app URL if set via `HUMAN_APP_URL`. - Agent billing is separate: pay-per-call credits on this Agent API.