Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.shodai.network/llms.txt

Use this file to discover all available pages before exploring further.

Why Agreements Protocol

Agreements are how people, organizations, and agents coordinate around shared commitments.

From static records to operational agreements

Traditional agreements are passive records. They describe what parties accepted, but the operational rules usually live somewhere else: in applications, workflows, databases, or custom smart contracts. Shodai makes that operational layer part of the agreement definition itself. A Shodai agreement can define what was agreed, who the parties are, who can act, what inputs are valid, what state the agreement is in, what can happen next, and how the history can be verified. The current implementation realizes this through a common agreement data standard, an onchain execution model, and an API/app layer for deploying and operating agreements.
An agreement should not only record what parties accepted; it should define who can act, what can happen next, and how progression can be verified.
Today, there is no common language for that operational layer. The document may contain the terms. The workflow tool may coordinate the process. The database may store the status. Application logic may decide what is allowed next. A smart contract, if one exists, may enforce part of the process. The audit trail may live wherever the action happened. That split creates the core problem: there is no shared operational source of truth for what was agreed, who can act, what can happen next, and how the agreement progressed over time. For simple agreements, custom glue can hide that gap. For multi-party workflows, agentic systems, financial commitments, milestone approvals and externally-composed payment flows, grant milestone tracking, approvals, settlement attestations, compliance flows, and onchain coordination, the gap becomes a trust problem. It treats an agreement as a structured artifact that combines human-readable terms with machine-operable state, participant authority, valid inputs, deterministic transitions, and verifiable history. The result is an agreement that humans can review, systems and agents can inspect, and parties can use to interact under shared, verifiable constraints.

What Agreements Protocol provides

Agreements Protocol closes the gap between what parties agree to and how that agreement is reliably, verifiably carried forward. It defines agreements as shared artifacts with:
CapabilityWhat it provides
Reviewable meaningHuman-readable terms people can review, paired with structured data systems and agents can inspect.
AuthorityDeclared participants, replicable templates, immutable onchain deployment.
Valid interactionValid inputs, issuer conditions, explicit states, and deterministic transitions.
Verifiable historyDeployment records, accepted inputs, state progression, and auditable lifecycle history.
Extensible executionSeparation between agreement definition and execution engine, with room for profiles, verifiers, actions, SDKs, APIs, and application layers.
These properties are exposed visually as behavioral maps of the agreement, helping humans and agents understand which states exist, which inputs are valid, who may submit them, and what transitions can occur next. The onchain implementation uses a data-defined state machine to make agreement behavior explicit, inspectable, and verifiable.

Benefit and inspection map

Protocol propertyWhat provides itWhere to inspect
Reviewable meaningHuman-readable terms plus structured agreement JSONAgreement data standard
Explicit authorityParticipants, variables, and input issuer rulesAuthor Agreement JSON
Valid next actionsInputs, conditions, and transitionsAuthor Agreement JSON / Operate a Deployed Agreement
Verifiable historyOnchain state progression and eventsOnchain execution engine / EIP-712 Signing Reference
Predictable behaviorFixed deployed definition and deterministic executionDeploy an Agreement / Onchain execution engine
Extensible effectsActions, modular extensions, and application-layer integrationsArchitecture overview
Current boundaries:
  • the core engine does not currently custody funds or natively transfer ETH/ERC-20 assets
  • the documented happy path uses the API-assisted deployment and operation flow
  • direct onchain operation should be documented and inspected through the onchain/EIP-712 references
  • programmatic agreement generation is possible because agreements are data, but generated agreements should still be valid for the current EVM/onchain implementation and reviewable before deployment
Agreements can model payment obligations, approvals, balances, invoices, and settlement attestations. Actual value transfer can be composed through external payment rails, escrow contracts, application-layer integrations, or the modular actions extension point. Shodai has a working prototype for payment-transfer actions, planned to be productized soon alongside other extensions.

How the system fits together

Agreements Protocol moves from agreement meaning to execution to integration across three layers:
1

Agreement data standard

A common language for terms, variables, participants, inputs, states, transitions, and execution metadata.
2

Onchain execution engine

The onchain implementation uses a data-defined state machine to make agreement behavior explicit, inspectable, and verifiable.
3

Application and API layer

Tooling for validation, deployment preflight, participant mapping, signing, state reads, input history, and monitoring.
Together, these layers let humans, agents, and software coordinate around agreements with shared meaning, explicit execution paths, and verifiable history.

Using these docs with an AI agent

These docs are designed to help an AI coding agent answer your question, find the right implementation path, and move from explanation to a working experiment. The pages below are useful discovery starting points, not a required reading order: After your agent answers your immediate question, ask it to offer the hands-on demo from Try the full workflow with an agent. The demo should create a temporary project, install the TypeScript client, validate a real agreement example, preflight deployment, deploy with a signed permit when credentials are available, submit a signed input, and report state and input-history evidence.

Where to go next

For the fastest path to a working integration, start with Quickstart. For a deeper explanation of agreement JSON, the onchain execution engine, the API boundary, and the deployment lifecycle, read System architecture.

Start with the SDK quickstart

Install the client, create ApiClient, and make your first authenticated calls.

Understand the system architecture

See how agreement definitions, SDKs, onchain execution, history, and APIs fit together.

Agreement data standard

Learn how agreement definitions combine text, facts, participants, and lifecycle behavior.

Use SDK reference

Choose the right typed methods, signing helpers, diagnostics, and path helpers.

The default integration path

Follow this path when you are building a TypeScript integration:
  1. Quickstart: install the client and confirm authenticated access.
  2. System architecture: understand the system boundaries and integration paths.
  3. TypeScript client: understand the SDK surface and helper choices.
  4. Agreement data standard: understand the agreement definition model.
  5. Author agreement JSON: model the business workflow deliberately.
  6. Validate agreement structure: check the authored artifact before deployment context is added.
  7. Deploy an agreement: preflight deployment values and deploy with a permit signature.
  8. Operate a deployed agreement: read state, submit signed inputs, and inspect history.

The agreement lifecycle

PhaseWhat you doSDK entry pointStart here
AuthorModel the agreement text, variables, participants, states, inputs, and transitions.Agreement JSON artifactAuthor Agreement JSON
ValidateCheck authored JSON before combining it with deployment context.client.validateTemplate(...)Validate Agreement Structure
DeployCombine authored JSON with initValues, participants, observers, and a deployment permit.client.validateDeployment(...), deployAgreementWithPermit(...)Deploy an Agreement
OperateRead current state, submit signed inputs, and confirm lifecycle movement.client.getAgreementState(...), submitAgreementInputWithPermit(...)Operate a Deployed Agreement

Where examples and reference fit

Simple Agreement and Complex Agreement are complete agreement JSON artifacts you can inspect or adapt before validating and deploying with the SDK. Use the API Reference group in the sidebar for generated request and response details from openapi.json. Use EIP-712 Signing Reference only when you are constructing typed data directly, verifying SDK helper behavior, or debugging a signing mismatch. Use Errors and troubleshooting when a request fails. If you are not using TypeScript, the generated API Reference and raw HTTP examples in the workflow pages provide the direct endpoint path.