Capx Chain operates as an optimistic rollup. This means it "optimistically" assumes all transactions are valid and processes them off-chain on its Layer 2. It then periodically submits batches of these transactions (as compressed calldata) to the Ethereum Layer 1 (L1) for final settlement. If a fraudulent transaction is suspected, a dispute resolution process (fraud proof) is initiated. Nitro features interactive fraud proofs, which are designed to be more efficient by re-executing only the disputed part of a transaction.
## Key Architectural Layers & Components
### **1. Ethereum Layer 1 (The Foundation)**
* **Consensus Layer (Leveraged by Capx):** Capx Chain relies on the underlying Ethereum blockchain for its security and finality. It doesn't have its own separate consensus mechanism for L2 state in the same way a Layer 1 blockchain does. Instead, the validity of Capx Chain's state is ultimately guaranteed by the ability to prove it on Ethereum L1.
* **Capx L1 Smart Contracts:** These are crucial contracts deployed on Ethereum that manage the rollup protocol. Key contracts include:
* **Inbox Contract (SequencerInbox):** This contract receives batches of ordered and compressed transactions from the L2 Sequencer.
* **Outbox Contract:** Facilitates communication and asset transfers from Capx Chain L2 back to Ethereum L1.
* **Rollup Core Contracts (e.g., RollupCore.sol):** Manage the state of the rollup, track assertions made by validators about the L2 state, and facilitate the fraud proof mechanism.
* **Bridge Contracts:** Enable the transfer of assets (ETH and ERC-20 tokens) between Ethereum L1 and Capx Chain L2.
### **2. Capx Chain Layer 2 (The Scaling Engine)**
#### **Networking Layer (L2):**
* **Sequencer:** This is a key component in Capx Chain. The Sequencer orders transactions, compresses them, and posts these batches as calldata to the Ethereum L1 Inbox contract. It provides users with fast, "soft" finality (confirmation within 1-2 seconds).
* **Validators/Full Nodes (L2):** These nodes execute all L2 transactions and can challenge the Sequencer's assertions if they detect an incorrect state transition. They play a crucial role in security by observing the chain and initiating fraud proofs if necessary.
* **RPC Endpoints:** Allow users and dApps to interact with the Capx Chain network (submit transactions, query state, etc.).
#### **Execution Layer (L2):**
This is where smart contracts are executed on Capx Chain.
* **Arbitrum Virtual Machine (AVM) - Powered by Nitro:** Nitro significantly upgraded Arbitrum's execution environment. A key innovation is compiling the core of Geth (Go Ethereum, the most popular Ethereum client) directly into Arbitrum. This provides high EVM compatibility, meaning most Ethereum smart contracts can run on Capx Chain with minimal to no changes.
* **WASM (WebAssembly):** Nitro utilizes WASM for its fraud proofs. The L2 Capx Chain engine can be written and compiled using standard languages, and for fraud proofs, the relevant code (specifically the State Transition Function) is compiled to WASM. This separation of execution (native code for speed) and proving (WASM for verifiability and portability) is a core design principle.
* **ArbOS:** This is a custom operating system for the L2 chain. It handles L2-specific functionalities such as calldata decompression, gas fee management, cross-chain communication between L1 and L2, and managing smart contract lifecycles. The Nitro version of ArbOS was rewritten in Go.
* **State Transition Function (STF):** This deterministic function defines how the state of the L2 chain changes in response to transactions. It's compiled into native machine code for fast execution by Nitro nodes and into WASM for fraud proofs.
* **Stylus:** An upgrade that allows developers to write smart contracts in languages like Rust and C++ that compile to WASM, in addition to Solidity for the EVM. These WASM contracts can interoperate with EVM contracts.
#### **Data Availability (DA) Layer Strategy:**
* **The Role of Data Availability:** For an optimistic rollup like Capx Chain, ensuring data availability is paramount. It means that all the data required to reconstruct the L2 state and verify transactions must be accessible to anyone. This allows validators to check for fraud and users to exit the L2 even if the Sequencer becomes malicious or unavailable.
* **Capx Chain's Approach to DA:** Capx Chain, leveraging the flexibility of the Arbitrum Nitro stack, has the capability to integrate with alternative Data Availability solutions. This can include options like an AnyTrust model using a Data Availability Committee (DAC) for significantly lower costs, or dedicated third-party DA layers (e.g., Celestia, EigenDA, Avail) which offer different trade-offs in terms of cost, throughput, and security assumptions.
* **Impact on Users & Developers:** The choice of DA layer directly impacts transaction costs on Capx Chain. Using Ethereum L1 is typically more expensive but offers stronger security guarantees. Alternative DA solutions aim to reduce these costs, potentially enabling new types of applications, but may involve different trust assumptions (e.g., trusting a DAC in an AnyTrust model).
#### **Key Built-in Contracts/Modules (L2):**
* **Token Bridging Contracts (L2 Side):** Work in conjunction with the L1 bridge contracts to facilitate asset movement.
### **Interactions & Flows:**
1. **Transaction Submission:** Users submit transactions to an Capx Chain L2 node (often the Sequencer).
2. **Sequencing & Batching:** The Sequencer orders transactions, compresses them, and posts a batch to the L1 Inbox contract.
3. **L2 Execution:** Capx Chain nodes execute the transactions using the Nitro runtime (Geth core + ArbOS).
4. **State Assertion:** Validators (or the Sequencer acting as an asserter) post assertions about the new L2 state to the L1 Rollup Core contracts.
5. **Challenge Period & Fraud Proofs:** There's a period during which any validator can challenge an assertion if they believe it's incorrect. If challenged, an interactive fraud proof process occurs, re-executing disputed parts in WASM on L1 to determine the correct outcome.
6. **Finality on L1:** Once a state assertion is confirmed on L1 (either unchallenged after the dispute period or successfully defended through a fraud proof), it's considered final.
7. **Withdrawals (L2 to L1):** Users initiate withdrawals on L2, which are then processed through the Outbox contract on L1 after a delay period (to allow for fraud proofs).
# Consensus Mechanism
Source: https://docs.capx.ai/capx-chain/core-concepts/consensus
Capx Chain, utilizing the Arbitrum Nitro stack, achieves consensus through an optimistic rollup mechanism. This means L2 (Capx Chain) transactions are executed and batched with the optimistic assumption of validity for speed and low cost. True finality and security are derived from the underlying L1 (Ethereum) through a system of state assertions and fraud proofs.
1. `User ---sends L2 Tx---> [Capx Chain Sequencer]` 2. `[Sequencer]` * Orders transactions. * Executes transactions, computes new L2 state. * Creates a `[Transaction Batch]` and a new `[L2 State Root_S]`. * Provides `---Soft Confirmation---> User`. 3. `[Sequencer] ---submits Tx Batch (calldata)---> [L1 Ethereum: Inbox Contract]` * *Data is now anchored on L1, ensuring Data Availability.*
(L1: Assertion & Challenge Period)4. `[Asserter (e.g., Sequencer)] ---posts Assertion(L2 State Root_S)---> [L1 Ethereum: Rollup Core Contract]` 5. `[Rollup Core Contract] ---initiates Challenge Period (e.g., 7 days)---` * *During this period, any validator can challenge the assertion.* * *Validators can independently verify the state root by executing the transactions in the batch.* * *The challenge period allows for a dispute resolution process if discrepancies arise.*
(L2 & L1: Validation & Potential Challenge)6. `[Capx Chain Validators (L2 Full Nodes)]`: * Fetch `[Transaction Batch]` from L1 Inbox. * Independently execute transactions, compute their own `[L2 State Root_V]`. * Compare `[L2 State Root_V]` with asserted `[L2 State Root_S]` on L1. 7. **Decision Point during Challenge Period:** * **IF `State Root_V == State Root_S` (Happy Path):** * Validators take no action against this assertion. * `IF Challenge Period Ends without successful challenge:` * `[L1 Ethereum: Rollup Core Contract] ---confirms Assertion---> [L2 State Root_S is Finalized]` ✅ * **This is L1-Secured Finality for the L2 Block.** * **IF `State Root_V != State Root_S` (Dispute Path):** * `[A Challenging Validator] ---initiates Fraud Proof against Assertion(L2 State Root_S)---> [L1 Ethereum: Rollup Core Contract]` * **Fraud Proof Process (Interactive Bisection in Nitro):** * The contract facilitates an interactive game between the Asserter and Challenger. * They narrow down the dispute to a single differing instruction in the L2 execution. * This single instruction is then executed via a WASM module on L1 (the `OneStepProof` mechanism) to determine the correct state transition. * `IF Challenger Wins:` Fraudulent assertion is rejected, Challenger is rewarded, Asserter is penalized. The correct state can be asserted. * `IF Asserter Wins:` Challenge is dismissed, Challenger may lose their stake. Assertion proceeds towards finalization.
## Component Overview
### 1. User
The individual or team responsible for initiating development by providing or generating source code and interacting with the platform to deploy, test, and iterate on agentic systems.
### 2. AI Generated Code / Custom Code
The foundational logic used to create and define Services, MCP Servers, and AI Agents, encompassing both custom-written and AI-generated implementations.
### 3. Services
General-purpose modules such as APIs, user interfaces, backend logic, data processors, scrapers, indexers, inference wrappers, or cryptographic tools. These provide reusable, foundational functionalities utilized independently or by MCP Servers and AI Agents.
### 4. MCP Servers (Model Context Protocol Servers)
Lightweight programs that expose specific capabilities through the standardized Model Context Protocol. They act as gateways to data sources, handling authentication, data retrieval, and formatting, enabling AI applications to access external data in a standardized manner .
### 5. AI Agents
Autonomous, intelligent entities backed by Large Language Models (LLMs), capable of reasoning, responding to events, automating tasks (e.g., chatbots, auto-traders), and coordinating in multi-agent systems. They perform complex, intelligent, or interactive tasks, acting as the active logic or "brain" within the platform.
### 6. Deploy + Run Agentic Systems
The overarching environment responsible for deploying and operating all components (Services, MCP Servers, AI Agents).
### 7. Sandbox Deployment
A controlled, secure, and isolated environment facilitating the deployment of components for iterative testing and refinement before production deployment.
### 8. Execution Sandbox
A secure, isolated runtime environment that ensures secure execution and maintains state/data persistence, crucial for testing stateful applications and iterative development. It also provides diagnostic data for debugging, performance monitoring, and iterative improvements.
### 9. Feedback / Logs
Diagnostic outputs from the Execution Sandbox, essential for developers to understand system behavior, identify issues, and inform iterative improvements.
### 10. Iterate
The cyclical process of refining components based on feedback, logs, and insights from previous deployments until satisfactory outcomes are achieved.
### 11. Security Coach
An integrated security tool that performs real-time threat modeling, analyzing sandboxed applications for potential vulnerabilities, thereby proactively enhancing the system's security.
# Operators as Infrastructure Providers
Source: https://docs.capx.ai/capx-cloud/core-concepts/operators
Operators serve as the backbone of Capx Cloud’s decentralized compute layer.
Operators are the custodians of the Capx Cloud network, managing the infrastructure that keeps everything running smoothly. Their responsibilities extend across multiple layers of the network, ensuring the stability, scalability, and security of decentralized services. Operators play a crucial role in maintaining node uptime, managing upgrades, and safeguarding the infrastructure against threats.
They are not merely random nodes; they are vetted entities who:
* **Opt into Vaults and Networks**: After registration, operators must opt into specific vaults to gain access to staked collateral and into particular networks (like Capx Cloud) to become eligible for task allocations. Through this process, operators signal where they want to provide their services and under what economic terms.
* **Performance Tracking**: Every operator’s performance—**uptime, compliance with SLAs, correctness of task execution**—is continuously monitored. Operators that maintain exceptional standards enjoy higher trust, better task allocation opportunities, and greater financial rewards.
**Key Responsibilities:**
* **Infrastructure Management:** Operators oversee the setup, configuration, and maintenance of nodes, ensuring optimal performance and minimal downtime.
* **Security Enforcement:** They implement security protocols to protect nodes from threats and ensure data integrity.
* **Governance Participation:** Operators engage in the network's governance processes, contributing to decision-making on protocol upgrades, policy changes, and other critical matters.
Through the Symbiotic protocol, operators can accept stakes from diverse partners via unified vaults. This system enables operators to run a single infrastructure for multiple stakeholders without the complexity of separate setups. By doing so, operators improve resource efficiency while broadening access to network services for stakers and users alike.
## Types of Operator Nodes
Operators can run different types of nodes, each serving a unique purpose within the Capx Cloud ecosystem. The main types include:
{user?.email || user?.wallet?.address}
{wallet.address}
Chain: {wallet.chainId}
Open your terminal and run:
```bash theme={null}
npx capx-compose arbitrum-agent
```
The CLI will guide you through the setup. For now select:
1. **Web3** - Blockchain/DeFi Application (we're building on-chain)
2. **EVM** - Ethereum Virtual Machine (for Arbitrum and other L2s)
3. **Goat** - Press space to select this AI agent plugin, then enter
4. **No** for ESLint (optional for hackathons)
5. **Yes** to automatically install dependencies
6. **Auto-detect** for package manager
Wait about 3 minutes for the setup to complete. This automatically sets up a Next.js project with:
* **GOAT SDK** configured for blockchain operations
* **EVM wallet integration** auto-included
* **Vercel AI SDK** for streaming GPT responses
* **Working examples** you can extend immediately
### **Step 2. Configure your environment**
Now your project setup is done, navigate to your project & run the following command:
```bash theme={null}
cd arbitrum-agent
cp .env.example .env.local
```
Open .env.local and add your credentials:
```bash theme={null}
# OpenAI Configuration
OPENAI_API_KEY=sk-... # Get from platform.openai.com/api-keys
# Blockchain Configuration
GOAT_CHAIN=evm
WALLET_PRIVATE_KEY=0x... # Your test wallet private key (we'll create this next)
RPC_PROVIDER_URL=https://sepolia-rollup.arbitrum.io/rpc # Arbitrum testnet
# Optional RPCs (if you need better reliability)
NEXT_PUBLIC_INFURA_PROJECT_ID=... # From infura.io
NEXT_PUBLIC_ALCHEMY_API_KEY=... # From alchemy.com
```
Note: The default RPC suggests Base Sepolia, but we're using Arbitrum Sepolia for this guide.
### **Step 2.5. Create a test wallet**
Since we need a wallet private key, let's create one:
### **Option 1: Using MetaMask (Easiest)**
1. Open MetaMask browser extension
2. Click the account icon → Add Account or Wallet → Create a new account → Ethereum
3. Name it "Hackathon Test" (so you remember it's not your main)
4. Click the three dots → Account details → Export Private Key
5. Enter your password and copy the key
6. Paste it in .env.local as WALLET\_PRIVATE\_KEY=0x...
### **Option 2: Generate programmatically**
```jsx theme={null}
node -e "const { Wallet } = require('ethers'); const w = Wallet.createRandom(); console.log('Address:', w.address); console.log('Private Key:', w.privateKey);"
```
Copy the private key to your .env.local.
> *Important: This is a test wallet. Never put real funds in it. Never use your main wallet for hackathon projects.*
### **Step 3. Configure for Arbitrum**
The template defaults to Base. Let's configure it for Arbitrum specifically.
Find your wallet config file at src/utils/wallet-config.ts and update the chain import:
```tsx theme={null}
import { createWalletClient, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { arbitrumSepolia } from "viem/chains"; // Change this from baseSepolia
import { getOnChainTools } from "@goat-sdk/adapter-vercel-ai";
import { viem } from "@goat-sdk/wallet-viem";
// Update the wallet client configuration
const walletClient = createWalletClient({
account: wallet.account,
transport: http(rpcUrl),
chain: arbitrumSepolia, // Update from baseSepolia
});
// Also update the network info
export function getWalletInfo(chain: ChainType) {
return {
network: 'Arbitrum Sepolia',
explorer: 'https://sepolia.arbiscan.io'
};
}
```
### **Step 4. Get test ETH**
You'll need some testnet ETH for gas fees:
1. Copy your wallet address (from MetaMask or log it from your code)
2. Visit [https://faucet.quicknode.com/arbitrum/sepolia](https://faucet.quicknode.com/arbitrum/sepolia)
3. Paste your address and claim
4. You'll receive 0.001 ETH, enough for plenty of transactions on Arbitrum
### **Step 5. Test your app**
Start the development server:
```bash theme={null}
npm run dev
```
Navigate to [http://localhost:3000](http://localhost:3000) and click on the "GOAT Example" card to open the agent interface.
Make sure everything's working.
Try asking your agent: "What's my ETH balance?" You should see your balance (0.001 ETH if the faucet just sent it) and your wallet address.
If it shows 0 ETH, wait 30 seconds for the faucet transaction to confirm. Now let's do something real, send a transaction: "Send 0.0001 ETH to 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb9"
Your agent will execute the transaction and give you a transaction hash with an Arbiscan link. Click it to verify on-chain - you'll see the transaction confirmed in 2-3 seconds with a green checkmark, showing your wallet as the sender.
**Verifying Your Transaction**
Let's make sure it worked:
1. Click the explorer link in the response, or
2. Visit [https://sepolia.arbiscan.io](https://sepolia.arbiscan.io)
3. Paste your transaction hash in the search box
4. You should see:
* **Status:** Success (green checkmark)
* **From:** Your wallet address
* **To:** The recipient address
* **Value:** 0.0001 ETH
* **Block:** Confirmed within 2-3 seconds
# Overview
Source: https://docs.capx.ai/guides/capx-compose/arb-defi-agent/index
Picture this: you're at a hackathon, 24 hours to build something cool. Half your team wants to build a DeFi agent, an AI that can actually execute trades and move money through chat which sounds amazing until you realize you spent 6+ of those hours just setting up things (Web3 connections, debugging wallet signatures…etc). We've all been there. You start with big dreams of building the next autonomous trading bot, but six hours later you're still trying to get Metamask to talk to your backend and the worst part is : Your actual idea hasn't even been touched yet.
In this guide we'll learn how to do this quickly so you can actually ship.
## **What are we building today?**
A DeFi agent is essentially a chatbot with blockchain superpowers. When you type "send 0.1 ETH to alice.eth", it understands your intent, connects to the blockchain, executes the transaction, and reports back all through a conversational interface. Think of it as having a smart assistant that speaks both human language and blockchain.
By the end of this guide you'll have a DeFi agent on Arbitrum that can:
* Send ETH to any address on Arbitrum
* Send ERC-20 tokens (USDC, PEPE configured by default)
* Check wallet balances
* Respond to natural language commands
* Execute real blockchain transactions
We'll scaffold the foundation with all the blockchain integrations pre-configured, then use Cursor's AI capabilities to add whatever custom features your hackathon idea needs.
## **The integrations that make this possible**
* [**GOAT SDK**](https://github.com/goat-sdk/goat) (by [Crossmint](http://crossmint.com/)) - enables you to give your AI agent a wallet and 200+ tools to transact, trade, and invest on-chain.
* [**Vercel AI SDK**](https://ai-sdk.dev/) - handles streaming conversations and tool calling with OpenAI's GPT models
* [**Viem**](https://viem.sh/) - modern, type-safe library for Ethereum and L2 interactions
* **Next.js** - powers the web interface and server-side API routes
We'll be working on Arbitrum Sepolia testnet for testing. Transactions cost virtually nothing and confirm in seconds. Once your agent works perfectly, switching to mainnet is just changing the RPC URL and chain import.
## **Prerequisites**
Before we begin, make sure you have:
* Node.js 18 or higher installed
* An OpenAI API key from [https://platform.openai.com/](https://platform.openai.com/)
* Cursor, Claude, or any AI IDE for the customization part later
* A test wallet (we'll create one together)
# Troubleshooting
Source: https://docs.capx.ai/guides/capx-compose/arb-defi-agent/troubleshooting
Running into issues? Here are quick fixes:
* **"Insufficient balance"** - Faucet ETH hasn't arrived yet
* **Agent not responding**
* Verify your OpenAI API key is valid and has credits
* Check browser console for specific error messages
* Ensure all environment variables are set correctly
* **"Cannot connect to RPC"** - Check RPC\_PROVIDER\_URL in .env.local
* **TypeScript errors** - Make sure you imported arbitrumSepolia at the top of wallet-config.ts
# What's next?
Source: https://docs.capx.ai/guides/capx-compose/arb-defi-agent/whats-next
You've just built a functional DeFi agent! Here are some ideas to extend it:
## Next Steps
### **Extend with AI tools**
Start vibe coding with Cursor (or any AI IDE):
```bash theme={null}
cursor . # Opens project in Cursor
```
Your agent's configuration lives in the wallet config file we just edited. In Cursor, press Cmd+K (or Ctrl+K on Windows) and describe what you want:
* "Add Uniswap integration for token swaps"
* "Create a portfolio dashboard showing all holdings"
* "Add quick action buttons for common operations"
* "Show L1 and L2 gas costs separately"
Ask your AI to understand the GOAT SDK integration and then generate compatible code that works with your existing setup.
### **Want token swaps? Add Uniswap:**
Goat supports a lot of plugins.
See a list of all the plugins that [GOAT](https://github.com/goat-sdk/goat) supports [here](https://github.com/goat-sdk/goat).
```bash theme={null}
npm install @goat-sdk/plugin-uniswap
```
Then update your plugins in wallet-config.ts:
```tsx theme={null}
import { uniswap } from "@goat-sdk/plugin-uniswap";
plugins: [
sendETH(),
erc20({ tokens: [USDC, PEPE] }),
uniswap({
apiKey: process.env.UNISWAP_API_KEY // Optional, get from hub.uniswap.org
})
]
```
Note : When adding plugins for GOAT always check you have the right configurations for it. For example, some plugins only work on mainnet or a particular chain.
## **Ready for mainnet?**
When you're ready for real transactions, update your configuration:
```bash theme={null}
.env.local:
RPC_PROVIDER_URL=https://arb1.arbitrum.io/rpc
# Add a mainnet private key with actual ETH
```
Code update in wallet-config.ts:
```tsx theme={null}
import { arbitrum } from "viem/chains"; // Instead of arbitrumSepolia
```
# Conclusion
Source: https://docs.capx.ai/guides/capx-compose/sol-defi-agent/conclusion
In less than 10 minutes, you've built a DeFi agent that would have taken hours to set up from scratch. The combination of capx-compose for scaffolding and Cursor for AI-assisted development gives you production-ready infrastructure with the flexibility to build exactly what you want.
Open your terminal and run
```jsx theme={null}
npx capx-compose solana-defi-agent
```
The CLI will guide you through the setup. For our now select :
1. Select **WEB3** for blockchain apps
2. Choose **SOLANA** as your blockchain
3. Select **GOAT** (works with both EVM and Solana)
Wait about 3 minutes for the setup to complete.
***Note**: GOAT SDK works with both EVM and Solana blockchains, while Solana Agent Kit only works with Solana.*
This automatically setups a Next.js project with starter examples :
* **GOAT SDK** optimized for Solana blockchain operations
* **Vercel AI SDK** for streaming chat with GPT models
* **Solana Web3.js** for wallet interactions
* **Next.js 14** with TypeScript and Tailwind CSS
### Step 2. Configure your environment
Now your project setup is done, navigate to your project & run the following command:
```jsx theme={null}
cd solana-defi-agent
cp .env.example .env.local
```
Open `.env.local` and add your credentials:
```jsx theme={null}
# OpenAI Configuration
OPENAI_API_KEY=sk-... # Get from platform.openai.com/api-keys
# Blockchain Configuration
GOAT_CHAIN=solana
SOLANA_PRIVATE_KEY=... # Your solana burner wallet private key (base58 format)
RPC_PROVIDER_URL=https://api.devnet.solana.com # Start with devnet
```
Note :
* For the Solana wallet, create a new one in Phantom wallet and export the private key
* Use devnet for testing (get free SOL from [faucet.solana.com](https://faucet.solana.com/))
### Step 3. Test your app
Start the development server by running the following command in your terminal :
```bash theme={null}
npm run dev
```
This will start the dev server. Navigate to the URL on your browser (eg [http://localhost:3000/](http://localhost:3000/)) and test the app. Open GOAT example and try these commands:
* "What's my SOL balance?"
* "Send 0.1 SOL to \[wallet address]"
* "Show my wallet address"
* "Check transaction history"
Your assistant will respond naturally and execute the blockchain operations. If everything works proceed to the next step if not, check your configurations.
### Step 4. Customise and extend with your favourite AI tool
Start vibe coding with Cursor (or any AI IDE):
```bash theme={null}
cursor . # Opens project in Cursor
```
Your agent's brain lives in `goat.ts`.
This file contains the system prompt that defines how your agent behaves. Feel free to customise how it works.
In Cursor, select any file and press Cmd+K (or Ctrl+K on Windows) and type natural language commands like:
* "Add a quick actions panel with buttons for checking balance on our UI"
* "Make the chat interface more modern"
* "Add ai powered suggestions"
The AI understands the GOAT SDK integration and generates compatible code that works with your existing setup.
### Get Creative with Your DeFi Agent!
This is where the real fun begins - experiment with Cursor to extend your agent's capabilities:
* Try adding features like token price tracking or portfolio visualization
* Implement a trading history dashboard to track past transactions
* Create custom commands for your most frequent DeFi operations
The beauty of vibe coding with AI coding tools are that you can describe complex features in plain English and watch as they come to life. Don't be afraid to experiment, the combination of GOAT SDK and AI coding makes almost any DeFi feature possible with minimal effort!
### Step 5. Deploying your app
For this you could use Vercel. Run the following in your terminal
```jsx theme={null}
npm i -g vercel
```
Follow the prompts and add your environment variables in the Vercel dashboard.
# Overview
Source: https://docs.capx.ai/guides/capx-compose/sol-defi-agent/index
In the rapidly evolving world of AI and web3, DeFi agents are becoming the next big thing. These AI-powered assistants can execute trades, manage portfolios, and interact with DeFi protocols through natural language. What used to require deep knowledge of smart contracts and Web3 libraries can now be built in minutes using AI coding assistants. That being said, one of the biggest challenges for most people is usually the setup. Connecting AI models to blockchain protocols, handling wallet interactions, managing transaction signing - it's a maze of dependencies and configurations. Most developers spend hours just getting the basic infrastructure working before they can even start building their actual agent.
## **Introducing Capx Compose**
With `capx-compose`, you can skip all that setup and get a fully configured DeFi agent starter in one command. Combine it with AI IDEs like Cursor and you can have a customised working Solana DeFi agent that manages wallets and executes transactions in under 10 minutes.
## **What are we building today?**
A DeFi agent is essentially a chatbot with blockchain superpowers. When you type "swap 1 SOL for USDC", it understands your intent, connects to the blockchain, executes the transaction, and reports back - all through a conversational interface. Think of it as having a smart assistant that speaks both human language and blockchain.
By the end of this guide you’d have a DeFI agent that can:
* Send SOL tokens to any Solana address
* Check wallet balances for SOL and SPL tokens
* Execute basic token operations on devnet
* Respond to natural language commands
* Stream AI responses in real-time
We'll use capx-compose to scaffold the project with all the blockchain integrations pre-configured, then extend it using Cursor's AI capabilities to add custom features.
## **The integrations that make this possible**
* **Vercel AI SDK** - handles streaming conversations and tool calling with OpenAI's GPT models
* **GOAT SDK**(by Crossmint) - provides blockchain operations like swaps and transfers as simple functions
* **Solana Web3.js** - manages wallet connections and transaction signing on Solana
* **Next.js** - powers the web interface and the server side API routes.
Here's a detailed breakdown of each integrated phase:
## Phase 1: Conception, Development & Initial Token Setup (Developer-Centric)
* **AI Agent Conceptualization & Coding:** The journey begins with the Developer designing the AI agent. This includes defining its purpose, core functionalities, algorithms, and the specific AI/ML models it will utilize. The actual application code for the agent is then written.
* **Containerization for Portability:** The developed AI agent code and its dependencies are packaged, typically into a Docker image. This standardizes the agent's environment, ensuring consistent operation and simplifying deployment across different infrastructures.
* **Token Design & Parameter Initialization:** Crucially, at this early stage, the Developer also designs the tokenomics for the AI agent. This involves defining the parameters for the agent's unique digital token, such as its name, symbol, total supply, decimal places, and the initial owner. This step prepares for the token's creation on the blockchain and outlines its intended utility (e.g., access, governance, staking).
* **Smart Contract Interaction for Token Genesis:** The Developer then interacts with a specific smart contract on the blockchain, often a "CapxAgentFactory." This factory contract is designed to receive the token parameters and orchestrate the creation and deployment of a new, unique token contract specifically for this AI agent.
## Phase 2: Cloud Deployment & On-Chain Token Materialization (Cloud & Blockchain Interaction)
* **Agent Deployment to Cloud Infrastructure:** The packaged Docker image containing the AI agent is uploaded and deployed to the cloud infrastructure. This cloud environment provides the necessary computational resources (CPU, GPU, memory, etc.) for the AI agent to run, execute its tasks, and be accessible.
* **Agent-Specific Token Contract Creation:** Simultaneously, as a result of the interaction with the Agent Factory in the previous phase, a new smart contract is deployed on the blockchain. This contract, often adhering to standards like ERC20, becomes the definitive on-chain representation and ledger for the AI agent's specific tokens.
* **Token Minting:** With the agent's unique token contract now live on the blockchain, the specified supply of tokens is "minted" (created) according to the parameters defined by the Developer. These tokens are typically credited to the owner address specified during initialization.
## Phase 3: Enabling Market Access, Liquidity & Token Utility (Blockchain & User Platform Integration)
* **Liquidity Pair Creation & Provisioning:** To enable the agent's tokens to be traded and to establish a market value, they are typically paired with a base currency (e.g., \$CAPX) on a Decentralized Exchange (DEX) operating on the blockchain. The Developer or initial backers then "add liquidity" by depositing a quantity of both the agent tokens and the base currency into this liquidity pool.
* **Marketplace Listing:** Once the AI agent is deployed in the cloud and its tokens have liquidity, it is listed on a user-facing platform or marketplace (e.g., Capx Super App). This listing provides potential users with information about the agent's capabilities, its token details, and how to acquire or utilize its services.
* **Enabling Trading & Agent Usage via Platform:** The user-facing platform facilitates the trading of the agent's tokens (leveraging the DEX liquidity) and provides the interface for users to interact with or consume the AI agent's services, often using the acquired tokens.
## Phase 4: User Interaction & Token-Driven Engagement (User Platform & Cloud Interaction)
* **User Discovery & Token Acquisition:** Users discover the agent through the marketplace. Depending on the agent's model, they might need to acquire its specific tokens to access its services, participate in its governance, or unlock premium features.
* **Service Invocation & Token Utility:** Users interact with the AI agent by sending requests or tasks via the user-facing platform. This interaction might involve "spending" agent tokens, holding a certain amount as an access key, or staking them. The platform routes these requests to the deployed AI agent running on the cloud infrastructure.
* **Task Execution & Response:** The AI agent processes the input, performs its computations, and returns the results or actions back to the user through the platform. The token acts as a key mechanism for value exchange and access control.
## Phase 5: Monitoring, Maintenance, Evolution & Tokenomic Adjustments (Iterative Cycle)
* **Performance Monitoring & Feedback Collection:** The operational agent is continuously monitored for performance, resource usage, and accuracy. User feedback and interaction data are collected to identify areas for improvement.
* **Identifying Need for Updates (Agent & Tokenomics):** Based on monitoring, feedback, or evolving market demands, a need for updates may arise. This can apply to the AI agent's core logic, features, or even its tokenomics (e.g., introducing new utility for the token, adjusting supply mechanisms).
* **Iterative Re-Development:**
* **Agent Code Updates:** Developers modify the agent's application code to implement improvements, new features, or bug fixes.
* **Tokenomic/Contract Adjustments (If any):** If changes to the token's utility or the underlying smart contract logic are required, these are designed and developed.
* **Re-Packaging & Re-Deployment:**
* A new version of the AI agent is packaged (e.g., new Docker image).
* The updated agent is deployed to the cloud infrastructure, often replacing or versioning the older instance.
* **Chain Updates (If Necessary):** Significant changes to token contracts might require deploying new contracts or migrating data/state on the blockchain, a process that needs careful management and often community involvement if governance is decentralized.
* **Marketplace & Platform Updates:** The agent's listing on the user-facing platform is updated to reflect the new features, version, and any changes in its token utility or access mechanisms.
This integrated lifecycle, where AI agent development and tokenization are intrinsically linked, fosters a dynamic ecosystem. It allows for continuous improvement, transparent value exchange, community participation (through token-based governance or incentives), and novel economic models for the creation, distribution, and consumption of AI-powered services.
# AI Agent Tokenization
Source: https://docs.capx.ai/guides/operator/key-concepts/agent-tokenization
AI Agent Tokenization refers to the process of creating and associating digital tokens (cryptographic assets) with an AI agent. These tokens, typically built on blockchain technology, can represent various forms of value or utility related to the agent, such as access rights, governance participation, contribution rewards, or a share in the agent's generated value. Tokenization introduces novel economic models and interaction mechanisms into the AI ecosystem.
## Phases of Tokenization
The tokenization of AI agents can be broken down into several key phases:
### Phase 1: Token Design and Parameterization
* **Defining Utility and Economics:** Before creating a token, its purpose and role within the agent's ecosystem are meticulously planned. This includes deciding if the token will be used for accessing the agent's services, participating in its governance, staking for rewards, or other functions.
* **Specifying Token Attributes:** Key parameters for the token are established, such as its name (e.g., "AgentX Token"), symbol (e.g., "\$AGX"), total supply, decimal places (for divisibility), and the initial ownership or distribution plan.
### Phase 2: Smart Contract Development and Deployment
* **Agent-Specific Token Contract:** In Capx ecosystem, a "factory" smart contract is used to deploy a standardized token contract template for each new AI agent. This contract governs the creation, management, and transfer of the agent's specific tokens. It often adheres to established token standards (like ERC20 on Ethereum-compatible chains) to ensure interoperability.
### Phase 3: Token Minting (Creation)
* **Initial Token Generation:** Once the smart contract is deployed, the defined supply of tokens is "minted" or created according to the parameters set in Phase 1. These newly created tokens are then typically allocated to the initial owner specified in the contract, often the developer or a treasury dedicated to the agent's development and growth.
### Phase 4: Enabling Liquidity and Tradability
* **Decentralized Exchange (DEX) Integration:** To allow the agent's tokens to be bought and sold by a wider audience, they are often listed on decentralized exchanges.
* **Liquidity Pool Creation:** This involves creating a trading pair by depositing the agent's tokens along with a base cryptocurrency (e.g., \$CAPX) into a liquidity pool on a DEX.
* **Adding Initial Liquidity:** The initial creators or backers of the agent provide the starting liquidity for this pool. This step is crucial as it facilitates price discovery and allows for smoother trading by users.
### Phase 5: Token Utility and Ecosystem Interaction
* **Access Mechanism:** Tokens can be required to access the AI agent's services. Users might need to hold a certain number of tokens or "spend" them to make requests.
* **Marketplace Integration:** A user-facing platform, such as a "Super App" or marketplace, often integrates with the token. This platform allows users to discover agents, view their token details, acquire tokens, and use them to interact with the agent.
* **Governance and Staking:** Depending on the design, tokens might grant holders voting rights on the agent's future development or allow them to stake their tokens to earn rewards or contribute to the network's security.
### Phase 6: Tokenomic Evolution (as part of Agent Updates)
* **Adjustments and Upgrades:** As an AI agent evolves, its tokenomics (the economic model of its token) might also need adjustments. This could involve changes to token utility, supply mechanisms, or integration with new features. Such changes must be carefully managed, often requiring community consensus if the token model is decentralized.
Tokenization provides a powerful framework for funding AI agent development, incentivizing contributions, enabling decentralized access control, and creating vibrant economies around AI services. It aligns the interests of developers, users, and other stakeholders within the AI agent's ecosystem.
# Capx Cloud Hosting Model
Source: https://docs.capx.ai/guides/operator/key-concepts/cloud-hosting-model
Learn how AI agents run in a decentralized network.
# Capx Cloud Security Model with Symbiotic Integration
Source: https://docs.capx.ai/guides/operator/key-concepts/security-model
Capx Cloud is a decentralized infrastructure network designed for AI agent applications. To ensure the reliability and security of this network, it leverages Symbiotic, a shared security protocol that provides flexible restaking and slashing functionalities.
Here's how the security model operates:
1. **Operator Resource Provision and Staking:**
* **Operators Provide Resources:** Capx Cloud relies on a decentralized network of operators who provide computational resources (ranging from CPUs for API-driven services to GPUs for intensive AI workloads).
* **Staking via Symbiotic:** To become an operator and participate in the network, these entities must stake assets. Capx Cloud integrates with Symbiotic to manage this staking process. Operators stake assets (which can be various ERC-20 tokens, not just a native token) through Symbiotic's "Vaults." These vaults pool staked assets and manage their delegation to operators. This staking acts as an economic guarantee for their service.
* **Restaking for Capital Efficiency:** Symbiotic's infrastructure allows operators to potentially "restake" assets already staked elsewhere (e.g., from Ethereum validators), repurposing them to also secure Capx Cloud. This enhances capital efficiency, as operators can support multiple networks with the same collateral.
2. **Attestation and Performance Verification:**
* **Execution of Workloads:** Operators execute AI agent workloads assigned to them by the Capx Cloud protocol.
* **Attestation:** Operators provide attestations of the work they perform. Cryptographic proofs can be used to verify that the deployed code runs unmodified.
* **Attestor Nodes:** Capx Cloud utilizes "Attestor Nodes" as a quality assurance mechanism. These nodes validate the tasks executed by "Performer Nodes" (the operators executing the AI workloads). Attestor Nodes independently verify the accuracy and legitimacy of the execution upon receiving proof of the task and its results. This process aims to ensure computations meet predefined standards for accuracy and reliability, strengthening trust and preventing tampering.
* **Validation and Aggregation:** Attestations are aggregated and validated to ensure operator performance and availability.
3. **Slashing for Misbehavior (Enforcing Honesty and Reliability):**
* **Economic Incentives:** The staked collateral creates strong economic incentives for operators to act honestly, maintain high uptime, and deliver reliable performance. They have "skin in the game."
* **Conditions for Slashing:** If an operator engages in malicious behavior, provides poor service, fails to meet Service Level Agreement (SLA) compliance, or attempts to tamper with operations, their staked collateral can be slashed. Slashing conditions are configurable and defined by the network (Capx Cloud in this case). Examples of slashable offenses include double-signing, unresponsiveness, or approving invalid state transitions.
* **Slashing Process:** Symbiotic manages the slashing adjudication process. This means Symbiotic's framework handles the transparent and fair execution of penalties when operators violate the rules.
* **Resolvers:** Symbiotic's framework can include "Resolvers," which are entities or contracts tasked with ensuring slashing events are handled transparently and fairly. They can veto slashing requests if deemed incorrect, providing an additional layer of security for participants.
* **Impact of Slashing:** Slashing results in an automatic penalty that reduces the operator's staked assets. This financial penalty discourages malicious actions and reinforces the network's security and trustworthiness.
4. **Reward Distribution:**
* High-performing, honest operators are rewarded for their contributions to the network. They may even gain priority access to more profitable workloads. Rewards are often distributed in the network's native token (e.g., \$CAPX for Capx Cloud).
This system is trust-minimized: operators stake capital that can be slashed, so they’re economically motivated to act honestly. By plugging into Symbiotic’s shared-security framework, Capx Cloud gains robust protection while staying focused on its core mission—running a decentralized AI marketplace—confident that the operator network’s cryptoeconomic incentives keep it secure.
# Operator Lifecycle: From Registration to Decommissioning
Source: https://docs.capx.ai/guides/operator/lifecycle
The Capx Cloud Network Operator Lifecycle outlines the end-to-end journey an entity undertakes to provide services within the Capx Cloud Network, from initial engagement and setup, through active operation and reward generation, to potential contingencies like slashing, and eventual exit from the network. This lifecycle is deeply integrated with Symbiotic's shared security mechanisms for staking, operator registration, and slashing.
## **Operator Lifecycle Stages:**
The operator's journey within the Capx Cloud Network is a structured process, encompassing several distinct phases and key milestones. Each stage involves specific actions, responsibilities, and interactions with both the Capx platform and the underlying Symbiotic protocol.
### **Stage I. Onboarding and Initial Setup Phase:**
1. **Discovery and Preparation :**
* The lifecycle commences with the **Discovery** phase, where a potential operator learns about the Capx Cloud Network, its service requirements (e.g., AI agent hosting, computation), and the economic incentives.
* Following this, the **Preparation** stage involves acquiring the necessary hardware (CPU/GPU, storage, etc.) and establishing a suitable technical environment as per Capx specifications.
2. **Symbiotic Ecosystem Integration :**
* **Operator Registration (Symbiotic):** The operator formally registers their address with Symbiotic's `OperatorRegistry`. This is a crucial step for identification within the Symbiotic shared security ecosystem, enabling interaction with multiple services.
* **Vault Opt-In (Symbiotic):** The operator then opts into one or more Symbiotic Vaults. These vaults are smart contracts managing staked collateral. This step allows operators to associate their registered identity with specific collateral pools.
* **Network Opt-In (Symbiotic):** Subsequently, the operator opts into the Capx Cloud Network via Symbiotic's `NetworkOptInService`. This explicitly signals their intent to provide services to Capx and makes them eligible for stake allocation from the chosen vaults for this specific network.
### **Stage II. Node Deployment and Activation Phase:**
3. **Capx Node Configuration :**
* **Node Software Setup (Capx):** The operator installs and configures the proprietary node software provided by Capx Cloud. This software equips their hardware to perform tasks specific to the Capx Cloud Network.
* **Node Sync (Capx):** The configured node then synchronizes with the Capx Cloud Network, downloading the latest state and data to ensure it's fully aligned and ready for participation.
4. **Stake Activation :**
* With the operator registered and opted into both vaults and the Capx Cloud Network, and their node ready, staked collateral (either self-staked or delegated) is formally allocated or "activated" by vault managers for the operator's service to Capx. This live stake underpins the operator's economic commitment and becomes subject to network rules, including slashing.
### **Stage III. Active Operational Phase:**
5. **Service Provision and Rewards :**
* **Active Operation:** The operator's node actively provides the designated services to the Capx Cloud Network, such as hosting AI agents, performing computations, or participating in attestation. Consistent uptime and performance are paramount.
* **Reward Accrual & Claiming:** For their contributions, operators accrue rewards (typically in \$CAPX tokens), based on performance, uptime, and tasks completed. These rewards can then be claimed through network-defined mechanisms.
6. **Ongoing Maintenance:**
* Operators are responsible for continuous **Maintenance and Upgrades** of their nodes. This includes applying software updates, monitoring performance, and ensuring hardware integrity to maintain service quality and avoid penalties. This forms a feedback loop back into Active Operation.
### **Stage IV. Contingency Management and Offboarding Phase:**
7. **Slashing Events:**
* **Slashing Event Trigger:** If an operator violates Service Level Agreements (SLAs), exhibits malicious behavior, or experiences significant downtime, a **Slashing Event** can be triggered by Capx's monitoring systems.
* **Symbiotic Slashing Process:** The Capx middleware initiates a slashing request to the Slasher module of the relevant Symbiotic Vault. Symbiotic's protocol then processes this, potentially involving Resolvers for dispute arbitration.
* **Outcome and Review:** If the slash is confirmed (**Slashed?**), a portion of the operator's stake is forfeited. The operator then undertakes a **Post-Slashing Review** to assess the damage and decide on **Recovery**. If recovery is pursued, it involves addressing the root cause and potentially restaking.
8. **Deregistration and Exit:**
* Operators may voluntarily choose to leave the network, or be forced to exit. This **Deregistration** process involves signaling their intent to unstake.
* Following an **Unbonding Period** (a security measure where funds may still be subject to slashing for past actions), the operator's collateral is fully released, and their **Exit is Complete**.
This structured lifecycle, with its clear phases and integration of Symbiotic's cryptoeconomic mechanisms, aims to foster a reliable and secure network of operators dedicated to powering the Capx ecosystem.
# Capx Operators
Source: https://docs.capx.ai/guides/operator/overview
Operators serve as the backbone of Capx Cloud’s decentralized compute layer.
## What is a Capx Operator?
Capx Operators are the custodians of the Capx Cloud network, playing a pivotal role in managing the infrastructure that ensures the smooth and efficient operation of decentralized services. Their responsibilities are multifaceted, spanning multiple layers of the network to guarantee stability, scalability, and security.
Operators are not just anonymous nodes within the system; they are vetted entities committed to the network's health.
## Operator Role
The role of a Capx Cloud Operator comes with a significant set of responsibilities, which are directly linked to the opportunities and incentives offered by the network.
## Operator Opportunities & Incentives
Complete each item in the checklist to ensure your node is properly configured. The checklist verifies all prerequisites are met before registration.
Access CapxCloud Operator Checklist →Once your environment is ready and all checklist items are passed, follow the detailed registration instructions to join the Mainnet.
Detailed steps to register your node on the Mainnet network →Complete each item in the checklist to ensure your node is properly configured. The checklist verifies all prerequisites are met before registration.
Access CapxCloud Operator Checklist →Once your environment is ready and all checklist items are passed, follow the detailed registration instructions to join the Testnet.
Detailed steps to register your node on the Testnet network →
* Contract - `0x95CC0a052ae33941877c9619835A233D21D57351`
* Method - `optIn ( 0xb1138ad1)`
* Params -
* **where :** the vault contract address (`0x66a95b5981461D2BA23264d4d2fe20a85199a944`)
* First, the "approve" function should be called on the wstETH contract (address: `0x8d09a4502Cc8Cf1547aD300E066060D043f6982D`) with the following parameters:
* **spender:** the vault contract address (`0x66a95b5981461D2BA23264d4d2fe20a85199a944`)
* **amount:** `37000000000000000` (representing 0.037 ETH)
* The vault contract ( address : `0x66a95b5981461D2BA23264d4d2fe20a85199a944`) requires a deposit call with two parameters:
* `onBehalfOf`: Operator address (or the address for which the deposit is made).
* `amount`: The token amount in Wei. Based on the details above, the required parameter is `37000000000000000`.
## Wallet Configuration: Ledger/Safe vs. EOA
The appropriate environment file should be selected based on the wallet type being used.
If you *Choose to use a different private-key for Consensus :*
You are now registered and ready to operate.
* Put `OPERATOR_ADDRESS` in `who` parameter, `NETWORK_ADDRESS` in `where`, and click “Query”
* It should return `true`
* Put `OPERATOR_ADDRESS` in `who` parameter, `NETWORK_ADDRESS` in `where`, and click “Query”
* It should return `true`
### Value Creation Mechanics
**Network Effects Amplification:**
* Increased AI App deployment drives token diversity and trading volume
* Enhanced user activity strengthens AI App performance metrics and market valuation
* Growing compute utilization attracts additional infrastructure operators and reduces costs
**Ecosystem Synergies:**
* **Developer Attraction**: Higher AI App success rates and monetization opportunities attract top-tier AI developers
* **User Growth**: Diverse, high-quality apps increase platform utility and user retention
* **Infrastructure Scaling**: Increased demand drives decentralized infrastructure expansion and optimization
**Economic Incentive Alignment:**
* AI App creators benefit from token appreciation and usage fees
* Users earn rewards through early discovery and long-term support of successful AI Apps
* Infrastructure operators receive compensation for providing reliable compute resources
# The Capx AI Trinity: Pillars of the Capx Ecosystem
Source: https://docs.capx.ai/overview/introduction
Capx provides a unified, crypto-native stack for building and monetizing autonomous AI apps. Each layer of the stack is modular yet deeply integrated — enabling developers to deploy apps, tokenize them, and provide users with seamless interaction and trading experiences.
This page introduces the **three core pillars** of Capx:
* **Capx App** (frontend + liquidity layer)
* **Capx Chain** (Ethereum Layer 2 execution layer)
* **Capx Cloud** (decentralized AI app infrastructure)
Together, they form the backbone of the **AI App Economy**.
***
## 🧱 Capx Ecosystem at a Glance
***
## 🧠 Capx App – Discover, Interact, Trade
The **Capx App** is the main interface for users to explore, engage with, and invest in AI apps.
* Browse trending apps based on usage, community, or performance.
* Trade ERC-20 app tokens through a native AMM.
* Stake into apps, join communities, and track on-chain metrics.
## 🔗 Capx Chain – Tokenization & Composability
The **Capx Chain** is a custom Ethereum Layer 2 built using Arbitrum Orbit. It handles:
* **App Token Factory** — every deployed app can mint its own ERC-20 token with parameters set by the developer.
* **Built-in DEX** — trade AI app tokens natively on-chain with liquidity incentives and staking rewards.
* **Composable Interactions** — apps can call other agents, smart contracts, or DeFi primitives directly on-chain.
* **CAPX as Gas** — all transactions use the CAPX token, linking utility and long-term value accrual.
## ☁️ Capx Cloud – Deploy and Run AI Apps
Capx Cloud is a decentralized compute layer that powers the execution of AI apps.
* **Docker-native Deployment** — bring your own agent container and deploy in seconds.
* **Persistent Memory** — agents can retain long-term state across sessions.
* **Secure Sandboxing** — safely execute untrusted, AI-generated code.
* **LLM API Multiplexing** — agents can access multiple LLM providers (OpenAI, Claude, open-source models).
* **Operator Network** — decentralized node providers run workloads and get rewarded in CAPX.
***
## 🧬 Why Full-Stack Matters
Most AI platforms offer just a model or an API. Capx gives you the **entire infrastructure stack**:
* Frontend liquidity and discovery
* On-chain logic and programmable token issuance
* Decentralized AI app hosting and execution
This tightly coupled system allows for seamless developer experience, shared ownership with users, and native monetization without relying on centralized APIs or walled gardens.
***
## 📚 Next Steps
Explore each product layer in detail:
* **Capx Chain (Ethereum L2)**: Anchored to Ethereum for security, running smart contracts, managing tokens, governance, operator registries, and AI app logic.
* **Symbiotic Integration**: Capx Cloud leverages Symbiotic’s vaults and operator registries for secure restaking and operator onboarding.
* **Off-Chain Operators**: Capx Cloud orchestrates a decentralized network of trusted operators leveraging existing cloud infrastructure (AWS, GCP). Providers connect their environments, execute tasks, and submit verifiable proofs, ensuring computational integrity.
### Key Actors
1. **Users:**
* **App Users:** These users interact with AI apps through the Capx SuperApp. They are the primary consumers of the AI services provided on the platform.
* **Token Holders:** These users hold and utilize \$CAPX tokens, participating in the economic and governance aspects of the Capx ecosystem.
2. **Developers:**
* **AI App Developers:** These developers are responsible for creating and deploying the AI apps that power the Capx Cloud.
* **Application Developers:** They build applications that leverage the Capx SuperApp and integrate with the deployed AI apps.
3. **Operators:**
* **Compute Provider:** Operators contribute essential computing resources, such as CPU, memory, and GPU, to the network. They are responsible for executing the AI app workloads.
* **Restaker:** Operators also function as restakers, staking collateral through the Symbiotic protocol to ensure the security and trustworthiness of the network.
4. **Capx SuperApp:** The SuperApp acts as the central interface for users to interact with AI Apps as well as trade & own the tokenized AI Agents & Apps.
5. **Capx Chain:** This is the foundational blockchain infrastructure that enables secure and transparent transactions within the Capx ecosystem. It handles key operations like AI app tokenisation, resource allocation, and reward distribution.
6. **Symbiotic:** Symbiotic is the restaking protocol integrated into Capx Cloud. It plays a critical role in maintaining network security by managing the (re)staking and potential slashing of operator collateral.
### Interactions
* **User-SuperApp Interaction:** Users interact with the Capx SuperApp to access and utilize AI apps.
* **Developer-SuperApp/Capx Cloud Interaction:** Developers use the SuperApp or interact directly with the Capx Cloud to deploy their AI apps.
* **Operator-Network Interaction:** Operators provide compute resources to the network and execute AI app workloads.
* **Operator-Symbiotic Interaction:** Operators engage with Symbiotic for restaking purposes, contributing to network security.
* **SuperApp-Chain Interaction:** The Capx SuperApp interacts with the Capx Chain to facilitate AI app tokenisation and onchain ownership-trading transactions.
* **Chain-Ecosystem Interaction:** The Capx Chain serves as the backbone for all on-chain transactions and interactions within the Capx ecosystem.
# 🤝 Partnerships
Source: https://docs.capx.ai/partnership
Capx is building a decentralized, composable stack for AI agent creation, ownership, and monetization. We partner with leading infrastructure, compute, security, and interoperability providers to deliver the most robust agent ecosystem possible.
Below is a growing list of our ecosystem collaborators and integration partners.
## The Capx Thesis
> *Autonomous self-improving, self-evolving software is about to become the most important economic actor of this decade. They will be able to think, act, and iterate faster and more effiiciently than any human-run startup.*
>
> *But these codebases will need to be owned and govered by a human-in-the-loop model to make sure these AI products work in alignment with humanity.*
>
> *With the help of web3 rails i.e. tokenization and fractional ownership, these AI products of the future will be owned by the people, thereby inherently creating skin-in-the-game communities of users and owners.*
Capx closes that gap by solving three first-principle problems:
| What AI Apps Need | Why It Matters | How Capx Delivers |
| :--------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Programmable Ownership** | Early users, data providers, and contributors deserve a direct stake in the ai apps they power. Without shared upside - network effects stall. | Every app launches with a native ERC20 token. Distribution schedules ensure community-ownership from day one, keeping incentives aligned as the app grows. |
| **Autonomous agent/app-Native Infrastructure** | Conventional clouds throttle long-running, self-reflexive processes. Apps/Agents need deterministic compute, cheap micro-transactions, and bandwidth designed for autonomous logic. | **Capx Cloud** **and** **Capx Chain** form a vertically integrated runway for nonstop AI App/agent execution. |
| **On-Chain Liquidity** | Tokens are only useful if they can move. Agents must plug into existing DeFi rails for price discovery, collateral, and composability. | Built-in AMM pools let every AI app token trade instantly. Liquidity hooks feed into the broader DeFi stack, making AI app assets borrowable, LP-able, and legible to any smart contract. |
***In a sentence:*** *Capx is the programmable ownership, execution, and liquidity layer that lets autonomous AI apps graduate from proof-of-concept demos to fully capitalized, community-owned products.*
## Why Capx Exists
For the past decade, AI apps were built like traditional software products.\
Users paid subscriptions. Builders paid cloud bills. Value stayed locked inside the app.
But AI changes the economics.\
AI apps are not just tools. They are responsive, evolving products that become more valuable as people use them.
Capx introduces a new model\
AI apps can now be **launched like assets** and **owned like networks**.
On Capx
* Every AI app has its own ERC20 token
* Early users gain ownership instead of paying subscription fees
* Liquidity forms instantly through built in markets
* Apps scale through decentralized cloud infrastructure
* Value is shared between builders, users and traders
This is the ownership layer AI was missing.
## Capx as the NASDAQ for AI Apps
Just like NASDAQ became the capital market for technology companies,\
Capx becomes the capital market for AI applications.
On traditional stock exchanges
* Companies list
* Investors trade
* Liquidity drives growth
* Ownership compounds
On Capx
* AI apps launch tokens
* Users and traders participate
* Liquidity pools form automatically
* The best apps attract capital, talent and usage
Every app becomes an investible, tradable, community driven product.\
This unlocks a new asset class. A new way for people to participate. A new way for builders to scale distribution. And a new way for AI to reach the world.
## The Modular Stack
Capx is composed of three interoperable layers that work together to create a complete AI app ecosystem: