Skip to content

Caerlower/intentmesh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IntentMesh

IntentMesh is a verifiable multi-agent execution system.
It turns a user intent into coordinated agent actions, signs each step cryptographically, and anchors the final execution proof on-chain.


Why IntentMesh

Most AI-agent demos are powerful but opaque: you can see outputs, not guarantees.

IntentMesh focuses on verifiability:

  • each agent signs what it produced,
  • downstream agents verify upstream signatures,
  • final execution is recorded on-chain with immutable hashes.

This gives an auditable trace from user intent to blockchain proof.


Core Idea

User intent travels through a fixed agent graph:

Planner -> Data -> Strategy -> Execution

At each hop:

  1. agent receives structured input,
  2. agent returns structured JSON output,
  3. output is signed with that agent's private key.

The Execution agent then:

  • verifies prior signatures,
  • computes input_hash and output_hash,
  • submits proof to ExecutionRegistry smart contract.

System Architecture

Off-chain Layer (Python backend)

  • Planner Agent: decomposes user intent into tasks.
  • Data Agent: fetches ETH price from CoinGecko and attaches APY data.
  • Strategy Agent: verifies data signature and selects best strategy.
  • Execution Agent: verifies full chain, hashes I/O, submits on-chain proof.

On-chain Layer (Solidity / Foundry)

  • ExecutionRegistry stores immutable execution proofs:
    • submitting agent address (msg.sender)
    • input hash
    • output hash
    • timestamp
  • emits ProofSubmitted event for indexing and UI sync.

Frontend Layer (React + Vite)

  • visualizes multi-agent flow,
  • displays execution status and proof-oriented UX,
  • prepared for wallet-based interactions.

Repository Structure

intentmesh/
  backend/    # Python agents, crypto utilities, Web3 client
  contracts/  # Foundry contracts, deploy scripts, tests
  frontend/   # React/Vite interface
  README.md

Quickstart (Local)

1) Prerequisites

  • Python 3.10+
  • Node.js 20+
  • pnpm 10+ (preferred)
  • Foundry (forge, cast, anvil)

2) Backend setup

cd backend
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env

Set backend/.env:

COINGECKO_BASE_URL=https://api.coingecko.com/api/v3

PLANNER_PRIVATE_KEY=
DATA_AGENT_PRIVATE_KEY=
STRATEGY_AGENT_PRIVATE_KEY=
EXECUTION_AGENT_PRIVATE_KEY=

RPC_URL=
CHAIN_ID=11155111
PRIVATE_KEY=
CONTRACT_ADDRESS=

3) Contracts setup

cd ../contracts
forge build
forge test

Backend ABI source:

  • contracts/out/ExecutionRegistry.sol/ExecutionRegistry.json

4) Frontend setup

cd ../frontend
pnpm install
pnpm dev

Production build:

pnpm build

Deployment (Sepolia)

From contracts/:

forge script script/Deploy.s.sol:DeployScript \
  --rpc-url "$RPC_URL" \
  --private-key "$PRIVATE_KEY" \
  --broadcast

Then set deployed address in backend/.env:

CONTRACT_ADDRESS=<deployed_address>

Verification Model

IntentMesh provides verifiable execution using:

  • Signed agent outputs: each step is attributable to an agent identity.
  • Signature checks at strategy/execution boundaries: prevents silent tampering.
  • Deterministic hashing: canonical JSON -> keccak256.
  • On-chain anchoring: immutable proof record in ExecutionRegistry.

What is proven on-chain:

  • who submitted the proof,
  • hash of upstream input context,
  • hash of final output context,
  • submission time.

Local End-to-End Smoke Flow

  1. Start local chain:
    anvil
  2. Deploy contract in contracts/ using an Anvil key.
  3. Put local values into backend/.env (RPC_URL, PRIVATE_KEY, CONTRACT_ADDRESS).
  4. Start frontend and execute an intent flow from the UI.
  5. Confirm proof write via transaction hash / contract state.

Troubleshooting

  • Artifact not found ... ExecutionRegistry.json
    Run forge build in contracts/.

  • Failed to connect to RPC_URL
    Verify network endpoint, chain availability, and key funding.

  • signature verification failed
    Check that all agent private keys are set and not mixed.

  • Frontend dependency/runtime issues
    Reinstall and rebuild from frontend/:

    pnpm install
    pnpm build

About

IntentMesh is a verifiable multi-agent system where agent execution is signed off-chain and anchored on-chain.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors