
Inferrail
io.github.domondi1由 GitHub 帳號 domondi1 發布v0.4.18更新於 Nov 3, 2026
面向代理程式的本機、無負載的 AI 成本視覺化。可按模型、路由或標記的工作查詢支出。
AI 翻譯由 AI 模型根據下方的原文描述翻譯,可能有誤。
原文描述
Local, payload-free AI cost visibility for agents. Query spend by model, route, or tagged work.
概覽
Inferrail 的本機 MCP 服務;無需登入;STDIO。
暫無 AI 概覽:以下資訊來自註冊中心條目和服務本身。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Inferrail,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Inferrail
Spending limits, receipts and paid execution for AI agents.
Give each AI job a dollar budget that's enforced before the provider is called,
and a cost receipt that never stores what the model said.
[CI] [PyPI version] [License: Apache-2.0]
Quickstart · For agents · How it works · Docs · tryinferrail.com
A real run of the gateway and dashboard with a local stand-in model: one job with a $0.04 limit, four calls answered, two refused with HTTP 402 before reaching the model. How it was recorded
What works today
Developer preview: interfaces may change before 1.0.
Also experimental: AP invoice-exception recovery, a hosted trial gateway, and Work Economics / Economic Authority (example; Base Sepolia testnet only).
Quickstart
Requires Python 3.11+.
Try it offline. No API key, no network calls, no provider charges:
The demo sends scripted requests through the real engine to a fake provider with made-up
prices labelled DEMO, and prints what they cost by customer.
Give one run a budget, inside your Python app. No config file, no second process:
Every call with the same work id shares that budget, including parallel calls; one that would
push the run past it gets HTTP 402 before it reaches OpenAI. inferrail work contract-review-42
shows what the run cost.
More: run it as a shared gateway with the local dashboard, framework snippets (LangChain, LangGraph, OpenAI Agents SDK, CrewAI, Haystack, LlamaIndex, Microsoft Agent Framework), and other clients, including the Anthropic SDK.
For agents
Start at tryinferrail.com/llms.txt: what's live, with links to each service's guide and the OpenAPI contract.
Web Read sells one public web page as clean markdown, with its word count, a SHA-256 of the
content and a receipt. $0.002 per delivered page, paid over x402 (USDC
on Base) or MPP (Tempo); no account or API key. The payment is checked first
and settled only after the page is delivered, so refusals (robots.txt, non-public addresses,
non-text, over 2 MB, target-site errors) are never charged. Retrying the same url and
request_id from the same wallet within 10 minutes returns the page already paid for.
Guides: Web Read · Hosted · service source.
MCP. Ask your agent what a job cost, from your local receipts:
Two read-only tools, get_spend (known cost and tokens by provider, model, route or any tag
such as work_id) and get_health. They don't run inference, write files or pay for anything.
Other clients: docs/integrations.md.
How it works
[Data flow. On your machine, your application sends requests to the Inferrail gateway, which reads the provider API key from its environment, forwards request content and the key to OpenAI or Anthropic, and returns the response. Separately, the gateway writes a metadata receipt (tokens, cost, status, timing, attributes, no message bodies) to a local JSONL or SQLite store that reports, the local dashboard, and MCP tools read. A usage beacon collector receives lifecycle events only if an endpoint is configured.]The gateway routes each request by model to a configured provider, checks any budget in
scope, forwards the call, and writes one receipt per request, including requests a budget
refused. A cost is recorded only when the provider reports usage and a price is on file;
otherwise it's unknown, never a guessed $0.
Attribution tags are stored as sent, so keep secrets and message content out of them.
inferrail verify-payload-free prints the live receipt schema, and canary tests check that
message bodies never reach receipts; neither is a security audit. The optional usage beacon
sends nothing unless an endpoint is configured (details).
Architecture: docs/ARCHITECTURE.md.
Current support
- Endpoints:
POST /v1/chat/completions(OpenAI-compatible) andPOST /v1/messages(Anthropic-compatible), with streaming and tool calls, plusGET /v1/models. - Providers: OpenAI, Anthropic, and endpoints compatible with either. Built-in prices cover OpenAI and Anthropic models; others need a price in your config, or their cost stays unknown.
- Not supported: the OpenAI Responses API, embeddings, image generation, audio and Realtime, batch, and native Gemini or Bedrock APIs. Fields the gateway can't account for are rejected with a clear error, never silently dropped.
- Scope: only calls through a running gateway are counted.
Exact contract and non-goals: docs/PRODUCT.md. Running agent jobs that spend real money? Open a production setup request.
Documentation
- Give one AI agent run a dollar budget
- Integrations: SDKs, frameworks, attribution, MCP, voice
- Self-hosting: install, configuration, storage, budgets, dashboard
- Product scope and architecture
- Machine-readable: llms.txt, openapi.json (the gateway), config.schema.json
Contributing, security, license
Questions and bugs: GitHub issues.
Security or privacy vulnerabilities: report privately, as described in
SECURITY.md. Contributing: CONTRIBUTING.md
(pytest needs no API key or network). License: Apache-2.0.
來源:README.md,提交 7e3659f
工具
0版本歷史
13- v0.4.18最新Nov 3, 2026
- v0.4.17Oct 31, 2026
- v0.4.16Oct 7, 2026
- v0.4.15Oct 6, 2026
- v0.4.14Oct 5, 2026
- v0.4.13Oct 4, 2026
- v0.4.12Oct 3, 2026
- v0.4.11Oct 1, 2026
- v0.4.9Oct 1, 2026
- v0.4.8Sep 30, 2026
- v0.4.6Sep 29, 2026
- v0.4.5Sep 26, 2026
- v0.1.1Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分