Build on the Work Graph OS.
API-first. Schema-driven. With sandbox environments, typed SDKs, and streaming event documentation that reads like a product.
Documentation
Stripe-level clarity. Runtime-level depth.
Quickstart
Local + Sandbox setup in 5 minutes
Concepts
Work Graphs, Runs, Tools, Policy Gates
SDKs
TypeScript, Java, Python clients
Graph Schema
Work Graph schema reference
API Reference
REST + streaming endpoints
Webhooks
Event subscriptions + payloads
Security Model
Developer-facing auth + scoping
Changelog
Versioned platform changes
Quickstart
Define a Work Graph. Compile it. Run it. Three commands.
npm install @amqur/sdk # or pip install amqur # or <dependency> <groupId>com.amqur</groupId> <artifactId>amqur-sdk</artifactId> </dependency>
import { WorkGraph } from "@amqur/sdk";
const leadToClose = new WorkGraph({
name: "lead-to-close",
version: "1.0.0",
state: {
leadId: { type: "string" },
qualified: { type: "boolean" },
dealValue: { type: "number" },
},
nodes: [
{
id: "qualify",
type: "action",
tool: "crm.qualifyLead",
output: { qualified: "boolean", score: "number" },
},
{
id: "inventory",
type: "tool",
tool: "dms.searchInventory",
when: "state.qualified === true",
},
{
id: "manager_review",
type: "gate",
policy: "deals_over_45k",
when: "state.dealValue > 45000",
},
],
edges: [
{ from: "qualify", to: "inventory", when: "qualified" },
{ from: "inventory", to: "manager_review" },
],
policy: {
gates: ["deals_over_45k"],
tools: ["crm", "dms"],
observability: { sink: "amqur-events" },
},
});// Compile — produces immutable version hash
const compiled = await leadToClose.compile();
// => { hash: "7f3a2b1c", policy: {...}, schema: {...} }
// Run — streams events via SSE
const run = await compiled.run({
input: { leadId: "lead-88421" },
environment: "sandbox", // or "production"
});
// Subscribe to events
run.on("state_change", (event) => {
console.log(event.nodeId, event.data);
});
run.on("gate_blocked", (event) => {
console.log("Approval required:", event.data.policy);
});
// Or stream all events
for await (const event of run.events()) {
console.log(event.type, event.nodeId, event.timestamp);
}Work Graph Schema Reference
The canonical schema for defining executable Work Graphs.
{
"$schema": "https://amqur.com/schemas/work-graph/v1",
"name": "string",
"version": "semver",
"state_schema": {
"type": "object",
"properties": { ... }
},
"nodes": [
{
"id": "string",
"type": "action | decision | gate | tool",
"input_schema": { ... },
"output_schema": { ... },
"tool_binding": "namespace.method",
"policy_requirement": "gate_id"
}
],
"edges": [
{
"from": "node_id",
"to": "node_id",
"condition": "expression"
}
],
"policy": {
"approval_gates": ["gate_id"],
"tool_allowlist": ["namespace"],
"tool_pack_version": "semver"
},
"observability": {
"event_sinks": ["amqur-events"],
"trace_level": "full | summary",
"retention_days": 90
}
}SDKs
Official client libraries with full type safety.
Full SDK with streaming support
Spring Boot integration + gateway bindings
LangGraph-native with async streaming
Streaming Events
Every run streams structured events via SSE.
// Event types emitted during a run:
event: state_change
data: { "nodeId": "qualify", "from": "idle", "to": "running" }
event: tool_call
data: { "nodeId": "qualify", "tool": "crm.qualifyLead",
"input": {...}, "output": {...}, "duration_ms": 340 }
event: policy_check
data: { "nodeId": "mgr_review", "policy": "deals_over_45k",
"status": "pending_approval", "evidence": {...} }
event: gate_blocked
data: { "nodeId": "mgr_review", "approver": "F&I Manager",
"context": {...} }
event: run_complete
data: { "runId": "run-001", "duration_ms": 11200,
"nodes_executed": 8, "gates_passed": 1 }Sandbox vs Production
Like Stripe's test/live mode separation. Sandbox runs use mock tool responses and synthetic data. Production runs connect to real systems. Objects are fully isolated by environment.
- Mock tool responses
- Synthetic patient/lead data
- No real integrations triggered
- Full event stream for testing
- Free-tier included
- Live DMS/EHR/CRM connections
- Real patient/lead data (encrypted)
- Policy gates enforced
- Full audit trail + compliance
- SLA-backed uptime