AI System Graph
Entities, capabilities, modules, policies, invariants and flows as typed nodes with typed edges. Queryable. Traversable.
SysMARA is a TypeScript framework where system architecture is a formal, machine-readable graph — not scattered across code, comments, and tribal knowledge. AI agents read your specs, plan changes, and ship safely.
| Language | TypeScript |
| Runtime | Node 20.11+ |
| License | MIT |
| Package | @sysmara/core |
| Latest | v0.8.3 |
AI coding agents are powerful, but they operate blind. They generate code, but cannot reason about what a change will break, which invariants must hold, or which modules they should not touch.
Decorators, middleware chains and implicit conventions work when the person writing code already understands the system. Agents do not have that context — and traditional frameworks never tried to give it to them.
Each pillar is a slice of the same underlying truth: a typed graph an agent can walk before it writes a line of code.
Entities, capabilities, modules, policies, invariants and flows as typed nodes with typed edges. Queryable. Traversable.
Reads capability specs; emits route handlers, test scaffolds and metadata with SHA-256 checksums. Deterministic. Regenerable.
Before mutating code, generate a formal Change Plan: what changes, what is affected, which invariants are at stake.
Pluggable adapters for Prisma, Drizzle, TypeORM — plus SysMARA ORM where schema is the system graph and every query is a capability.
Six primitives. Together they form the graph an agent walks
before it touches a line of code. Below: a real export of system-graph.json from a billing module.
Folders are for humans.
Graphs are for agents.
Write a single product description. An agent reads BOOTSTRAP.md,
generates YAML specs, validates, compiles, implements handlers,
and starts a running server.
| ent | 5 |
| cap | 6 |
| mod | 2 |
| files | 18 |
| ent | 6 |
| cap | 7 |
| mod | 4 |
| files | 21 |
| ent | 5 |
| cap | 8 |
| mod | 3 |
| files | 24 |
# The actual prompt sent to Claude Code: "Use SysMARA (@sysmara/core). Build a SaaS task manager. npm init -y && npm install @sysmara/core npx sysmara init Create system/ specs: entities: User, Workspace, Task, Comment capabilities: create_workspace, invite_member, create_task, assign_task, complete_task policies, invariants, modules, flows. Then: npx sysmara build && npx sysmara compile" # What happened (verified, 0 errors): $ npx sysmara build ✓ 0 errors 1 warning (cosmetic) $ npx sysmara compile ✓ 18 files generated ✓ 6 handlers · 6 tests · 6 metadata ✓ system-graph.json — 20 nodes, 27 edges $ npx sysmara start ✓ Server at http://localhost:3000
- name: subscription module: billing fields: - name: plan_id type: string - name: status constraints: - type: enum value: [active, paused, cancelled, past_due] invariants: - no_unpaid_invoices
- name: cancel_subscription module: billing entities: [subscription, invoice] input: - name: subscription_id type: string required: true policies: - billing_admin - owner_transfer invariants: - no_unpaid_invoices sideEffects: - send_cancellation_email
$ sysmara validate [OK] 4 entities, 14 capabilities, 5 policies, 8 invariants $ sysmara impact entity \ subscription Target: ent:subscription Mod : billing, workspaces Cap : cancel_subscription upgrade_subscription downgrade_subscription Radius: 12 nodes $ sysmara plan create \ "add team billing" [OK] plan-a1b2c3d4.yaml Risk: medium Review: required
Open source. MIT licensed. Designed for teams building with AI agents.
$ npm install @sysmara/core $ npx sysmara init ✓ System scaffolded