Connect an agent
SAM's entire agent surface is plain HTTP/JSON + Authorization: Bearer <key>. There is no SAM SDK — any runtime that can send an HTTP request works (OpenAI, Cursor/MCP, custom). Agents authenticate by API key / Bearer token / MCP, not a login form.
Base URL & leg addressing
Shield / Scope / Handler / license are path prefixes on this dashboard host; SAMcypher (money) is a separate service on its own host for process isolation. Call each at <base>/v1/…. GET /healthz (on the dashboard host) → liveness + honest leg accounting. SAMcypher is a separate service and serves its own GET /health.
| Leg | Base URL | Does |
|---|---|---|
| SAMShield | https://dash.letmebefraink.com/shield | Scan untrusted content for prompt-injection / policy risk |
| SAMScope | https://dash.letmebefraink.com/scope | Issue short-lived scoped credentials |
| SAMHandler | https://dash.letmebefraink.com/handler | Provision agent identities (+ seat payment) |
| SAMcypher | https://cypher.letmebefraink.com | Governed payments / transfers / subscriptions (own service) |
| sam-license | https://dash.letmebefraink.com/license | Validate a SAMSerum/Shredder license (gate-on-use) |
Envelopes
Every response is one of two shapes. Always check the body status, not just the HTTP code — an escalated payment returns 202 with data.status == "escalated" and is not executed.
Success: {"ok": true, "data": {…}, "request_id": "req_…", "timestamp": "…"}
Error: {"ok": false, "error": {"code": "…", "message": "…", "request_id": "req_…"}}
Minimal example (raw HTTP, any language)
POST https://cypher.letmebefraink.com/v1/intents
Authorization: Bearer sk_live_…
Content-Type: application/json
{"account_id":"acct","venue":"STRIPE_ISSUING","action_type":"PAY_API",
"asset":"USD","amount":5,
"destination":{"type":"API_SERVICE","id":"api:openai","rail":"stripe:issuing"},
"reason":"api fee","requested_by":"EXECUTOR",
"idempotency_key":"<uuid you reuse on retry>"}
destination is required for every money
action (TRANSFER/SUBSCRIBE/PAY_API) —
omitting it is a 422. Executing also needs the owner's open
mandate for that counterparty; without one the intent returns
202 escalated for the owner to authorize.
Idempotency (the money contract)
For any charge, you supply idempotency_key and reuse it on retry so the charge dedupes — there is no safe server-side default. Same (tenant, key) → same receipt; the same key from a different tenant never collides.
Snippets & the full contract
Four reference snippets — all reduce to POST <leg> + Bearer + JSON:
| File | Runtime |
|---|---|
| reference_client.py | stdlib urllib only — the no-SDK proof |
| raw_http_curl.sh | curl — any shell-capable agent |
| openai_tool_calling.py | OpenAI function/tool-calling (schema + dispatch) |
| mcp_tool.py | MCP server (Cursor / Claude Desktop) — the MCP→HTTP bridge |
Full field semantics, enums, mandate matching, and the per-leg endpoint catalog live in the Agent Integration Contract (v1) shipped with the suite (examples/agents/AGENT_INTEGRATION_CONTRACT.md).
Not an agent? Customer login · Operator login
