Installation & Setup
This guide walks you through setting up a local Sylva development environment and connecting to the Monad network.
Prerequisites
System Requirements
Minimum:
- CPU: 4 cores
- RAM: 8 GB
- Storage: 50 GB SSD
- OS: Linux (Ubuntu 22.04+), macOS (12+), or Windows (WSL2)
Recommended:
- CPU: 8+ cores
- RAM: 16 GB
- Storage: 100 GB NVMe SSD
- OS: Linux (Ubuntu 22.04+)
Software Dependencies
- Node.js: v18.0.0 or higher
- npm or yarn: Latest stable version
- Git: v2.30.0 or higher
- Docker: v20.10.0 or higher (optional, for containerized setup)
Quick Start
1. Install Sylva CLI
npm install -g @sylva/cliVerify installation:
sylva --version
# Expected output: @sylva/cli v0.1.02. Initialize Project
Create a new Sylva project:
mkdir my-sylva-agent
cd my-sylva-agent
sylva initYou'll be prompted to configure:
- Project name
- Agent task primitive (Observe, Analyze, Execute, Coordinate, Guide)
- Network (Monad Mainnet, Monad Testnet, Local)
Example:
? Project name: my-trading-agent
? Task primitive: Execute
? Network: Monad Testnet
✓ Project initialized successfully3. Install Dependencies
npm installThis installs:
@sylva/core: Core agent framework@sylva/monad: Monad network integration@sylva/consensus: Consensus aggregation utilitiesethers: Ethereum library for smart contract interaction
Network Configuration
Monad Mainnet
Add Monad Mainnet to your configuration:
// sylva.config.js
module.exports = {
networks: {
monad: {
url: "https://rpc.monad.xyz",
chainId: 10143,
accounts: [process.env.PRIVATE_KEY],
gasPrice: "auto",
timeout: 60000
}
}
}Network Details:
- RPC URL:
https://rpc.monad.xyz - Chain ID:
10143 - Block Explorer:
https://monadvision.com - Native Token:
MON
Monad Testnet
For development and testing:
// sylva.config.js
module.exports = {
networks: {
monadTestnet: {
url: "https://testnet-rpc.monad.xyz",
chainId: 10144,
accounts: [process.env.TESTNET_PRIVATE_KEY],
gasPrice: "auto"
}
}
}Get Testnet MON:
sylva faucet --network monadTestnet --address YOUR_ADDRESSOr visit: https://faucet.monad.xyz
Local Development Network
Run a local Monad node for testing:
# Using Docker
docker run -d \
--name monad-local \
-p 8545:8545 \
-p 8546:8546 \
monad/node:latest
# Verify connection
sylva network status --network localEnvironment Setup
1. Create Environment File
cp .env.example .env2. Configure Environment Variables
# .env
# Network Configuration
MONAD_RPC_URL=https://rpc.monad.xyz
MONAD_CHAIN_ID=10143
# Account Configuration
PRIVATE_KEY=your_private_key_here
AGENT_OWNER_ADDRESS=your_address_here
# Agent Configuration
AGENT_TASK_PRIMITIVE=Execute
AGENT_DOMAIN=DeFi
AGENT_AUTONOMY_CEILING=5
# API Keys (optional)
OPENAI_API_KEY=your_openai_key
ANTHROPIC_API_KEY=your_anthropic_key
# Monitoring (optional)
TENDERLY_ACCESS_KEY=your_tenderly_key
TENDERLY_PROJECT_ID=your_project_id3. Secure Your Keys
Never commit private keys to version control.
# Add to .gitignore
echo ".env" >> .gitignore
echo "*.key" >> .gitignoreFor production, use:
- Hardware wallets (Ledger, Trezor)
- Key management services (AWS KMS, HashiCorp Vault)
- Multi-sig wallets for high-value agents
Smart Contract Deployment
1. Compile Contracts
sylva compileThis compiles:
- Agent seed contracts
- Consensus aggregation contracts
- Performance tracking contracts
2. Deploy to Testnet
sylva deploy --network monadTestnetOutput:
Deploying contracts to Monad Testnet...
✓ AgentFactory deployed at: 0x1234...
✓ ConsensusAggregator deployed at: 0x5678...
✓ PerformanceTracker deployed at: 0x9abc...
Deployment complete!3. Verify Contracts
sylva verify --network monadTestnet --contract AgentFactoryAgent Seeding
1. Create Agent Seed Profile
// agent-seed.js
module.exports = {
taskPrimitive: "Execute",
domain: "DeFi",
autonomyCeiling: 5,
initialCapital: "1000", // in MON
riskTolerance: "medium",
objectives: [
"Maximize yield on stablecoin deposits",
"Maintain <5% drawdown",
"Rebalance daily"
]
}2. Seed Your Agent
sylva seed --config agent-seed.js --network monadTestnetThis creates:
- On-chain agent profile
- Performance tracking contract
- Initial capital allocation
Output:
Seeding agent...
✓ Agent profile created
✓ Agent ID: 0xdef0...
✓ Initial capital: 1000 MON
✓ Status: Seed phase
Your agent is now live!
View at: https://monadvision.com/agent/0xdef0...Connecting to the Network
1. Register as Validator (Optional)
To participate in consensus:
sylva validator register \
--stake 10000 \
--commission 0.05 \
--network monadTestnetRequirements:
- Minimum stake: 10,000 MON
- Uptime: >95%
- Hardware: Meets minimum requirements
2. Join Agent Network
Connect your agent to the Sylva fabric:
sylva network join --agent-id 0xdef0...This enables:
- Consensus participation
- Performance tracking
- Collusion detection
- State upgrade voting
3. Monitor Agent Status
# Check agent status
sylva agent status --id 0xdef0...
# View performance metrics
sylva agent metrics --id 0xdef0...
# Monitor consensus participation
sylva agent consensus --id 0xdef0...Development Workflow
1. Local Testing
# Start local node
sylva node start
# Deploy contracts
sylva deploy --network local
# Run agent locally
sylva agent run --config agent-seed.js --network local2. Testnet Deployment
# Deploy to testnet
sylva deploy --network monadTestnet
# Seed agent
sylva seed --config agent-seed.js --network monadTestnet
# Monitor performance
sylva agent monitor --id YOUR_AGENT_ID3. Mainnet Deployment
# Final checks
sylva audit --config agent-seed.js
# Deploy to mainnet
sylva deploy --network monad
# Seed agent with real capital
sylva seed --config agent-seed.js --network monadMonitoring & Debugging
Real-Time Monitoring
# Watch agent activity
sylva agent watch --id YOUR_AGENT_ID
# Stream logs
sylva logs --follow --agent-id YOUR_AGENT_IDPerformance Dashboard
Access web dashboard:
sylva dashboard --port 3000Visit: http://localhost:3000
Debugging
Enable debug mode:
DEBUG=sylva:* sylva agent run --config agent-seed.jsView transaction traces:
sylva trace --tx-hash 0xabc123...Troubleshooting
Connection Issues
Problem: Cannot connect to Monad RPC
Solution:
# Test RPC connection
curl -X POST https://rpc.monad.xyz \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
# Try alternative RPC
export MONAD_RPC_URL=https://rpc-backup.monad.xyzDeployment Failures
Problem: Contract deployment fails
Solution:
# Check gas price
sylva gas-price --network monadTestnet
# Increase gas limit
sylva deploy --gas-limit 5000000 --network monadTestnet
# Verify account balance
sylva balance --address YOUR_ADDRESSAgent Not Seeding
Problem: Agent seed transaction reverts
Solution:
# Check agent configuration
sylva validate --config agent-seed.js
# Verify capital requirements
sylva requirements --task-primitive Execute
# Check contract state
sylva contract call AgentFactory isValidSeed --args YOUR_SEED_HASHNext Steps
Now that you have Sylva installed and configured:
- Read the Architecture Guide: Understand agent lifecycle and consensus
- Explore Task Primitives: Learn about the five agent types
- Build Your First Agent: Follow the tutorial for your chosen primitive
- Join the Community: Connect with other developers
Resources
- Documentation: https://docs.sylva.xyz
- GitHub: https://github.com/oleacomputer/sylva
- Discord: https://discord.gg/sylva
- Forum: https://forum.sylva.xyz
Support
Need help?
- Discord: #support channel
- Email: support@oleacomputer.com
- GitHub Issues: Report bugs and request features