Abstract
This ERC defines IAgentWorkflow: a standard on-chain interface for AI agent task execution. It pursues three goals: a universal execution interface so agents can be developed independently of any application framework and compete across protocols; an on-chain orchestration framework so reliability mechanisms such as BFT voting, competitive selection, and commit-reveal are enforceable by contract rather than assumed from off-chain coordination; and a full execution evidence chain so trust in results derives from structure β any party can traverse the on-chain AgentTask / AgentReply chain from run() to result() and verify every step independently, without trusting any individual agent.
Motivation
1. A universal execution interface frees agents from application frameworks.
The emerging on-chain AI agent ecosystem has produced complementary standards β agent identity (ERC-8004), agentic commerce (ERC-8183), skill registry (ERC-8257) β each well-scoped to its layer. But every protocol that needs to invoke an agent defines its own invocation format in isolation: ERC-8183 encodes tasks as a free-form description string; ERC-8004 delegates execution entirely to off-chain conventions. Without a shared interface, agent builders must re-implement adapters for each protocol, agents are locked to the frameworks that built them, and competition between agents across protocols is structurally impossible.
2. An on-chain orchestration framework enables reliable distributed execution.
Off-chain orchestration frameworks (LangGraph, AutoGen, CrewAI) coordinate agents for efficiency, but their results are only as trustworthy as the agents themselves. On-chain, the execution structure can itself be the trust mechanism: when workflow logic lives in a contract, every stage transition is gate-enforced and no agent can bypass or reorder it. Patterns such as commit-reveal, BFT voting, and competitive selection are reliability mechanisms β they only compose correctly when the workflow is enforced by a contract rather than coordinated off-chain.
3. Trust through structure: on-chain evidence chain makes results independently verifiable.
Even when agents are permissionless and unknown, the execution itself can be trusted if every step is anchored on-chain. The bidirectional prevReplyHashes / prevTaskHashes chain means that any party β not just the caller β can traverse from result().finalTaskHash back to run() and verify every transition was gate-approved and every reply was submitted by the claimed replier. Trust in the result does not require trusting any individual agent; it requires only trusting the workflow contractβs gate logic.
(The content below is a historical draft and may no longer reflect the current specification. For the latest version, please see the PR linked above
)
Hi everyone
,
Wanted to share a gap that has come up repeatedly while working across ERC-8274, ERC-8183, and ERC-8004 β and see if others have run into the same friction.
The on-chain AI agent ecosystem has made real progress across several layers: agent identity (ERC-8004), inference proof verification (ERC-8274), proof anchoring (ERC-8263), agentic commerce (ERC-8183). But there is one foundational primitive still missing β a standard for how a smart contract invokes an AI agent and receives its output.
Today, every dApp that wants to call an AI agent defines its own task format, and every agent must implement a separate adapter per dApp:
dApp A defines its own task format β agent X adapts
dApp B defines a different format β agent X adapts again
dApp C defines yet another format β agent X adapts again
...
agent Y must do the same for A, B, C β NΓM integration complexity
This is the same fragmentation ERC-8274 solved at the verification layer. The task layer has the same problem one level up.
Motivation
The on-chain AI agent stack maps naturally to six base-layer primitives, analogous to blockchainβs foundational properties:
| Primitive | Blockchain Analogue | ERC |
|---|---|---|
| Identity | Address | ERC-8004 |
| Execution | Smart Contract (definition + invocation) | missing |
| Verify | Consensus | ERC-8274 |
| Anchor | On-chain State | ERC-8263 |
| Settlement | Value Transfer | ERC-8275 |
| Prove | Logs / Audit Trail | ERC-8281 + ERC-8299 |
There are also two layers built on top of this base:
βββ Ecosystem Layer βββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β βββββββββββββββββ βββββββββββββββββ βββββββββββββββββββββββββ β
β β ERC-8183 β β ERC-8273 β β ERC-8257 β β
β β Labor Market β βAuthorization β β Skill Registry β β
β βββββββββββββββββ βββββββββββββββββ βββββββββββββββββββββββββ β
β β
βββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββ
β all depend on
βββ Base Layer ββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββ
β β
β Identity β Execution β Verify β Anchor β Settlement β Prove β
β ERC-8004 [This ERC] ERC-8274 ERC-8263 ERC-8275 8281+8299 β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Execution is the last missing brick in the base layer. Without it, every ecosystem ERC is forced to define its own task format rather than composing on a shared primitive β ERC-8183 uses a free-form description string, ERC-8001 uses opaque executionData bytes, ERC-8004 delegates entirely to off-chain A2A/MCP.
Proposal
The proposal defines three minimal components. The design explicitly excludes agent routing, task state management, labor markets, and semantic task definitions β this is a protocol layer, not an application layer.
AgentTask β Task Definition
struct AgentTask {
bytes32 taskId; // Unique task identifier; caller-supplied
bytes32 agentWorkflowHash; // keccak256 of the workflow definition (CID or inline JSON)
bytes agentWorkflow; // Workflow definition plaintext; OPTIONAL (hash is authoritative)
address handler; // Contract implementing IAgentHandler
uint256 deadline; // Task expiry as Unix timestamp
}
IAgentCaller β Task Dispatch
interface IAgentCaller {
event CallAgent(
bytes32 indexed taskId,
address indexed requester,
bytes32 agentWorkflowHash,
bytes agentWorkflow,
bytes32 inputHash,
bytes input,
address handler,
uint256 deadline
);
function callAgent(
AgentTask calldata task,
bytes32 inputHash,
bytes calldata input
) external returns (bytes32 taskId);
}
IAgentHandler β Workflow Callbacks
interface IAgentHandler {
function onAgentStep(
bytes32 taskId,
bytes32 inputHash,
bytes32 outputHash,
bytes calldata output,
uint256 agentId,
address agent,
uint8 stage,
bool isFinal,
bytes calldata data
) external;
function onAgentProve(
bytes32 taskId,
bytes32 inputHash,
bytes32 outputHash,
bytes calldata proof,
address verifier,
uint8 stage
) external;
}
Every step is paired with a prove: onAgentStep commits the result, onAgentProve verifies it. The minimum path is callAgent() β onAgentStep(stage=0, isFinal=true) β onAgentProve(stage=0).
The workflow model supports two resolution strategies per stage:
- Async (default): steps can chain without waiting for prove. The invariant: before the final prove is accepted, every preceding stage must have a valid prove on record.
- Sync: each stepβs prove must pass before the next step is accepted β a rejected prove gates the workflow from advancing.
The core idea: use the workflow model to orchestrate decentralised agent nodes so that every step in the pipeline produces a verifiable result that can be trusted on-chain. The mechanism is the stepβprove pair β each scenario below is expressed through a combination of onAgentStep and onAgentProve calls, governed by the workflow document. This lets callers compose their own execution pipeline without hardcoding any particular agent, proof system, or coordination pattern into the interface.
Four scenarios the workflow model can express:
- Input Provenance β WYRIWE attestation, OCP temporal anchoring, pre-action gating, TEE channel establishment
- Decentralised agent node selection β which independently operated gateway (e.g. a ccip-router instance) executes the task: bid, random, reputation-weighted, or stake-based
- Multi-agent orchestration β sequential chains, parallel fanout, conditional routing, inter-agent messaging
- Output consensus β commit-reveal (the ERC-8275 pattern), BFT-style voting, optimistic finalization with challenge window
The spec is up at PR #1815. Discussion and feedback welcome β especially on the workflow scenarios and the sync/async proof model.