ContractMind Documentation

Build intelligent AI agents that interact with smart contracts using natural language. No complex blockchain knowledge required.

What is ContractMind?

ContractMind is an enterprise-grade platform that enables anyone to interact with blockchain smart contracts through AI-powered agents. Instead of writing code or understanding complex blockchain APIs, you simply chat with an AI agent that handles all the technical complexity for you.

The platform combines three core technologies:

  • AI Language Models - Understands your intent and translates it to blockchain actions
  • Smart Contracts - Manages permissions and agent authorization on-chain
  • Web3 Interface - Beautiful, intuitive UI for wallet connection and agent management

Natural Language AI

Chat with smart contracts using plain English. No coding required.

Function Authorization

Granular control over which functions agents can access and execute.

Real-Time Execution

Instant transaction preparation with gas estimates and previews.

Context-Aware Chat

AI understands your contract's ABI and provides relevant suggestions.

Quick Start

Get ContractMind up and running in just a few minutes with this step-by-step guide.

1

Create an Agent

Connect a smart contract by providing its address and ABI. The platform automatically parses all available functions.

// Example: Create agent for a staking contract
Address: 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb
Contract: ERC20 Token with Staking
Functions: stake(), unstake(), getRewards(), balanceOf()
2

Authorize Functions

Choose which contract functions the AI agent can access. This provides granular security control.

Authorized Functions:

stake()unstake()balanceOf()getRewards()
3

Chat & Interact

Use natural language to interact with the contract. The AI prepares transactions automatically.

4

Execute with Wallet

Review and confirm transactions in your Web3 wallet. Full transparency and security.

Installation

Set up your development environment to work with ContractMind.

Prerequisites

  • Node.js 18+ and npm
  • Python 3.11+ and Poetry
  • PostgreSQL 14+
  • Foundry (for smart contracts)
Clone Repository
git clone <repository-url>
cd ContractMindInfra

# Install Frontend
cd frontend
npm install

# Install Backend
cd ../backend
poetry install

# Install Smart Contracts
cd ../contracts
forge install

Architecture

ContractMind consists of three main components working together to provide a seamless experience.

Frontend (Next.js)

Modern React application built with Next.js 14, TypeScript, and Tailwind CSS. Handles wallet connections, agent management, and chat interface.

Technologies: Next.js, TypeScript, Wagmi, Viem, Framer Motion

Backend (FastAPI)

Python-based API server handling AI orchestration, database management, and blockchain interactions. Integrates with OpenAI, Anthropic Claude, and Google Gemini.

Technologies: FastAPI, PostgreSQL, SQLAlchemy, Web3.py

Smart Contracts (Solidity)

On-chain permission management and agent registry. Deployed on Somnia Testnet with Foundry for development and testing.

Technologies: Solidity, Foundry, OpenZeppelin

AI Agents

AI agents are the core of ContractMind, translating natural language into smart contract interactions.

Coming Soon

Detailed documentation on AI agent architecture and customization.

Smart Contracts

Learn about the on-chain components that power ContractMind's permission system.

Coming Soon

Smart contract API reference and deployment guides.

Chat Interface

Interact with smart contracts using natural language through the intuitive chat interface.

Coming Soon

Chat interface features, commands, and best practices.

Frontend Development

Build and customize the ContractMind frontend application.

Coming Soon

Frontend architecture, components, and customization guides.

Backend Development

Understand the backend architecture and API implementation.

Coming Soon

Backend services, database schema, and AI integration.

Contract Development

Develop and test Solidity smart contracts for ContractMind.

Coming Soon

Smart contract development, testing, and deployment.

API Reference

Complete API documentation for integrating with ContractMind.

Coming Soon

REST API endpoints, WebSocket events, and authentication.

Deployment

Deploy ContractMind to production environments.

Coming Soon

Production deployment guides for all components.

Environment Setup

Configure environment variables and system requirements.

Coming Soon

Environment configuration and system requirements.

Best Practices

Learn best practices for building with ContractMind.

Coming Soon

Security, performance, and development best practices.