Agents
How agents use Prometheus Potential
Give the agent one hub API key and either the MCP server or HTTP. Distill: distill a URL, remember/recall Distill-lite facts. Memory: write/get/search/delete portable notes with TTL. Repeat Distill of the same URL returns from KV (X-Cache: HIT, 0 Distill units).
1. MCP (Cursor, Claude Desktop)
Build mcp/, then add this server. Distill tools: distill, remember, recall. Memory tools: memory_write, memory_get, memory_search, memory_delete.
{
"mcpServers": {
"distill": {
"command": "node",
"args": ["./mcp/dist/index.js"],
"env": {
"DISTILL_API_URL": "https://distill.prometheus-potential.workers.dev",
"DISTILL_API_KEY": "dk_live_your_key"
}
}
}
}
Prompt the agent: “distill https://example.com, store the product name in Memory under project demo with a 1-day TTL, then search Memory.” Full install: /mcp.
2. curl (any agent with HTTP)
API: https://distill.prometheus-potential.workers.dev. Header: Authorization: Bearer $DISTILL_API_KEY. Mint a key on /start or use your own dk_live_.
POST /v1/distill
curl -sS https://distill.prometheus-potential.workers.dev/v1/distill \
-H "Authorization: Bearer $DISTILL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/","budget":"fast"}'
Call the same URL twice. The second response has X-Cache: HIT. Cache hits do not consume Distill units.
Distill remember / recall
curl -sS https://distill.prometheus-potential.workers.dev/v1/remember \
-H "Authorization: Bearer $DISTILL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"project_id":"agent-job","key":"stack","value":"Workers + D1 + KV","tags":["infra"]}'
curl -sS "https://distill.prometheus-potential.workers.dev/v1/recall?project_id=agent-job&q=stack" \
-H "Authorization: Bearer $DISTILL_API_KEY"
Memory write / search
curl -sS https://distill.prometheus-potential.workers.dev/v1/memory \
-H "Authorization: Bearer $DISTILL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"project_id":"agent-job","content":"Use Distill then Memory","ttl_seconds":86400}'
curl -sS "https://distill.prometheus-potential.workers.dev/v1/memory?project_id=agent-job&q=Distill" \
-H "Authorization: Bearer $DISTILL_API_KEY"
3. Check remaining units
curl -sS https://distill.prometheus-potential.workers.dev/v1/usage \
-H "Authorization: Bearer $DISTILL_API_KEY"
Distill free: 50 fast units / UTC day. Memory is a separate pool (see pricing). Over either cap → 429.
Internal loop: npm run dogfood distills two URLs, Distill remember+recall, Memory write/search/delete, and asserts cache HIT.
Distill · Memory · API reference · OpenAPI /openapi.json