Skip to content

Latest commit

 

History

History
145 lines (99 loc) · 2.62 KB

File metadata and controls

145 lines (99 loc) · 2.62 KB

Quick Setup Guide

Get the Mini Agent Platform up and running in minutes.

For detailed project information, architecture, and API documentation, see README.md

Quick Start

# 1. Clone and setup
git clone <repository-url>
cd mini_agent_platform
./setup.sh

# 2. Start database (if using Docker)
./run-db.sh

# 3. Start the platform
./start.sh

That's it! The API will be available at http://localhost:8000/docs

System Requirements

  • Python: 3.8 or higher
  • MySQL: 8.0 or higher (or use Docker)
  • pip: Python package manager

Installation

1. Clone the Repository

git clone <repository-url>
cd mini_agent_platform

2. Run Setup Script

./setup.sh

This will create a virtual environment and install all dependencies.

Database Setup

Using Docker (Recommended)

./run-db.sh

Local MySQL

  1. Install MySQL 8.0+ on your system
  2. Create database: CREATE DATABASE agent_platform;
  3. Ensure MySQL is running on localhost:3306

Configuration

Default settings in app/config.py:

  • Database URL: mysql+pymysql://root:password@localhost:3306/agent_platform
  • API Keys: api_key_tenant_1tenant_1, api_key_tenant_2tenant_2
  • Supported Models: gpt-4o, claude-sonnet-4.5

Optional: Create .env file to override:

DATABASE_URL=mysql+pymysql://root:password@localhost:3306/agent_platform

Running the Application

./setup.sh  # First time only
./start.sh  # Start the platform
./stop.sh   # Stop the platform

Manual

source .venv/bin/activate  # Linux/Mac
.venv\Scripts\activate      # Windows

alembic upgrade head
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

Verify

Running Tests

./test.sh              # Run all tests
./test.sh test_tools.py # Run specific test file

Or manually:

pytest tests/ -v

Database Migrations

# Apply migrations
alembic upgrade head

# Create new migration (after model changes)
alembic revision --autogenerate -m "Description"
alembic upgrade head

Troubleshooting

Database Connection Error

# Check if MySQL is running
docker ps  # If using Docker

# Verify connection string in app/config.py or .env

Port Already in Use

# Use different port
uvicorn app.main:app --reload --port 8001

Script Permission Denied (Linux/Mac)

chmod +x setup.sh start.sh stop.sh test.sh run-db.sh

Need more details? Check out README.md for full documentation.