FLEXVOTIXGet started
DocumentationDesign preview

Read how it is designed before it ships.

Concepts, data model, API design and error codes, published early so that engineers can tell us what is wrong with them.

Status of this documentation

This is a design preview. It describes how AEGIS is intended to work, so engineers can evaluate and challenge the design. No public API, SDK or package exists yet. Everything here may change.

MaterialStatus
Core concepts, data model and invariantsPreview
REST API design and error codesPreview
Quickstart, tutorials and SDK referenceDocumentation in development
Interactive demoSimulated

Core concepts

Agent
A stable identity with immutable versions. A version holds instructions, a model route, tool grants, requested authority and limits.
Objective
What a principal asked for, with its stated limits. It is the starting point of an execution.
Plan
A versioned, validated graph of steps compiled from an objective. Replanning creates a new version.
Step
One unit of work assigned to one agent version, with inputs, dependencies and a failure policy.
Mandate
The authority granted to a step: tools, resources, amount limits, data classes and a time limit. A child must be a subset of its parent.
Action
A concrete, side-effecting tool call in canonical form, with a digest and an idempotency key.
Decision
The result of checking an action: allow, require_approval or deny, with the rule, Mandate and reason code.
Approval
A human decision bound to an action digest. It expires and can be used only once.
Execution Record
The ordered, tamper-evident event log. State, traces, audit and replay all derive from it.
Route
A named model choice with ordered fallbacks and a budget. Agents reference routes rather than vendors.
Governed step
One model call or tool action processed through the gateway, with a recorded decision. The proposed billing unit.

Getting started structure

The intended first path through the product. These steps cannot be followed yet, since no account or API exists.

  1. Create a project. Each project has dev and production environments.
  2. Run the sample. Run the invoice sample with synthetic tools and no keys.
  3. Hit a gate. See a denial and an approval, and approve an exact action.
  4. Add a model provider. Use your own key, then create a route.
  5. Register a read-only tool. Test it through the gateway.
  6. Publish an agent version. Give it the route and the tool.
  7. Submit a task from code. Follow its event stream and handle a denial.
  8. Inspect the record. Open the Mandate Map and verify the chain.

Data model

Every tenant table carries an organization key. Versions are immutable, and execution_event is the source of truth.

DomainEntities
Tenancyorganization, user, membership, role, project, environment, api_key
Buildagent, agent_version, model_provider, model, model_route, tool, tool_version, integration, credential, orchestration, orchestration_version
Runsession, execution, execution_plan, step, step_attempt, action, execution_event
Controlmandate, policy, policy_version, decision, approval, audit_event
Knowledge (Phase 2)knowledge_source, document_chunk, memory_record
Assuretrace_span, eval_suite, eval_case, eval_run, evaluation_result
Commercialusage_record, subscription

Invariants

Properties the system must always hold. They are planned as the first automated tests.

  1. A child Mandate scope is always a subset of its parent.
  2. No tool call happens without a committed decision.
  3. An approval applies only to a matching digest, before expiry, once.
  4. A non-idempotent action with an unknown outcome is never automatically re-executed.
  5. Event sequence numbers are gapless within an execution, and each previous digest matches.
  6. A request under one tenant returns no rows from another tenant.
  7. Published agent and policy versions never change.

API overview

REST and JSON over HTTPS, with bearer keys scoped to a project and environment, idempotency keys on creating requests, cursor pagination and server-sent events for streams. Proposed design. No public endpoint exists.

ResourceResponsibilityOperations
/v1/agentsStable agent identitiesPOST, GET, GET /{id}, PATCH /{id}, POST /{id}/archive
/v1/agents/{id}/versionsImmutable configurationPOST, GET, POST /{v}/publish, POST /{v}/test
/v1/orchestrationsReusable plan definitionsPOST, GET, POST /{id}/versions, POST /{id}/versions/{v}/validate
/v1/tasksSubmit an objective with a requested MandatePOST (returns an execution id), GET /{id}
/v1/executionsRuns and controlGET, GET /{id}, GET /{id}/plan, GET /{id}/steps, GET /{id}/events, POST /{id}/cancel, POST /{id}/retry, POST /{id}/steps/{s}/reconcile
/v1/mandatesInspect and simulate authorityGET /{id}, GET /{id}/lineage, POST /derive:dry-run
/v1/toolsTool definitionsPOST, GET, POST /{id}/versions, POST /{id}/test, POST /{id}/grants
/v1/integrationsConnections and credentialsPOST, GET, POST /{id}/credential (write only), POST /{id}/rotate, POST /{id}/discover
/v1/modelsProviders and routesGET, POST /providers, POST /routes, POST /routes/{id}/test
/v1/memorySources, records, retrieval (Phase 2)POST /sources, POST /records, POST /query, DELETE /records/{id}
/v1/policiesPolicy as codePOST, POST /{id}/versions, POST /{id}/versions/{v}/activate, POST /simulate
/v1/approvalsHuman queueGET, GET /{id}, POST /{id}/approve, POST /{id}/reject
/v1/tracesRead model of runsGET /{execution_id}, GET /{execution_id}/spans, POST /export
/v1/evaluationsSuites and runs (Phase 2)POST /suites, POST /suites/{id}/cases, POST /runs, GET /runs/{id}
/v1/auditThe ledgerGET /events, POST /exports, GET /verify
/v1/usageMeteringGET /summary, GET /by-project, GET /by-model

Proposed webhooks: execution.completed, execution.failed, approval.requested, approval.resolved, step.outcome_unknown, policy.activated.

Error codes

Stable codes with a clear next step. Good error codes are part of how a developer learns the model.

CodeWhenWhat to do
mandate_exceededThe action or delegation goes beyond the Mandate.Fix the plan or request narrower work. Do not retry.
policy_deniedA policy rule denied the action.Read the reason. Do not retry unchanged.
approval_requiredA person must decide first.The step parks. Listen for approval.resolved.
approval_hash_mismatchThe action differs from what was approved.Request a new approval.
approval_expiredThe approval lapsed before use.Request a new approval.
outcome_unknownA non-idempotent call may or may not have applied.A person reconciles it. Never retried automatically.
budget_exceededA run or project budget is used up.Raise the budget, or change the route.
provider_unavailableNo model in the route could serve the call.Retry later, or add a fallback.
tool_timeoutA tool did not respond in time.Handled according to the tool's retry class.

SDK roadmap

ItemStatusNote
REST API designPreviewReadable on this site. Not a live service.
Python SDKComing soonGenerated from the API definition.
TypeScript SDKComing soonGenerated from the API definition.
Sandbox with synthetic toolsComing soonNo credentials needed.
Framework adapter (LangGraph first)PlannedPhase 2.
CLIPlannedLater phase.