Skip to main content

What are Agents?

Agents in ActumX are autonomous entities with their own Solana wallets. Each agent has:
  • A unique identifier
  • A Solana public/private key pair
  • Independent wallet balance
  • Lifecycle management
Agents enable you to create multiple independent actors with separate blockchain identities, useful for:
  • Multi-tenant applications
  • Testing different wallet strategies
  • Isolating funds across use cases
  • Automated trading bots
  • DeFi protocol interactions
Each agent is associated with your user account but operates as an independent blockchain entity.

Agent Structure

An agent contains the following properties:

Database Schema

Agents are stored in the agents table:
Source Reference: /home/daytona/workspace/source/api/src/db/schema.ts:74-83

Solana Wallet Integration

Each agent is backed by a Solana wallet generated using @solana/web3.js:

Key Generation

When you create an agent, a new keypair is generated:
The private key is shown only once during agent creation. Store it securely - ActumX cannot recover lost private keys.

Balance Checking

ActumX integrates with Solana RPC to fetch real-time balances:
Example balance check:
Response:

Agent Lifecycle

1. Creation

Create an agent via the API:
Response:
Agent names must be between 2-80 characters. Choose descriptive names to easily identify agents.

2. Funding (Devnet)

For testing on Solana devnet, you can airdrop SOL to your agent:
Response:
Airdrop Limits:
  • Minimum: 0.01 SOL
  • Maximum: 2 SOL per request
Devnet airdrops are for testing only. For mainnet, transfer SOL to the agent’s public key using a standard wallet.

3. Usage in MCP Tools

Agents can be referenced in Model Context Protocol (MCP) tool calls:
If you omit agentId, the system uses your most recently created agent:

4. Management

List all your agents:
Agents are ordered by creation date (newest first).

Implementation Details

Service Layer

The agent service handles all agent operations: Key Functions:
  • list(request): Retrieve all agents with balances
  • create(request, payload): Generate new agent with Solana wallet
  • fundDevnet(request, agentId, payload): Airdrop devnet SOL
Source Reference: /home/daytona/workspace/source/api/src/modules/agents/service.ts

Validation

Agent creation validates:

Security Considerations

  1. Private Key Storage: Private keys are stored encrypted in the database
  2. User Isolation: Agents are scoped to user accounts via foreign key
  3. Cascade Deletion: Deleting a user removes all associated agents
  4. Public Key Uniqueness: Each Solana public key can only belong to one agent

Balance Fetching

ActumX uses the SolanaBalanceService to query on-chain balances:
Balances are fetched in parallel for efficient list operations.

Network Configuration

ActumX supports multiple Solana networks:
  • Devnet: For testing and development (airdrop available)
  • Mainnet: For production use (manual funding required)
The network is configured server-side. Check with your deployment to confirm which network is active.

Use Cases

1. Automated Trading

Create agents for different trading strategies:

2. Multi-Tenant SaaS

Assign one agent per customer:

3. Testing Scenarios

Create test agents with different balances:

Best Practices

  1. Name Descriptively: Use clear names like “Production Bot” or “Staging Wallet”
  2. Secure Private Keys: Store private keys in secure vaults (e.g., AWS Secrets Manager)
  3. Monitor Balances: Regularly check agent balances to avoid insufficient funds
  4. Test on Devnet: Always test agent operations on devnet before mainnet
  5. Backup Keys: Keep offline backups of critical agent private keys
  6. Use Latest Agent: Omit agentId in MCP calls to auto-select the newest agent

Error Handling

Common agent errors:

Next Steps

Creating Agents

Step-by-step guide to creating your first agent

Dashboard - Agents

Manage agents in the web dashboard

API Reference

View detailed agent API endpoints

x402 Protocol

Learn how agents work with x402 payments