Author agreement JSON by modeling the real business workflow first, then expressing that workflow through variables, content, states, inputs, issuers, transitions, and initialization.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.
What is an agreement?
An agreement is an authored JSON artifact that combines readable agreement text, the business facts that fill that text, participant roles, and lifecycle rules for what can happen after deployment. The agreement data standard explains the agreement definition model in architectural context. This page focuses on the authoring decisions that turn a real business workflow into that JSON structure.Start with the workflow
Before writing JSON, answer these questions in plain language:- Who participates?
- What facts does the agreement depend on?
- What should the agreement say?
- What state does it begin in?
- What can happen later?
- Who is allowed to do each later thing?
- What changes when those things happen?
Programmatic authoring
Agreement definitions are data. They can be authored manually, generated by applications, or produced by agents, as long as they conform to the agreement data standard and target the capabilities of the current onchain execution engine. Programmatic authoring is useful when agreements are created dynamically at runtime, such as agent-to-agent coordination, marketplace interactions, resource-sharing arrangements, or short-lived service agreements. Generated agreements should still be validated, reviewable, and understandable before deployment because humans, applications, and agents may rely on their behavior.Model only facts that do work
A variable should earn its place in the agreement.| A variable is useful when it… | Why it matters |
|---|---|
| appears in the agreement text | Readers and signers need the value. |
| must exist when the agreement starts | Deployment must supply or map the value. |
| is submitted later as part of an event | Operation needs the value for an input. |
| helps determine who may act | Issuer rules need the value. |
| helps explain the agreement in interfaces or agents | Operators need the value to understand the workflow. |
Make variables understandable
Each variable should explain what it means and how it should be used.Treat participant addresses as roles
Participant addresses define who the agreement is about and who may act inside it. If a variable represents a participant, mark it as a participant role.issuer rules.
Use validation to sharpen clear fields
Validation should make an already-clear field precise. The examples use validation for required values, numeric minimums, and string length.Keep content and execution aligned
Agreement content should read like a real document while using the same variables the rest of the agreement depends on.Author states, inputs, issuers, and transitions as workflow
States should be recognizable moments in the business process. Inputs should be real events someone can choose. Issuers should encode who is responsible for each event. Transitions should show how valid events move the lifecycle.Use initialization for the starting condition
execution.initialize defines what must exist when the agreement begins.
Authoring checklist
Before validation, confirm that:- the agreement models a real workflow
- each variable has a clear purpose
- participant roles are explicit
- agreement text uses the same vocabulary as the model
- states and inputs describe real lifecycle moments
- issuers match responsibility
- transitions reflect the intended process
- initialization includes the values required at the start