Prerequisites
Before you begin, ensure you have:- Bun >= 1.1 (required for package management and runtime)
- PostgreSQL 15+ (local or hosted instance)
- Node.js 18+ (for compatibility)
Autonome uses Bun exclusively as its package manager and runtime. Do not use npm or pnpm.
Quick Setup
Configure Environment
Copy the example environment file and configure it:Edit
.env with your configuration. For simulator mode, you only need to configure the database:.env
Set Up the Database
Generate and apply database migrations:The seed script will create the default AI model variants:
- Apex - Aggressive momentum trading
- Trendsurfer - Trend-following strategy
- Contrarian - Counter-trend positions
- Sovereign - Balanced, multi-factor approach
You can verify your database setup using Drizzle Studio:This will open a web interface to explore your database schema and data.
Start the Development Server
Launch both the API server and frontend:The application will start on:
- Frontend: http://localhost:5173
- API Server: http://localhost:8081
Access the Dashboard
Open your browser to
http://localhost:5173. You’ll see the Autonome dashboard with:- Portfolio Overview - Real-time net portfolio value and performance metrics
- Active Positions - Current open positions with P&L tracking
- Trade History - Closed trades and performance analytics
- AI Co-Pilot - Chat interface showing AI reasoning and decisions
Run Your First Strategy
In the dashboard:
- Navigate to the Models section
- Select a trading variant (e.g., “Apex” for aggressive momentum)
- Click Start Trading to activate the autonomous trading loop
- Watch as the AI agent analyzes market data and executes trades in the simulator
- Fetch real-time market data
- Analyze technical indicators and market conditions
- Make trade decisions based on its strategy variant
- Execute orders in the exchange simulator
- Monitor positions and update exit plans
In simulator mode, no real money is at risk. The ExchangeSimulator validates your strategies offline using realistic market simulation.
Understanding Simulator Mode
The trading simulator provides a high-fidelity environment for strategy testing:Features
- Realistic Order Execution - Simulates market orders, limit orders, and partial fills
- Portfolio Tracking - Tracks positions, P&L, and account balance
- Market Data Integration - Uses real market prices via the Lighter API
- Persistence - All trades and positions are stored in PostgreSQL
- Zero Risk - No real funds or API credentials required
Simulator Configuration
Fine-tune simulator behavior in your.env:
Viewing Simulator State
The simulator maintains state in your database. You can inspect it using:"Orders"- All orders (OPEN = positions, CLOSED = completed trades)"PortfolioSnapshots"- Historical portfolio values"Models"- AI model configurations and performance
Next Steps
Now that you have a working trading bot, explore these features:Configure AI Models
Customize AI behavior, risk parameters, and trading strategies
Live Trading
Switch from simulator to live trading with Lighter API
Monitor Performance
Analyze trade history, P&L, and risk metrics
API Reference
Explore oRPC procedures and data models
Troubleshooting
Database connection errors
Database connection errors
If you see
DATABASE_URL connection errors:-
Verify PostgreSQL is running:
-
Check your connection string format:
-
Ensure the database exists:
Bun installation issues
Bun installation issues
If Bun commands fail:
-
Verify Bun installation:
-
Reinstall Bun:
-
Add Bun to your PATH:
Port conflicts
Port conflicts
If ports 5173 or 8081 are in use:
-
Change the API port in
.env: -
Update the API URL for the frontend:
-
Kill processes using the ports:
AI provider errors
AI provider errors
If you see AI provider authentication errors:
- Verify your API keys are set in
.env - Check that at least one provider key is valid
- The platform will automatically cycle through available providers
Command Reference
Common commands you’ll use frequently:| Command | Purpose |
|---|---|
bun run dev:all | Start API + Frontend |
bun run db:studio | Open database explorer |
bun run db:seed | Reset and seed database |
bun run lint | Run code linting |
bun run test | Run test suite |
bun run build | Build for production |
For a complete list of commands, see
package.json or run bun run without arguments.
