01Developers
Built for the teams shipping AI.
One call does the work that matters: ask whether this action may proceed, and honour the answer. This page describes the designed integration model — the interface is defined, the software is not shipped.
02SDK concept
Guard the call, not the prompt.
Instructions in a prompt are advice. A decision at the boundary is enforcement. The SDK exists to make that boundary one line of code.
- Python SDKInstrument agents and wrap tool calls.Designed
- TypeScript SDKNode and edge runtimes, same event model.Designed
- REST APIAgents, policies, approvals, traces, audit.Designed
- OpenTelemetrySend existing spans over OTLP.Designed
- MCP connectivityGovern tools exposed over Model Context Protocol.Designed
- API keysScoped keys per environment.Designed
- WebhooksApproval requests and policy events.Designed
fromfromimport psifi import Latticelattice = Lattice(api_key=osos.environ["PSIFI_API_KEY"])# Register the agent once, at startup.agent = lattice.agent( id="invoice-resolution", environment="production", owner="finance-automation",)# Wrap the consequential call. Lattice evaluates policy# before the request reaches the payment system.withwith agent.run(trace="tr_8f21c4") asas run: decision = run.guard( tool="payments.refund.create", payload={"order": order_id, "amount": 82_400}, ) ifif decision.requires_approval: run.wait_for_approval(decision.approval_id) ifif decision.allowed: payments.refunds.create(order=order_id, amount=82_400)03API architecture
Where the SDK sits.
The SDK is layer six. Everything it calls is layer three and below.
Holds the agent registry, evaluates policy, routes approvals and appends audit records.
In: evaluation and registration requests. Out: decisions, approval requests, audit events.
FIG. 07 — Designed architecture. Select a layer for its responsibility, inputs and outputs.
04Telemetry
A run is a trace.
- Span kinds
- agent.run · model.call · tool.call · data.query · policy.evaluate · approval.wait
- Attributes
- agent id, environment, provider, model, tool, duration, decision, policy version
- Transport
- SDK batch upload, or OTLP for spans you already emit
- Redaction
- Applied at ingest — matched fields never reach storage
- Sampling
- Decisions are never sampled; payload capture can be
05Agent integration
Three ways in, one decision out.
- SDK
- Wrap the consequential call with run.guard() and honour the decision
- Gateway
- Route model traffic through Relay and attach policy per route (roadmap)
- MCP
- Put the shim in front of an MCP server so tool calls are evaluated
- Observe-only
- Report what a policy would have decided, without blocking
- Idempotency
- Evaluation keys make retries safe after a network failure
06MCP
Govern tools exposed over MCP.
- Placement
- Between the agent and the MCP server, so the tool list itself can be scoped
- Scoping
- Per-agent allow lists, so two agents see different tools on the same server
- Evaluation
- Each tools/call is evaluated before it is forwarded
- Held calls
- A call requiring approval returns a pending result the agent can await
- Traces
- MCP calls appear as ordinary tool spans
07Webhooks
Events you can act on.
- approval.requested
- A policy held an action and a human is needed
- approval.decided
- The decision, the approver and the reason
- policy.violated
- A deny decision, with the rule that matched
- agent.registered
- A new agent appeared in an environment
- Delivery
- Signed payloads, retried with backoff, replayable from the console
08Authentication
Keys for machines, SSO for people.
- API keys
- Scoped per environment; an evaluation key cannot read the audit ledger
- Rotation
- Overlapping validity windows so rotation needs no downtime
- SSO
- SAML or OIDC for console users, with group-to-role mapping
- RBAC
- Engineer, approver, auditor, administrator — scoped per environment
- Audit
- Key creation, rotation and role changes are themselves audit events
No SDK package is published yet. The examples on this page describe the intended interface so you can judge whether it fits your agent, and so the shape of the integration is not a surprise later. If you are building against it now, tell us which runtime you need first.
Put a control layer around your AI systems.
Connect your agents, understand their behaviour, define their boundaries and operate AI systems with a clear audit trail.