For Developers building autonomous AI agents
Native integration for major agent stacks + community adapters. Apache 2.0 SDK on GitHub. Sgraal Proxy (Coming): drop-in migration path for Mem0, Zep, Letta — in active design. Real-time preflight before every action.
No signup needed to try. Demo key sg_demo_playground hits the live API right now.
pip install sgraal
Intended drop-in migration path for Mem0, Zep, Letta — in active design. The proxy.sgraal.com endpoint is not yet available; the example below shows the intended integration pattern.
Sgraal Proxy speaks the Mem0 wire protocol. Point your client at proxy.sgraal.com instead of api.mem0.ai and every call gets a Sgraal preflight in front. Memory writes are scored before they're stored. Memory reads are validated before the agent uses them. Your code doesn't change.
Same pattern for Zep (ZEP_URL=...), Letta, and other memory backends. The proxy passes through everything Sgraal doesn't need to block.
Concept · Coming: Sgraal Proxy is in active design. The code example above shows the intended integration pattern; the proxy.sgraal.com endpoint is not yet available. Early-interest sign-ups shape the roadmap — register via the link on the right.
Before
# your agent code (Mem0 client) import mem0 client = mem0.MemoryClient(api_key="...") client.add(messages, user_id="alice")
After (env var only)
# shell export MEM0_API_BASE_URL=https://proxy.sgraal.com export SGRAAL_API_KEY=sg_demo_playground # your agent code — UNCHANGED import mem0 client = mem0.MemoryClient(api_key="...") client.add(messages, user_id="alice") # ↑ now goes through Sgraal preflight first
Skip the proxy. Call Sgraal directly. One API, four-band decision.
from sgraal import SgraalClient client = SgraalClient("sg_demo_playground") result = client.preflight( memory_state=[ {"id": "m1", "content": "Customer balance: $85,000", "type": "tool_state", "timestamp_age_days": 0.1, "source_trust": 0.95} ], domain="fintech", action_type="irreversible" ) if result["recommended_action"] == "BLOCK": refuse_action(reason=result["explainability_note"])
import { SgraalClient } from "@sgraal/sdk"; const client = new SgraalClient("sg_demo_playground"); const result = await client.preflight({ memory_state: [ { id: "m1", content: "Customer balance: $85,000", type: "tool_state", timestamp_age_days: 0.1, source_trust: 0.95 } ], domain: "fintech", action_type: "irreversible" }); if (result.recommended_action === "BLOCK") { refuseAction({ reason: result.explainability_note }); }
curl -X POST https://api.sgraal.com/v1/preflight \ -H "Authorization: Bearer sg_demo_playground" \ -H "Content-Type: application/json" \ -d '{ "memory_state": [ {"id": "m1", "content": "Customer balance: $85,000", "type": "tool_state", "timestamp_age_days": 0.1, "source_trust": 0.95} ], "domain": "fintech", "action_type": "irreversible" }'
Returns one of USE_MEMORY / WARN / ASK_USER / BLOCK in ~15ms.
Each SDK is a thin shim over the canonical Python client. Same scoring engine, framework-idiomatic API.
sgraal
pip install sgraal
@sgraal/mcp
npx @sgraal/mcp
@sgraal/cloudflare
npm i @sgraal/cloudflare
sgraal.edge
(in Python SDK)
langchain-sgraal
pip install langchain-sgraal
crewai-sgraal
pip install crewai-sgraal
autogen-sgraal
pip install autogen-sgraal
llamaindex-sgraal
pip install llamaindex-sgraal
haystack-sgraal
pip install haystack-sgraal
semantic-kernel-sgraal
pip install semantic-kernel-sgraal
openai-sgraal
pip install openai-sgraal
mem0-sgraal
pip install mem0-sgraal
memvid-sgraal
pip install memvid-sgraal
mnemos-sgraal
pip install mnemos-sgraal
sgraal-rag
pip install sgraal-rag
sgraal-normalizer
pip install sgraal-normalizer
sgraal-emulator
pip install sgraal-emulator
sgraal-cli
pip install sgraal-cli
n8n-nodes-sgraal
npm i n8n-nodes-sgraal
github.com/sgraal-ai/go
go get github.com/sgraal-ai/go
ai.sgraal:sgraal-java
Maven / Gradle
Sgraal.Sdk
dotnet add package Sgraal.Sdk
sgraal-rs
cargo add sgraal-rs
Looking for something else? See the full compatibility matrix including community wrappers (Pydantic AI, Letta, Vercel, Bedrock, Azure, Google ADK, Langfuse, LangSmith, Zep, Dify, Flowise, Make, Zapier) and roadmap items.
One config block. Claude can call Sgraal preflight on any memory state directly from a conversation.
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"sgraal": {
"command": "npx",
"args": ["@sgraal/mcp"],
"env": { "SGRAAL_API_KEY": "sg_live_..." }
}
}
}
Restart Claude Desktop, ask: "check if this memory state is safe to act on", paste your JSON. Claude calls Sgraal and explains the verdict.
Validate retrieved chunks before they hit the LLM. Catch poisoned vectors, contradicted citations, and stale documents. Add 12 lines to your existing retriever — done.
Detect circular references when agent A passes memory to agent B passes back to agent A. Block before identity drift propagates across the crew.
Use Sgraal Proxy to add safety to existing Mem0 or Zep deployments without touching agent code. Every read and write goes through preflight first.
Roll your own agent? Add one call before any irreversible action — payment, email send, deploy, vote. Returns a four-band decision with full explainability and a repair plan.
Fork it, modify it, ship it with your product. The wire format is stable. No CLA, no copyright assignment. See the cut line.
Hit /v1/preflight/stream and watch the decision form in 23 events across 4 phases. See which module flagged what. Great for tuning thresholds.
Don't need 200 fields of response? Hit /v1/check with plain strings. Returns {safe: bool, reason: str}. Done.
Sub-millisecond p99 latency in-process. Zero dependencies. Runs in air-gapped environments. It's in the open layer.
sg_demo_playground hits the live API. Rate-limited, but real responses. No signup, no email gate. Just go.
239 adversarial test cases. Run them against your model, your competitor, or just to understand the attack surface. Pull request your own additions.
SDK on GitHub. Demo key in the docs. No corporate ceremony.
pip install sgraal
· Apache 2.0 · ~15ms preflight