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.

Implementation:Microsoft Autogen Studio CLI

From Leeroopedia
Revision as of 11:33, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Microsoft_Autogen_Studio_CLI.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Sources
Domains Agent Frameworks, Web Application Deployment, CLI Tooling, Development Environments
Last Updated 2026-02-11 00:00 GMT

Overview

Concrete tool for launching the AutoGen Studio web application via CLI provided by the autogenstudio package.

Description

The AutoGen Studio CLI provides two primary commands for starting the studio web application: ui for the full-featured studio and lite for a lightweight single-team interface. Both commands are built with the Typer CLI framework and use uvicorn as the ASGI server. The ui command writes configuration to a shared environment file so that multiple uvicorn worker processes can read consistent settings. The lite command instantiates a LiteStudio object and starts a blocking server with an in-memory SQLite database.

Usage

Use autogenstudio ui when you need the full studio experience with database persistence, component gallery, authentication, and multi-session support. Use autogenstudio lite when you want to quickly test a single team configuration with minimal overhead.

Code Reference

Source Location

  • Repository: Microsoft AutoGen
  • File: python/packages/autogen-studio/autogenstudio/cli.py

Signature

# Full UI command (L26-L84)
@app.command()
def ui(
    host: str = "127.0.0.1",
    port: int = 8081,
    workers: int = 1,
    reload: Annotated[bool, typer.Option("--reload")] = False,
    docs: bool = True,
    appdir: str | None = None,
    database_uri: Optional[str] = None,
    auth_config: Optional[str] = None,
    upgrade_database: bool = False,
) -> None

# Lite mode command (L134-L161)
@app.command()
def lite(
    team: Optional[str] = None,
    host: str = "127.0.0.1",
    port: int = 8080,
    auto_open: bool = True,
    session_name: str = "Lite Session",
) -> None

Import

# CLI invocation (not a Python import)
autogenstudio ui --host 127.0.0.1 --port 8081
autogenstudio lite --team team.json --port 8080

I/O Contract

Inputs (ui command)

Name Type Required Description
host str No (default "127.0.0.1") Host address to bind the server to
port int No (default 8081) Port number for the server
workers int No (default 1) Number of uvicorn worker processes
reload bool No (default False) Enable auto-reload on code changes (excludes alembic directories)
docs bool No (default True) Whether to generate and serve API documentation
appdir str or None No (default None) Path to the AutoGen Studio application directory for data storage
database_uri str or None No (default None) Database connection URI (e.g. sqlite:///path/to/db.sqlite3 or postgresql://...)
auth_config str or None No (default None) Path to authentication configuration YAML file (must exist on disk)
upgrade_database bool No (default False) Whether to run database schema migrations on startup

Inputs (lite command)

Name Type Required Description
team str or None No (default None) Path to team JSON/YAML file; if not provided, uses a default team
host str No (default "127.0.0.1") Host address to bind the server to
port int No (default 8080) Port number for the lite server
auto_open bool No (default True) Whether to automatically open the browser on startup
session_name str No (default "Lite Session") Name for the auto-created session

Outputs

Name Type Description
(side effect) None Starts a blocking uvicorn server process; does not return until the server is stopped

Usage Examples

Basic Example: Start Full Studio

# Start with default settings (localhost:8081)
autogenstudio ui

# Start with custom port and PostgreSQL database
autogenstudio ui --port 9000 --database-uri "postgresql://user:pass@localhost/autogenstudio"

# Start with authentication and auto-upgrade
autogenstudio ui --auth-config ./auth.yaml --upgrade-database

# Start with multiple workers and reload for development
autogenstudio ui --workers 4 --reload

Basic Example: Start Lite Mode

# Start with default team (basic assistant with calculator)
autogenstudio lite

# Start with a custom team configuration file
autogenstudio lite --team ./my_team.json --port 8085

# Start without auto-opening browser
autogenstudio lite --team ./research_team.yaml --no-auto-open

Programmatic Usage

# You can also invoke the CLI programmatically via Typer
from autogenstudio.cli import app
from typer.testing import CliRunner

runner = CliRunner()
result = runner.invoke(app, ["ui", "--port", "8082"])

Related Pages

Implements Principle

Page Connections

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