Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Environment:Microsoft Autogen Studio Server Environment

From Leeroopedia
Revision as of 18:46, 16 February 2026 by Admin (talk | contribs) (Auto-imported from environments/Microsoft_Autogen_Studio_Server_Environment.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Sources
Domains Infrastructure, Web_Application
Last Updated 2026-02-11 18:00 GMT

Overview

Python 3.9+ environment with FastAPI, SQLModel, Alembic, and WebSockets for running the AutoGen Studio web application and API server.

Description

AutoGen Studio is a web-based interface for building, testing, and deploying multi-agent teams. It requires a broader set of dependencies than the core AutoGen packages, including a web framework (FastAPI with Uvicorn), a database ORM (SQLModel with Alembic for migrations), authentication support (JWT, OAuth), and MCP protocol support. The Studio can run in full mode (web UI + database) or lite mode (serve a single team file as an API endpoint).

Usage

Use this environment for AutoGen Studio Team Deployment workflows — launching the Studio web UI, managing team configurations in the database, testing teams in the playground, and deploying teams as API endpoints. This is the prerequisite for all Studio-related Implementation pages.

System Requirements

Category Requirement Notes
OS Linux, macOS, or Windows Linux recommended for production (Docker available)
Python >= 3.9 Lower requirement than core packages
Disk 1GB+ For database, static frontend assets, and cache
Network Port 8081 (default) Configurable via AUTOGENSTUDIO_PORT

Dependencies

System Packages

  • `python` >= 3.9
  • `git-lfs` (required before cloning for frontend assets)
  • `node.js` (for frontend development only)

Python Packages

  • `pydantic` (any v2)
  • `pydantic-settings`
  • `fastapi[standard]`
  • `typer`
  • `aiofiles`
  • `python-dotenv`
  • `websockets`
  • `sqlmodel`
  • `psycopg` (PostgreSQL driver)
  • `alembic` (database migrations)
  • `loguru` (structured logging)
  • `pyyaml`
  • `html2text`
  • `anthropic`
  • `mcp` >= 1.11.0
  • `autogen-core` >= 0.4.9.2, < 0.7
  • `autogen-agentchat` >= 0.4.9.2, < 0.7
  • `autogen-ext[magentic-one, openai, azure, mcp]` >= 0.4.2, < 0.7

Credentials

Server Configuration:

  • `AUTOGENSTUDIO_HOST`: Host address (default: `127.0.0.1`)
  • `AUTOGENSTUDIO_PORT`: Port number (default: `8081`)
  • `AUTOGENSTUDIO_APPDIR`: Application data directory (default: `~/.autogenstudio`)
  • `AUTOGENSTUDIO_DATABASE_URI`: Database connection string (default: SQLite in appdir)
  • `AUTOGENSTUDIO_API_DOCS`: Enable API docs (default: `False`)
  • `AUTOGENSTUDIO_UPGRADE_DATABASE`: Run database migrations (default: `False`)
  • `AUTOGENSTUDIO_LITE_MODE`: Enable lite mode for single-team serving
  • `AUTOGENSTUDIO_TEAM_FILE`: Path to team JSON file (for serve mode)

Authentication:

  • `AUTOGENSTUDIO_AUTH_CONFIG`: Path to authentication YAML config
  • `AUTOGENSTUDIO_AUTH_DISABLED`: Disable authentication entirely
  • `AUTOGENSTUDIO_AUTH_TYPE`: Authentication type (`github`, etc.)
  • `AUTOGENSTUDIO_JWT_SECRET`: JWT signing secret
  • `AUTOGENSTUDIO_TOKEN_EXPIRY`: Token expiration in minutes (default: `60`)
  • `AUTOGENSTUDIO_GITHUB_CLIENT_ID`: GitHub OAuth app client ID
  • `AUTOGENSTUDIO_GITHUB_CLIENT_SECRET`: GitHub OAuth app client secret
  • `AUTOGENSTUDIO_GITHUB_CALLBACK_URL`: GitHub OAuth callback URL
  • `AUTOGENSTUDIO_GITHUB_SCOPES`: GitHub OAuth scopes (default: `user:email`)

Quick Install

# Install git-lfs first (required for frontend assets)
apt-get install git-lfs  # Debian/Ubuntu
# brew install git-lfs   # macOS

# Install AutoGen Studio
pip install autogenstudio

# Launch the web UI
autogenstudio ui --port 8081

# Or serve a single team as API endpoint
autogenstudio serve --team ./my_team.json --port 8084

Code Evidence

Environment variable configuration from `autogenstudio/cli.py:52-68`:

env_vars = {
    "AUTOGENSTUDIO_HOST": host,
    "AUTOGENSTUDIO_PORT": port,
    "AUTOGENSTUDIO_API_DOCS": str(docs),
}
if appdir:
    env_vars["AUTOGENSTUDIO_APPDIR"] = appdir
if database_uri:
    env_vars["AUTOGENSTUDIO_DATABASE_URI"] = database_uri
if auth_config:
    if not os.path.exists(auth_config):
        typer.echo(f"Error: Auth config file not found: {auth_config}", err=True)
        raise typer.Exit(1)
    env_vars["AUTOGENSTUDIO_AUTH_CONFIG"] = auth_config
if upgrade_database:
    env_vars["AUTOGENSTUDIO_UPGRADE_DATABASE"] = "1"

Docker production configuration from `autogen-studio/Dockerfile`:

FROM python:3.10-slim
ENV HOME=/home/user
ENV PATH=/home/user/.local/bin:$PATH
ENV AUTOGENSTUDIO_APPDIR=/home/user/app
# Non-root user, gunicorn with uvicorn workers
# Worker timeout: 12600 seconds, Port: 8081

Common Errors

Error Message Cause Solution
`Error: Auth config file not found` Invalid path to auth YAML Check `--auth-config` path exists
`Team file not found` Invalid team JSON path in serve mode Verify `--team` file path
Missing frontend assets git-lfs not installed before clone `git lfs install && git lfs fetch --all && git lfs checkout`
Database migration errors Schema out of date Run with `--upgrade-database` flag

Compatibility Notes

  • Database backends: Supports SQLite (default), PostgreSQL, MySQL, Oracle, SQL Server via SQLModel/SQLAlchemy.
  • Docker: Official Dockerfile uses `python:3.10-slim` with gunicorn + uvicorn workers.
  • Development: Use `--reload` flag for auto-reload on code changes (excludes alembic directories).
  • Production warning: AutoGen Studio is under active development and not recommended for production use. Expect breaking changes.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment