The repository also ships local tracking surfaces that do not require an LLMKit account or proxy.
接入你的智能体
發布者自己的指令。不是 PlugMCP 端點。
用我們的金鑰與日誌託管一份副本。
npx -y @f3d1/[email protected]Claude Code 沒有本機指令的安裝連結。複製下方指令並在終端機中執行。
LLMKIT_API_KEY=<secret> LLMKIT_PROXY_URL=<value> claude mcp add smigolsmigol-llmkit -- npx -y @f3d1/llmkit-mcp-server@0.4.10在終端機中執行。
{ "mcpServers": { "smigolsmigol-llmkit": { "command": "npx", "args": [ "-y", "@f3d1/[email protected]" ], "env": { "LLMKIT_API_KEY": "<secret>", "LLMKIT_PROXY_URL": "<value>" } } }}claude_desktop_config.json
遠端 URL 還是本機指令? 兩種安裝方式的差異
來自發布者
The repository also ships local tracking surfaces that do not require an LLMKit account or proxy.
Know what your AI agents cost. API gateway with budget enforcement, session tracking, and MCP tools.
| Python transport | You want local cost estimates around existing SDK calls | llmkit-sdk |
| CLI wrapper | Your OpenAI or Anthropic client honors its standard base-URL environment variable | @f3d1/llmkit-cli |
| TypeScript SDK | You have an existing key and want sessions, streaming, and gateway access from TypeScript | @f3d1/llmkit-sdk |
| MCP server | You want spend, budget, and local coding-session tools inside an MCP client | @f3d1/llmkit-mcp-server |
| AI SDK provider | You use Vercel AI SDK 6 | @f3d1/llmkit-ai-sdk-provider |
| Gateway and dashboard | You need shared budgets, provider routing, receipts, and analytics | packages/proxy, packages/dashboard |
pip install llmkit-sdk
from llmkit import tracked
from openai import OpenAI
costs = []
client = OpenAI(http_client=tracked(on_cost=costs.append))
client.chat.completions.create(
model="gpt-4.1",
messages=[{"role": "user", "content": "Summarize this incident."}],
)
print(f"${sum(item.total_cost or 0 for item in costs):.6f}")
The transport reads provider usage metadata and estimates cost from the bundled pricing catalog. It does not send tracking data to LLMKit.
npx @f3d1/llmkit-cli -- python my_agent.py
Use -v for per-request output or --json for machine-readable results.
Gateway examples require an existing LLMKit API key. Account creation and key management are temporarily unavailable while the authenticated service is restored. If you do not already have a key, use one of the local tracking paths above.
from openai import OpenAI
client = OpenAI(
base_url="https://api.llmkit.sh/v1",
api_key="llmk_your_key_here",
)
response = client.chat.completions.create(
model="gpt-4.1",
messages=[{"role": "user", "content": "Draft a release note."}],
)
The control path is built around three boundaries:
Request receipts bind the admission decision, provider attempt, settlement, and analytics handoff with stable identifiers. Database writes use an outbox, so an analytics outage does not silently erase budget evidence.
{
"mcpServers": {
"llmkit": {
"command": "npx",
"args": ["-y", "@f3d1/llmkit-mcp-server"]
}
}
}
Five local tools inspect supported Claude Code sessions and Cline task data without an LLMKit key.
Six gateway tools query spend, budgets, keys, sessions, and service health when LLMKIT_API_KEY
contains an existing key. Together they expose 11 tools.
The pinned catalog is a bundled reference snapshot, not a live quote. One source file,
packages/shared/pricing.json, records the snapshot date and
generates the TypeScript, Python, and MCP tables. CI rejects drift between the source and generated
files. The public site renders only populated provider tables and displays the source date.
The public comparison endpoint requires no account:
https://api.llmkit.sh/v1/pricing/compare?mode=text-token&models=anthropic%2Fclaude-sonnet-4-6%2Copenai%2Fgpt-4o&input=1000&output=1000&cacheRead=0&cacheWrite=0
The endpoint prices only the exact model keys supplied by the caller. It does not search for or recommend the cheapest model. Pricing is an estimate, not a provider invoice. Provider billing rules, model modality, and catalog freshness remain part of the error boundary.
See STAGING_PROOF.md for the isolated hosted proof contract. It deliberately refuses production targets and dirty worktrees.
git clone https://github.com/smigolsmigol/llmkit
cd llmkit
corepack [email protected] install --frozen-lockfile
corepack [email protected] build
corepack [email protected] quality:pr
Run the Worker locally with development-only bindings:
corepack [email protected] --filter @f3d1/llmkit-proxy dev
Generic deploy commands are intentionally omitted. Staging and production use separate guarded scripts with explicit target confirmation.
Provider credentials are encrypted with AES-256-GCM using a random IV and owner/provider-bound additional authenticated data. LLMKit API keys are hashed before storage. CI includes secret scanning, static analysis, dependency review, CodeQL, and package provenance checks.
Read the security policy and architecture and the machine-readable
Security Insights snapshot. Please report vulnerabilities through
GitHub private vulnerability reporting
or email [email protected].
Know what your AI agents cost. API gateway with budget enforcement, session tracking, and MCP tools.
{ "mcpServers": { "smigolsmigol-llmkit": { "command": "npx", "args": [ "-y", "@f3d1/[email protected]" ], "env": { "LLMKIT_API_KEY": "<secret>", "LLMKIT_PROXY_URL": "<value>" } } }}工具
尚無工具清單。遠端伺服器會在首次健康檢查後取得工具清單。
常見問題
在本頁複製適用於 Cursor、Claude Desktop、Claude Code 或 VS Code 的 stdio 設定。它使用發布者的安裝方式,而不是 PlugMCP 代理伺服器。
發布者列出了以下環境變數:LLMKIT_API_KEY, LLMKIT_PROXY_URL。
Llmkit 透過 stdio 在本機執行。
上次檢查時間:2026-10-28。 Know what your AI agents cost. API gateway with budget enforcement, session tracking, and MCP tools.