What are Agents?
In ActumX, an agent is an entity with its own Solana wallet that can:- Hold SOL tokens on Solana devnet
- Make authenticated API requests
- Perform autonomous transactions
- Interact with x402 payment endpoints
Creating Your First Agent
Understanding Agent Wallets
When you create an agent, ActumX automatically generates a Solana keypair:From the source code (
api/src/modules/agents/service.ts:46-48):- Public Key: Used for receiving SOL and identifying the wallet
- Private Key: Base64-encoded secret key for signing transactions
- Network: Solana Devnet by default
Fund Your Agent on Devnet
Before your agent can make transactions, it needs SOL tokens. Use the devnet faucet endpoint:Response:
The funding process uses Solana’s
requestAirdrop method and waits for transaction confirmation (api/src/modules/agents/service.ts:102-111).Key Implementation Details
Agent Creation Flow
Fromapi/src/modules/agents/service.ts:40-75:
- Authenticate the user making the request
- Generate a new Solana keypair using
@solana/web3.js - Create a unique agent ID with prefix
agent_ - Store the agent in the database with encrypted private key
- Return agent details including the private key (only once)
Wallet Balance Checking
The system usesSolanaBalanceService to query real-time balances from Solana devnet:
Security Best Practices
Private Key Storage
Private Key Storage
- Private keys are base64-encoded and stored in the database
- They’re only returned once during agent creation
- Store private keys securely in your application (e.g., environment variables, secrets manager)
- Never commit private keys to version control
Devnet vs Mainnet
Devnet vs Mainnet
- ActumX uses Solana devnet by default
- Devnet SOL has no real value
- Before moving to mainnet, audit your security practices
- Update
SOLANA_RPC_URLin.envto switch networks
Access Control
Access Control
- Agents are scoped to user accounts
- Users can only access their own agents
- Authentication is verified on every API request
Troubleshooting
Airdrop Failed
Airdrop Failed
Error: “failed to fund agent on devnet”Solutions:
- Solana devnet faucet may be rate-limited
- Try again after a few minutes
- Request smaller amounts (0.5 SOL instead of 1 SOL)
- Check Solana devnet status
Agent Not Found
Agent Not Found
Error: “agent not found”Solutions:
- Verify you’re using the correct agent ID
- Ensure you’re authenticated as the agent’s owner
- Check that the agent was successfully created
Next Steps
Create API Keys
Generate API keys to authenticate your agent’s requests
Top Up Credits
Add credits to your account for using paid endpoints