pre-mvp

Governed autonomy

Give an agent a job description, not database credentials.

Legra is built for AI agents as their governed knowledge and work substrate. Bind an agent to one Use Case, one persona, tested Stories, explicit authority, a task branch, and a token budget—then make every result reviewable evidence.

The session is the security context.

These bindings are resolved at admission and remain immutable. A different role or business context requires a different session.

PrincipalWorkspaceDeploymentRoot Use CasePersonaBranchTaskToken budget

Token budget: the maximum Legra-token spend authorized for this task across priced data, compute, storage, transport, rights, and services—not a dollar accounting field. See how token pricing works.

The business boundary

Turn modeled business intent into the agent's capability surface.

The agent is not asked to infer its role from a prompt and then explore the whole database. Legra derives its world from governed graph objects that people can inspect, test, version, and improve.

Use Case

Defines the desired business outcomes and the governed tree of sub-use-cases needed to achieve them.

Persona

Defines the responsibilities, instructions, skills, and authority of the role the agent is performing.

Stories

Expose a finite set of typed, documented, tested, and approved business capabilities instead of arbitrary statements.

Strongest to weakest

Four levels make the trade-off explicit.

A deployment should know which level it uses. Hiding tools in a prompt, supplying branch defaults, or adding confirmation dialogs does not move broad credentials into a stronger level.

Level 3 is safe for autonomous graph work because the branch is the enforced blast-radius boundary and merge authority lives elsewhere. It trades the semantic predictability of a finite Story surface for full freedom inside a reviewable fork. Internet access remains a separate sandbox and confidentiality decision.

01

Preferred

Persona-bound Use Case harness

A dedicated Legra harness receives only the Stories for one persona in one root Use Case and its explicitly defined descendant tree.

Use Case, persona, deployment, authority, token budget, task, and branch are immutable session bindings.

02

Strong

Sandboxed standard harness

A standard agent harness runs in a VM or container but still receives the same server-enforced, Story-only Legra capability as level 1.

Semantic scope remains in Legra; the sandbox adds process, filesystem, resource, and network isolation.

03

Branch-safe

Full freedom on one staging branch

A sandboxed harness gets full SPARQL, Cypher, or GQL access and other permitted runtime tools, but the server pins it to one staging branch forked from the default branch.

The credential cannot switch branches, touch the default branch, or merge. A human or separate approval agent decides promotion.

04

High risk

Broad workspace statement access

The agent can issue raw statements across every branch its ordinary workspace credential can reach.

Risk comes from broad authority, not missing evidence: the Journal, provenance, and full Git-like graph history show what happened and let operators restore the original data state.

Governed work loop

Autonomy happens inside a reviewable path to production.

01

Bind

Admit one principal, deployment, root Use Case, persona, task, token budget, and branch.

02

Derive

Build the exact Story tool surface, schemas, concepts, instructions, and skills from the graph.

03

Work

Let the agent invoke approved capabilities and write proposed knowledge to its task branch.

04

Prove

Attach calls, costs, inputs, outputs, changes, and external activity to one Task and Journal evidence tree.

05

Promote

Validate Stories, shapes, contracts, and budgets; review the graph diff; merge only approved work.

Defense in depth

No single sandbox carries the whole claim.

A container cannot understand business legitimacy. A branch does not restrict reads. A prompt cannot revoke a credential. Legra composes independent boundaries so a failure in one layer does not become unrestricted authority.

Semantic scope

One root Use Case resolves to a governed descendant tree. The caller cannot assemble a more powerful set of unrelated Use Cases.

Authority

The agent receives attenuated, short-lived capability—not an ambient credential or automatic workspace membership.

Effect containment

A task branch isolates proposed writes. Read grants and Story scope remain separate controls because a branch is not a read boundary.

Execution and egress

A sandbox limits processes and resources; deployment data sources determine which external destinations may be reached.

Evidence and economics

Tasks and the Journal connect actions to actors, outcomes, provenance, budgets, priced items, credits, approvals, version history, and recoverable graph state.

Production agent boundary

The harness turns governed graph context into executable authority.

Workspaces, branches, Tasks, the Journal, identity, statements, and Stories form one control plane. The hosted harness generates the persona package, resolves the permitted Use Case tree and Story surface, binds the task branch and token budget, and runs the agent inside that scope. The embedded CLI MCP server remains the broader supervised operator and development surface—not the level-1 production agent surface.