Use Case
Defines the desired business outcomes and the governed tree of sub-use-cases needed to achieve them.
Governed autonomy
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.
These bindings are resolved at admission and remain immutable. A different role or business context requires a different session.
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
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.
Defines the desired business outcomes and the governed tree of sub-use-cases needed to achieve them.
Defines the responsibilities, instructions, skills, and authority of the role the agent is performing.
Expose a finite set of typed, documented, tested, and approved business capabilities instead of arbitrary statements.
Strongest to weakest
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.
Preferred
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.
Strong
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.
Branch-safe
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.
High risk
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
01
Admit one principal, deployment, root Use Case, persona, task, token budget, and branch.
02
Build the exact Story tool surface, schemas, concepts, instructions, and skills from the graph.
03
Let the agent invoke approved capabilities and write proposed knowledge to its task branch.
04
Attach calls, costs, inputs, outputs, changes, and external activity to one Task and Journal evidence tree.
05
Validate Stories, shapes, contracts, and budgets; review the graph diff; merge only approved work.
Defense in depth
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.
One root Use Case resolves to a governed descendant tree. The caller cannot assemble a more powerful set of unrelated Use Cases.
The agent receives attenuated, short-lived capability—not an ambient credential or automatic workspace membership.
A task branch isolates proposed writes. Read grants and Story scope remain separate controls because a branch is not a read boundary.
A sandbox limits processes and resources; deployment data sources determine which external destinations may be reached.
Tasks and the Journal connect actions to actors, outcomes, provenance, budgets, priced items, credits, approvals, version history, and recoverable graph state.
Production agent boundary
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.