For Developers → Live

Quickstart

Sgraal in 5 lines of code.

See your first memory verdict in under 60 seconds. Python, Node.js, or any HTTP client.

You'll need

# pip install sgraal
from sgraal import SgraalClient

client = SgraalClient(api_key="sg_demo_playground")
verdict = client.preflight(memory_state=[{"id": "mem1", "content": "user prefers email", "type": "preference"}])
print(verdict["recommended_action"])  # USE_MEMORY / WARN / ASK_USER / BLOCK

Hit POST /v1/preflight on api.sgraal.com — the scoring endpoint that returns the four-band decision plus full analytics. For an unmetered plain-strings preview, see POST /v1/check.

What you'll get back

{
  "decision": "USE_MEMORY",
  "confidence": 0.87,
  "request_id": "req_abc123",
  "reasoning": "Memory aligns with agent context, no provenance conflict detected.",
  "policy_version": "v12"
}
decisionOne of USE_MEMORY, WARN, ASK_USER, or BLOCK.
confidenceFloat in [0, 1]. < 0.7 → consider ASK_USER.
request_idOpaque ID for audit log lookup + support tickets.
reasoningPlain English explanation. Suitable for end-user display.

Next steps

Pick the proof artifact your auditor or regulator asks for.

Ready for production?

The demo key is great for testing. Real keys give you full quota, per-tenant signing, and the dashboard.

See pricing → Questions? hello@sgraal.com

This quickstart uses live endpoints on api.sgraal.com. The sample key sg_demo_playground is real and works for /v1/check, /v1/preflight, and other non-sensitive endpoints. It is blocked on admin/destructive endpoints (audit-log export, key generation, team management). Real production keys are scoped per-tenant with full quota and no endpoint restrictions.