Skip to main content

Native Development Guide

This guide covers how to run AgentOps backend services natively on your local machine without Docker. Native development provides the fastest iteration cycles and is ideal for active development work.

Overview

Running natively means:
  • Faster startup times - No container overhead
  • Direct file system access - Immediate code changes
  • Native debugging - Use your preferred IDE debugger
  • Resource efficiency - Lower memory and CPU usage

Prerequisites

System Requirements

  • Python 3.12+ with pip or uv
  • Node.js 18+ with npm, yarn, or bun
  • Git for version control
  • Just (optional) for convenience commands

External Services

You’ll need these external services configured:
  • Supabase - Database and authentication
  • ClickHouse - Analytics database
  • Stripe (optional) - Payment processing

Quick Start

1. Clone and Setup

2. Install Dependencies

Root Dependencies

API Dependencies

Dashboard Dependencies

3. Configure Environment Variables

Update your environment files with your service credentials. See External Services Setup below.

4. Start Services

5. Verify Setup

External Services Setup

Supabase Configuration

  1. Create a new project at supabase.com
  2. Get your project credentials from Settings → API
  3. Set up the database schema:
  4. Update api/.env and dashboard/.env.local:

ClickHouse Configuration

  1. Sign up for ClickHouse Cloud or self-host
  2. Create a database and get connection details
  3. Apply the schema:
  4. Update api/.env:

API Server Setup

Environment Configuration

Key variables in api/.env:

Running the API Server

Manual Command

Alternative Methods

API Development Features

Dashboard Setup

Environment Configuration

Key variables in dashboard/.env.local:

Running the Dashboard

Manual Commands

Dashboard Development Features

  • Hot reload on file changes
  • Fast Refresh for React components
  • Development tools integration
  • Source maps for debugging

Development Workflow

Daily Development Routine

  1. Start services:
  2. Make changes to your code
  3. Test changes - services auto-reload
  4. Run tests before committing:

Code Quality Workflow

Database Development

Testing

API Testing

Dashboard Testing

Integration Testing

Debugging

API Debugging

  1. Set breakpoints in your IDE
  2. Run with debugger:
  3. Attach your IDE debugger to port 5678

Dashboard Debugging

  1. Use browser dev tools (F12)
  2. Next.js debugging:
  3. Attach debugger at chrome://inspect

Log Debugging

Performance Optimization

API Performance

  • Use native Python for fastest development
  • Enable hot reload with uvicorn
  • Profile with py-spy:

Dashboard Performance

  • Use bun for faster package management
  • Enable Fast Refresh (enabled by default)
  • Analyze bundle size:

Troubleshooting

Common Issues

Python import errors:
Node.js module not found:
Port already in use:
Database connection issues:
  • Verify credentials in .env files
  • Check network connectivity
  • Ensure external services are running

Performance Issues

Slow API startup:
Slow dashboard reload:

Development Environment Reset

IDE Configuration

VS Code

Recommended extensions:
  • Python
  • Pylance
  • ES7+ React/Redux/React-Native snippets
  • Tailwind CSS IntelliSense
  • Prettier - Code formatter
Settings (.vscode/settings.json):

PyCharm

  1. Set Python interpreter to ./api/.venv/bin/python
  2. Enable Ruff for Python linting
  3. Configure Node.js interpreter for dashboard
  4. Set up run configurations for API and dashboard

Advanced Configuration

Custom Environment Variables

Add custom variables to your .env files:

Development Proxy

Set up a proxy for API calls in development:

Hot Reload Configuration

Fine-tune hot reload behavior:

Next Steps

Once your native development environment is running:
  1. Explore the codebase - Start with api/agentops/main.py and dashboard/pages/index.tsx
  2. Make your first changes - Try modifying a simple component or API endpoint
  3. Set up testing - Write tests for your changes
  4. Configure your IDE - Set up debugging and linting
  5. Join the community - Connect with other developers
For production deployment, see our Deployment Guide.