Installation
Via pip (recommended)
pip install samma-suit
From source
git clone https://github.com/OneZeroEight-ai/samma-suit.git
cd samma-suit
pip install -e .
Requires Python 3.10+. The SDK integrates with any FastAPI application via a single call:
from samma import SammaSuit
app = FastAPI()
SammaSuit(app) # All 8 layers activated
Authentication
Samma Suit supports two authentication methods:
API Key
API keys use the samma_ prefix and are 56 hex characters. Include in the Authorization header:
Authorization: Bearer samma_a1b2c3d4e5f6...
You receive an API key when you create an account through the /api/billing/checkout endpoint.
Session Token (Magic Link)
For browser-based access, use the magic link flow:
- Send
POST /api/auth/magic-linkwith your email - Click the link in your email (contains a 15-minute token)
- The token is verified via
POST /api/auth/verify - You receive a 30-day session token
Quickstart
New here? Watch the 2-minute demo video to see all 8 layers in action before you start.
Get from zero to a protected AI agent in 4 commands.
1. Create an account
curl -X POST https://sammasuit.com/api/billing/checkout \
-H "Content-Type: application/json" \
-d '{
"email": "you@example.com",
"tier": "pro",
"success_url": "https://sammasuit.com/dashboard.html"
}'
# Response: { "checkout_url": "...", "api_key": "samma_..." }
2. Create an agent
curl -X POST https://sammasuit.com/api/agents \
-H "Authorization: Bearer samma_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "my-first-agent",
"monthly_budget_usd": 50.00,
"llm_api_key": "sk-ant-..."
}'
# Response: { "agent": { "id": "...", "name": "my-first-agent", "has_byok_key": true, ... } }
3. Send a request through the gateway
curl -X POST https://sammasuit.com/api/agents/AGENT_ID/gateway \
-H "Authorization: Bearer samma_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{ "role": "user", "content": "Hello, agent!" }
]
}'
# All 8 Samma layers enforced on every request
4. Check the audit log
curl https://sammasuit.com/api/agents/AGENT_ID/audit?limit=10 \
-H "Authorization: Bearer samma_YOUR_KEY"
# Every gateway call is logged with layers enforced, tokens, and cost
The 8 Layers
Every request through the Samma Suit gateway passes through all 8 layers. Each layer addresses a specific class of vulnerability exploited in the wild.
SUTRA
GatewayThe outermost defense. Validates request origins, enforces TLS 1.3, authenticates WebSocket connections, and applies rate limiting. Prevents the class of attacks demonstrated by CVE-2026-25253.
Prevents: Origin hijacking, replay attacks, DDoS, unauthorized gateway access
{ "detail": "Rate limit exceeded", "layer": "SUTRA" }
{ "detail": "Origin not allowed", "layer": "SUTRA" }
DHARMA
PermissionsRole-based access control for agents. Each agent is scoped to specific capabilities — an email agent cannot access the shell, a file agent cannot send messages. Prevents privilege escalation and lateral movement within agent roles.
Prevents: Privilege escalation, unauthorized model access, scope creep
{ "detail": "Model 'claude-opus-4-6' not allowed for this agent role", "layer": "DHARMA" }
SANGHA
Skill VettingCurated skill marketplace with mandatory vetting. Every skill is scanned for malware, sandboxed, and reviewed before it can be installed. Directly addresses the ClawHavoc campaign that delivered 341 malicious skills.
Prevents: Malware injection, credential theft, supply chain attacks
{ "detail": "Skill not approved for installation", "layer": "SANGHA" }
KARMA
Cost ControlsPer-agent budget enforcement with token optimization. Prevents the $750/month runaway costs seen with uncontrolled heartbeat jobs. Each agent has a hard monthly budget cap that cannot be exceeded. Pro/Team customers can Bring Your Own Key (BYOK) for full spend control.
Prevents: Runaway API costs, budget overruns, token waste
{ "detail": "Monthly budget exceeded ($50.00/$50.00)", "layer": "KARMA" }
SILA
Audit TrailComplete activity logging for every agent action. Records timestamps, tokens used, cost, IP addresses, and which layers were enforced. Provides the accountability that OpenClaw's zero-governance model completely lacks.
Prevents: Undetected rogue behavior, compliance gaps, forensic blind spots
{ "detail": "Audit log write failed — request blocked", "layer": "SILA" }
METTA
IdentityCryptographic agent identity using Ed25519 key pairs. Every agent gets a unique keypair at creation. Responses are signed so you can verify they came from your agent and not an impersonator.
Prevents: Agent spoofing, impersonation, man-in-the-middle attacks
{
"response": "...",
"metta_signature": "a1b2c3d4...",
"metta_public_key": "ed25519:..."
}
BODHI
IsolationProcess-level sandboxing for agent execution. Each agent runs in isolation with no lateral movement between agents. Egress allowlists prevent unauthorized network access. Enforces execution timeouts.
Prevents: Lateral movement, container escape, unauthorized network access
{ "detail": "Agent execution timed out (30s)", "layer": "BODHI" }
NIRVANA
RecoveryThe last line of defense. State snapshots, 1-click rollback, and kill switches. If an agent goes rogue, NIRVANA lets you immediately terminate it and restore to a known-good state. Includes dead man's switch for unresponsive agents.
Prevents: Uncontrolled rogue agents, state corruption, irreversible damage
{ "detail": "Agent has been terminated via kill switch", "layer": "NIRVANA" }
API Reference
Base URL: https://sammasuit.com/api (production) or http://localhost:8001/api (local dev). All endpoints require authentication unless noted.
Authentication
Request / Response
{ "email": "you@example.com" }
{ "success": true, "message": "Magic link sent" }
Request / Response
{ "token": "abc123..." }
{
"success": true,
"token": "session_token_here",
"customer": {
"id": "...",
"email": "you@example.com",
"tier": "pro"
}
}
Agents
Request / Response
{
"name": "my-agent",
"description": "An email assistant",
"monthly_budget_usd": 50.00,
"llm_api_key": "sk-ant-...",
"samma_config": {}
}
{
"agent": {
"id": "uuid",
"name": "my-agent",
"status": "active",
"metta_public_key": "ed25519:...",
"monthly_budget_usd": 50.00,
"has_byok_key": true,
"created_at": "2026-02-01T..."
}
}
Response
{
"agents": [ { "id": "...", "name": "...", "status": "active", ... } ],
"total": 3,
"max": 5
}
Response
{ "success": true, "message": "Agent terminated", "layer": "NIRVANA" }
Request / Response
{
"messages": [
{ "role": "user", "content": "Summarize today's news" }
],
"model": "claude-sonnet-4-5-20250929",
"max_tokens": 1024,
"system": "You are a helpful assistant."
}
{
"content": "Here is today's summary...",
"model": "claude-sonnet-4-5-20250929",
"tokens_used": 342,
"cost_usd": 0.0051,
"layers_enforced": ["SUTRA","DHARMA","SANGHA","KARMA","SILA","METTA","BODHI","NIRVANA"],
"metta_signature": "a1b2c3..."
}
limit (max 100, default 50), offset.Response
{
"audit": [
{
"id": "...",
"action": "gateway",
"agent_name": "my-agent",
"tokens_used": 342,
"cost_usd": 0.0051,
"layers_enforced": ["SUTRA","DHARMA","SANGHA","KARMA","SILA","METTA","BODHI","NIRVANA"],
"created_at": "2026-02-01T12:00:00Z"
}
],
"total": 47
}
Dashboard
Response
{
"tier": "pro",
"agents": { "active": 3, "total": 4, "max": 5 },
"usage": {
"total_cost_usd": 12.45,
"monthly_budget_usd": 500,
"total_calls": 1847
},
"recent_audit": [ ... ]
}
limit (max 100, default 20), offset.Billing
Request / Response
{
"email": "you@example.com",
"tier": "pro",
"success_url": "https://sammasuit.com/dashboard.html",
"cancel_url": "https://sammasuit.com/"
}
{
"checkout_url": "https://checkout.stripe.com/...",
"session_id": "cs_...",
"customer_id": "uuid",
"api_key": "samma_a1b2c3..."
}
Response
{ "portal_url": "https://billing.stripe.com/..." }
Request
{ "wallet_address": "0x...", "signature": "0x..." }
Marketplace
q (search), free_only, status, limit, offset.Request
{
"name": "Email Summarizer",
"description": "Summarizes email threads",
"package_url": "https://github.com/...",
"manifest": { "permissions": ["email.read"] },
"version": "1.0.0",
"price_usd": 0
}
Configuration
Samma Suit is configured via environment variables. All variables use the SAMMA_ prefix.
| Variable | Required | Description |
|---|---|---|
| ANTHROPIC_API_KEY | Yes | API key for Claude. Used by the gateway to proxy requests. |
| SAMMA_STRIPE_SECRET_KEY | Yes | Stripe secret key for billing and subscription management. |
| SAMMA_STRIPE_WEBHOOK_SECRET | Yes | Stripe webhook signing secret for verifying webhook events. |
| SAMMA_STRIPE_PRO_PRICE_ID | Yes | Stripe Price ID for the Pro tier ($29/mo). |
| SAMMA_STRIPE_TEAM_PRICE_ID | Yes | Stripe Price ID for the Team tier ($99/mo). |
| SAMMA_FROM_EMAIL | Yes | Sender email for magic links (e.g., noreply@sammasuit.com). |
| SAMMA_FRONTEND_URL | Yes | Frontend URL for magic link redirects (e.g., https://sammasuit.com). |
| RESEND_API_KEY | Yes | Resend API key for sending magic link emails. |
| DATABASE_URL | No | PostgreSQL connection string. Defaults to SQLite for local dev. |
| SAMMA_RATE_LIMIT | No | SUTRA layer rate limit per minute. Default: 60. |
| SAMMA_ALLOWED_ORIGINS | No | Comma-separated allowed origins for SUTRA validation. |
FAQ
Is Samma Suit a fork of OpenClaw?
Can I self-host Samma Suit?
What models does the gateway support?
claude-sonnet-4-5-20250929. The DHARMA layer controls which models each agent role is allowed to use. Multi-provider support is on the roadmap.What is the SUTRA token?
0x0b3f81d3e1fa01e911a8b4e49048eea0ddf2a896). It powers OneZeroEight's music promotion economy and will extend into Samma Suit for subscription payments (20% discount), identity staking (METTA layer), skill developer rewards, and governance voting.How are the 8 layers enforced?
/api/agents/{id}/gateway endpoint passes through all 8 layers sequentially. Layers 1-2 (SUTRA + DHARMA) are fully production-hardened. Layers 3-8 are enforced with baseline implementations, with production-hardened versions shipping Q1-Q2 2026. No layer can be skipped or disabled.What happens if my agent exceeds its budget?
402 error. You can increase the budget via the dashboard or API at any time. Pro/Team customers can also use BYOK (Bring Your Own Key) to supply their own Anthropic API key and control LLM spend directly.How do kill switches work?
POST /api/agents/{id}/kill or the Kill button in the dashboard. Terminated agents cannot be resumed — this is intentional. The kill switch is designed for emergency situations where an agent must be stopped immediately and permanently.