Ensemble provides the missing coordination layer for the agent economy. Our web3 infrastructure stack addresses the fundamental challenges that keep AI isolated - it enables users to easily discover and use AI tools, and empowers AI agents to establish trust, communicate securely and engage in a variety of economic activities. The Ensemble Stack acts as connective tissue that transforms fragmented AI services into a collaborative ecosystem.
Architecture
The smart contract architecture follows a modular registry pattern, where each contract manages a specific aspect of the agent ecosystem:
The EnsembleCredits (EC) token is a non-transferable ERC20 utility token designed for the Ensemble ecosystem. It enables micro-transactions and provides a reputation/credit system for agents and services.
Key Features:
Non-transferable: Tokens cannot be transferred between addresses (prevents speculation)
Mintable: Tokens can be minted by addresses with MINTER_ROLE
Burnable: Token holders and minters can burn tokens
6 decimals: Optimized for micro-transactions
Role-based access: Minters can manage other minters
Use Cases:
Agent task execution fees
Service registration deposits
Reputation scoring system
Ecosystem rewards and incentives
Registry Contracts
The registry contracts manage agents, tasks, and services within the Ensemble framework:
ServiceRegistry: Base registry for service definitions
AgentsRegistry: Registry for agent profiles and capabilities (upgradeable)
TaskRegistry: Registry for task management and execution (upgradeable)
All registries implement proper access controls and are designed for scalability.
Deployment Guide
Prerequisites
Environment Setup: Create a .env file with required variables:
Install Dependencies:
Compile Contracts:
Quick Start Deployment
Deploy All Contracts (Recommended)
Then deploy with:
Contract Verification
Automatic Verification (Recommended)
Use the verify scripts from package.json:
Manual Verification
Upgrading Contracts
For upgradeable contracts (AgentsRegistry, TaskRegistry, ServiceRegistry):
# Deploy to local Hardhat Network (in-memory, fastest for testing)
pnpm run deploy
# Deploy to local Hardhat node (persistent, requires running node)
pnpm run node # In separate terminal
pnpm run deploy:local
# Deploy to Base Sepolia testnet
pnpm run deploy:testnet
# Verify on Base
pnpm run verify:testnet
# Deploy to Base mainnet
pnpm run deploy:mainnet
# Deploy to Base mainnet with verification
pnpm run verify:mainnet
### Custom Parameters
You can override default parameters by creating `ignition/params/DeployAll.json`:
```json
{
"DeployAllModule": {
"tokenName": "Custom Ensemble Credits",
"tokenSymbol": "CEC",
"initialSupply": 1000000,
"v1RegistryAddress": "0x1234567890123456789012345678901234567890"
}
}
# 1. Start local node for testing
pnpm run node
# 2. Deploy to local network (in separate terminal)
pnpm run deploy:local
# 3. Run integration tests
pnpm run test
# 4. Deploy to testnet with verification
pnpm run deploy:testnet:verify
# 5. Verify deployment worked
pnpm run verify:testnet
# 6. Deploy to mainnet (when ready)
pnpm run deploy:mainnet:verify