{"name":"io.github.entradox/agent-ledger","slug":"entradox-agent-ledger","title":"AgentLedger","description":"Meter, cap, and block AI agent spend before the provider is charged.","url":"https://mcp.market/server/entradox-agent-ledger","rating":null,"grade":"B","score":79,"certified":false,"status":"active","category":"ai","tags":["ai"],"presence":{"score":23,"stars":0,"forks":0,"downloads_week":null,"last_push_at":"2026-09-19T15:35:06.000Z","license":"MIT"},"uptime":{"percent":100,"checks":1,"ok":1,"last_checked_at":"2026-09-19T17:31:17.621Z","last_ok_at":"2026-09-19T17:31:17.621Z","latency_ms":838},"claimed":false,"transport":"remote","callable_via_gateway":true,"default_price_micros":0,"repository":"https://github.com/entradox/agent-ledger","website":"https://aiagentscity.com","version":"0.4.1","remotes":[{"type":"streamable-http","url":"https://aiagentscity.com/mcp/"}],"packages":[],"tools":[{"name":"ledger_alerts","description":"Alert history for an agent: budget warnings (80% threshold) and spending spikes.\n\nRequires a credential: either the agent's own agent_secret or its\nworkspace's workspace_key (same rule as GET /v1/alerts).","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"agent_id":{"type":"string","description":"unique agent identifier"},"agent_secret":{"default":"","type":"string","description":"the agent's own secret (either this or workspace_key)"},"workspace_key":{"default":"","type":"string","description":"the owning workspace's key (either this or agent_secret)"}},"required":["agent_id"],"additionalProperties":false}},{"name":"ledger_api_docs","description":"Self-serve documentation for AgentLedger — quickstart, MCP tools, REST\nendpoints, budget caps, error codes, and idempotency usage, as markdown.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"topic":{"default":"","type":"string","description":"\"quickstart\" | \"mcp\" | \"rest\" | \"budget\" | \"errors\" | \"idempotency\" | \"all\"\n   (default \"\" == \"all\"). Unknown topics fall back to the full docs."}},"additionalProperties":false}},{"name":"ledger_examples","description":"Complete, runnable Python recipe for a common AgentLedger integration\npattern.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"pattern":{"type":"string","description":"\"python_tracking\" | \"budget_enforcement\" | \"weekly_report\" |\n     \"retry_safe_writes\""}},"required":["pattern"],"additionalProperties":false}},{"name":"ledger_list_agents","description":"Owner-only: full cross-tenant listing of every agent ever claimed on\nthis instance, with totals. Requires the operator's admin_secret — this\nis a portfolio-wide view, not a per-agent report (use ledger_report for\nthat — it requires that agent's agent_secret or its workspace_key).","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"admin_secret":{"default":"","type":"string","description":"operator admin secret (not the same as an agent_secret)"}},"additionalProperties":false}},{"name":"ledger_report","description":"Spend report for an agent over a rolling window.\n\nReturns total spend, breakdown by rail and by service, budget status\n(ok/warning/exceeded), detected anomalies, and entry count.\n\nRequires a credential: either the agent's own agent_secret or its\nworkspace's workspace_key (same rule as GET /v1/report).","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"agent_id":{"type":"string","description":"unique agent identifier"},"days":{"default":30,"type":"integer","description":"report window in days (default 30)"},"agent_secret":{"default":"","type":"string","description":"the agent's own secret (either this or workspace_key)"},"workspace_key":{"default":"","type":"string","description":"the owning workspace's key (either this or agent_secret)"}},"required":["agent_id"],"additionalProperties":false}},{"name":"ledger_revoke_secret","description":"Invalidate an agent_id's agent_secret WITHOUT deleting its spend history.\n\nUse when a credential may have leaked, or to stop an agent writing.\nSubsequent writes to that agent fail with agent_secret_mismatch until you\nrotate a new secret in. The agent_id stays claimed, so no other workspace\ncan claim it and inherit the ledger. Requires the workspace_key that owns\nagent_id.\n\nReturns {\"agent_id\", \"revoked\": True, \"_note\"}, or {\"error\", \"error_code\"}.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"agent_id":{"type":"string"},"workspace_key":{"type":"string"}},"required":["agent_id","workspace_key"],"additionalProperties":false}},{"name":"ledger_rotate_secret","description":"Mint a NEW agent_secret for an agent_id your workspace already owns, invalidating the old one.\n\nUse this to RECOVER an agent whose secret was lost: the previous credential\nstops working immediately. Requires the workspace_key that owns agent_id —\nan agent's own agent_secret cannot rotate itself, because a leaked agent\ncredential must not be able to lock its real owner out. Unlike ledger_track\nthis never claims a new agent_id: an unknown id returns agent_not_claimed.\n\nThe new secret is returned ONCE. Store it before you drop the response.\n\nReturns {\"agent_id\", \"agent_secret\", \"_note\"}, or {\"error\", \"error_code\"}.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"agent_id":{"type":"string"},"workspace_key":{"type":"string"}},"required":["agent_id","workspace_key"],"additionalProperties":false}},{"name":"ledger_set_budget","description":"Set spending caps for an agent. Warns at 80%, blocks spend when exceeded\n— enforced: a ledger_track call that would cross the cap is rejected.\n\nDollar caps (monthly_cents/daily_cents) and token caps (monthly_tokens/\ndaily_tokens) are independent dimensions: dollar caps only cover\nnon-\"tokens\" rails, token caps only cover rail=\"tokens\" bookkeeping rows\n(tokens_in/tokens_out). Set both if the agent uses both.\n\nMonthly cap is required; the rest are optional (0 = no limit).\nOverwrites any existing budget for the agent. Claiming a brand-new\nagent_id requires your workspace_key; that first call mints an\nagent_secret (returned once — save it); later calls for that agent_id\nmust pass the agent_secret back (no workspace_key needed again).","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"agent_id":{"type":"string","description":"unique agent identifier"},"monthly_cents":{"type":"integer","description":"monthly spending cap in cents"},"daily_cents":{"default":0,"type":"integer","description":"daily spending cap in cents (0 = no daily cap)"},"monthly_tokens":{"default":0,"type":"integer","description":"monthly token-burn cap (0 = no cap)"},"daily_tokens":{"default":0,"type":"integer","description":"daily token-burn cap (0 = no cap)"},"agent_secret":{"default":"","type":"string","description":"required for every call after the first for this agent_id"},"workspace_key":{"default":"","type":"string","description":"required when claiming a brand-new agent_id; not\n           needed once the agent_id has been claimed"}},"required":["agent_id","monthly_cents"],"additionalProperties":false}},{"name":"ledger_start","description":"Get a FREE AgentLedger workspace with no credential and no arguments —\nthe MCP equivalent of opening POST /start in a browser.\n\nCall this FIRST if you have no credentials yet. Every other tool here\n(ledger_track, ledger_set_budget, ledger_report, ledger_alerts) needs a\nworkspace_key or an agent_secret, so a caller arriving with neither must\nstart here or it has nowhere to go.\n\nTakes NO arguments on purpose: the goal is zero friction. It returns a\n`workspace_key` (shown exactly once — it cannot be re-revealed, so store it\nbefore continuing) which you then send as `workspace_key` on your first\nledger_track for a NEW agent_id. That first write returns the agent's own\n`agent_secret`, which authenticates every write after it.\n\nThe free tier includes every rail, enforced budget caps, alerts, reports and\nthe MCP server, capped at 3 agents per workspace. Minting is rate-limited\nper caller IP, the same limit the human door uses.\n\nPrefer to pay? POST /v1/billing/x402 with a wallet-signed payment needs no\nhuman and buys 24h of Pro (unlimited agents).","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{},"additionalProperties":false}},{"name":"ledger_track","description":"Record a spend entry for an AI agent on any payment rail, with optional token counts.\n\nClaiming a brand-new agent_id requires your workspace_key (get one via\nx402 at POST /v1/billing/x402 — no human, no login — or at /start).\nThat first call mints an\nagent_secret and returns it in the response — save it, every later call\nfor that same agent_id must pass it back (no workspace_key needed again)\nor the write is rejected. Amounts are capped\nat $100,000/entry and must be >= 0. If a budget is set for this agent,\nan entry that would cross the monthly/daily cap is blocked, not just\nlogged. Include tokens_in/tokens_out + model on every LLM call so token\nburn shows up in the /v1/tokens report.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"agent_id":{"type":"string","description":"unique agent identifier (e.g. \"research-agent-v2\")"},"rail":{"type":"string","description":"payment rail used — one of \"mpp\", \"x402\", \"api_key\", \"manual\""},"amount_cents":{"type":"integer","description":"spend amount in cents (100 = $1.00), 0-10000000"},"service":{"type":"string","description":"what was purchased (e.g. \"search_query\", \"data_export\")"},"tokens_in":{"default":0,"type":"integer","description":"prompt tokens consumed (0 if unknown)"},"tokens_out":{"default":0,"type":"integer","description":"completion tokens consumed (0 if unknown)"},"model":{"default":"","type":"string","description":"model name (e.g. \"gpt-4o\") — token burn is reported per model"},"agent_secret":{"default":"","type":"string","description":"required for every call after the first for this agent_id"},"workspace_key":{"default":"","type":"string","description":"required when claiming a brand-new agent_id; not\n           needed once the agent_id has been claimed"}},"required":["agent_id","rail","amount_cents","service"],"additionalProperties":false}},{"name":"read_skill","description":"Read a product skill file by its skill:// URI.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"uri":{"type":"string","description":"e.g. skill://<product>/<skill-name>/SKILL.md\n Get valid URIs from `skills_list_tool`."}},"required":["uri"],"additionalProperties":false}},{"name":"skills_list_tool","description":"List this product's skills. Each entry carries the SKILL.md URI,\nits name and description, verbatim frontmatter, and a per-file\nsha256 manifest. Read a body with `read_skill`.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{},"additionalProperties":false}}],"scan":{"score":79,"grade":"B","scanned_at":"2026-09-19T15:59:20.643Z","report":{"scannerVersion":"0.1.3","scannedAt":"2026-09-19T15:59:20.669Z","components":{"code":{"score":-1,"max":25,"notes":["remote-only server, no package to scan"]},"reliability":{"score":20,"max":20,"notes":["remote reachable in 543ms"]},"poisoning":{"score":15,"max":15,"notes":["12 tool descriptions checked"]},"auth":{"score":3,"max":15,"notes":["open endpoint exposes 1 write-action tools with no auth"]},"maintenance":{"score":15,"max":15,"notes":["last push 0 days ago"]},"identity":{"score":6,"max":10,"notes":["registry namespace matches repository owner"]}},"findings":[{"id":"auth.open-write","severity":"high","component":"auth","title":"Write-action tools reachable without authentication"}],"inputs":{"probes":[{"url":"https://aiagentscity.com/mcp/","reachable":true,"authRequired":false,"latencyMs":543,"serverInfo":{"name":"agent-ledger","version":"4.0.5"}}],"packages":[],"repo":{"found":true,"owner":"entradox","repo":"agent-ledger","archived":false,"pushedAt":"2026-09-19T15:35:06Z","stars":0,"forks":0,"openIssues":1,"ownerType":"User","ownerAvatarUrl":"https://avatars.githubusercontent.com/u/267962702?v=4","ownerCreatedAt":"2026-03-13T14:28:06Z","license":"MIT"},"icon":{"url":null,"source":"none"},"presence":{"stars":0,"forks":0,"downloadsWeek":null,"license":"MIT","lastPushAt":"2026-09-19T15:35:06.000Z","score":23}}}},"grade_history":[],"reviews":[]}