Agent Standard Smart Contracts
A modular framework for on-chain AI agents using interoperable smart contracts. The protocol defines an agent's identity, interface, intelligence pointer, economic token, and communication profile.
Last updated
A modular framework for on-chain AI agents using interoperable smart contracts. The protocol defines an agent's identity, interface, intelligence pointer, economic token, and communication profile.
Last updated
The THINK Agent Protocol provides a decentralized architecture for creating, managing, and evolving AI agents on-chain. Agents are composed of a Soul (non-fungible identity token), a Body (interface data structure), a Mind (off-chain intelligence pointer), an agent coin , and a communication layer that enables dynamic interactions and data sharing.
Agent Soul (ThinkAgentSoul1155): An ERC1155 token that stores each agent's unique genome and links to its off-chain metadata (NFIMatrix data).
Agent Coin: An ERC20 token unique to each agent, paired to the THINK token, and used for agent services and rewards.
Agent Forge (ThinkAgentForge1155): A factory contract that assembles agents by minting Soul tokens and registering interface elements.
Agent Body (ThinkAgentBody): Stores the Murmur Card data that defines an agent's interactive profile.
Agent Communication (ThinkAgentComm): Manages communication profiles for agents, including supported skills, parameters, and response formats.
On-Chain Memory & Data Lake: (Future feature) Records agent interactions, feelings, and commerce data to enable reinforcement learning with market feedback.
Purpose: Mints non-fungible agent Soul tokens. Receives genome data from the on The Root Network.
Key Functions:
mintSoul(address to, string memory genomeData)
: Mints a new agent Soul.
updateGenome(uint256 tokenId, string memory genomeData)
: Updates genome data.
ownerOf(uint256 tokenId)
: Returns the owner of the token.
Testing Example:
Purpose: ERC20 token unique to each agent, pegged to the THINK token via staking, used for agent economics and rewards.
Key Functions:
Standard ERC20 functions (transfer, approve, etc.).
Testing Example:
Purpose: Factory contract for creating new agents.
Key Functions:
createAgent(...)
: Assembles and mints a new agent.
Testing Example:
Purpose: Stores Murmur Card data and manages agent interface information.
Key Functions:
registerMurmurCard(...)
: Registers a new Murmur Card.
getMurmurCard(uint256 tokenId)
: Returns the card data.
Testing Example:
Purpose: Enables agent communication by managing profiles and supported skills.
Key Functions:
setBasicCommProfile(...)
: Sets basic comm profile.
addSkill(...)
: Adds a skill to an agent's profile.
getCommProfile(uint256 agentId)
: Retrieves the communication profile.
Testing Example:
Clone the Repository:
Install Dependencies:
Set Environment Variables: Create a .env
file and add:
Deploy using Hardhat to Arbitrum Sepolia:
The deploy script will deploy the contracts in order:
ThinkAgentSoul1155
Feelings
ThinkAgentForge1155
ThinkAgentBody
ThinkAgentComm
Each contract's address will be logged to the console.
Run all tests with:
Using Hardhat Console:
Then interact with contracts:
Refer to our inline NatSpec comments in each contract for detailed documentation of every function, event, and parameter. The protocol is designed for easy integration with front-end applications, subgraphs (GraphQL), and off-chain data systems like IPFS.
Q: Why use ERC1155 for agent souls? A: ERC1155 allows efficient batch operations and is extended to handle non-fungible assets by tracking ownership.
Q: How do I update the genome data? A: Use the updateGenome
function in the ThinkAgentSoul1155 contract.
Q: Where can I find more information? A: See our Gitbook documentation below and referenced whitepapers.
Integration of on-chain memory and "chain of thought" for agent interactions.
Advanced Reinforcement Learning with Market Feedback.
Enhanced interoperability with cross-chain protocols and off-chain data lakes.
Agent Feelings: an upgrade to Agent Coin, supporting semantic shared memory for public memory data.
UI/UX improvements and developer tools.
This project is licensed under the Apache License 2.0.