How do I install and run AutoGen Studio locally (pip install, autogenstudio ui, port/host/appdir flags)?
AI Agent Automation Platforms

How do I install and run AutoGen Studio locally (pip install, autogenstudio ui, port/host/appdir flags)?

8 min read

Quick Answer: Install AutoGen Studio with pip install -U autogenstudio, then launch the UI locally with autogenstudio ui --port 8081. You can customize how and where it runs using flags like --host for the bind address and --appdir to point Studio at a specific application directory.

AutoGen Studio gives you a web-based way to prototype and debug agent workflows without writing boilerplate UI code. Running it locally means you keep model keys, configuration, and test data on your machine while quickly iterating on agents and conversations. Once you’re comfortable with a flow in Studio, you can port the same patterns into AutoGen AgentChat or Core for production runtimes.

Key Benefits:

  • Fast prototyping: Stand up a full agent UI with a single autogenstudio ui command, no frontend work required.
  • Local control & privacy: Keep models, logs, and configs within your local environment while you explore agent behavior.
  • Smooth path to production: Use Studio to refine agent roles, tools, and flows, then implement the same designs with autogen-agentchat and autogen-core.

Core Concepts & Key Points

ConceptDefinitionWhy it's important
AutoGen StudioA web-based UI (packaged as autogenstudio) for prototyping with AI agents and applications without writing code.Lets you experiment with agent patterns before committing to Python implementations.
autogenstudio ui commandThe CLI entry point that starts the Studio web app on a given host/port and optional app directory.Single command to bring up the full UI; the main way to run Studio locally.
Host/port/appdir flagsCLI options like --host, --port, and --appdir that control where Studio binds and which app directory it loads.Critical for integrating Studio into your dev workflow, multi-service environments, or custom project structures.

How It Works (Step-by-Step)

At a high level, you:

  1. Prepare a Python environment: Use a dedicated virtual environment so Studio’s dependencies don’t collide with the rest of your system.
  2. Install AutoGen Studio: Use pip to install the autogenstudio package from PyPI.
  3. Run the UI with the right flags: Use autogenstudio ui plus host/port/appdir flags to match your local setup, then connect via browser.

1. Prepare a Python Environment

AutoGen Studio is a Python package, so you run it from a Python environment. In a regulated org, you almost always want isolation so framework dependencies don’t bleed into other services.

Create and activate a virtual environment (conda example):

conda create -n autogen python=3.10
conda activate autogen

To deactivate later:

conda deactivate

You can use venv instead if that’s your standard, but the key is: keep Studio’s dependencies scoped.

Note: Python 3.10 or later is required for the broader AutoGen stack, and using 3.10 here keeps you aligned with AgentChat and Core.

2. Install AutoGen Studio from PyPI

From within your virtual environment:

pip install -U autogenstudio

This:

  • Installs the autogenstudio CLI.
  • Pulls in Studio’s Python-side dependencies and the pre-built UI bundle, so you don’t need Node/Gatsby/Yarn just to run it.

When to install from source: Only if you intend to modify the UI itself (React/Gatsby code). In that case, there’s an additional workflow (clone repo, pip install -e, yarn build) that pulls in Node tooling; for most users, the PyPI install is sufficient and simpler.

3. Run AutoGen Studio Locally with autogenstudio ui

Once installed, the simplest way to run the UI is:

autogenstudio ui --port 8081

Then open:

http://localhost:8081/

in your browser.

This command:

  • Starts the Studio web application on port 8081.
  • Binds to localhost by default.
  • Uses the default app directory bundled with Studio (sufficient for trying out the UI).

From here, you can explore agent definitions, conversations, and configuration through the browser without writing any Python code.

4. Using --host, --port, and --appdir Flags

Once you move beyond “hello world” and fold Studio into a team workflow, flags matter.

--host: Control the bind address

By default, Studio binds to localhost. To make it reachable from other machines (dev VM, Docker container, or shared lab environment), you can:

autogenstudio ui --host 0.0.0.0 --port 8081
  • --host <host> sets the host address (e.g., localhost, 127.0.0.1, 0.0.0.0).
  • Use 0.0.0.0 only on networks you trust; you’re exposing a UI that may contain API keys and logs.

Warning: If you bind to a non-local interface, make sure you’re behind a VPN and/or reverse proxy with auth. Studio is a dev tool, not a hardened public-facing app.

--port: Avoid collisions

If 8081 is already in use, change the port:

autogenstudio ui --port 9000

or with host:

autogenstudio ui --host localhost --port 9000

You’ll then access it at:

http://localhost:9000/

This is useful when you’re running multiple local services: model gateways, doc sites, or other dev tools.

--appdir: Point Studio at your own app directory

As you start building out agentic applications, you often want Studio to operate in the same directory layout you’ll eventually wire into autogen-agentchat and autogen-core. That’s what --appdir is for.

autogenstudio ui --port 8081 --appdir ./myapp

Here:

  • ./myapp is a directory that contains your Studio app configuration and related assets.
  • Studio will treat this as the root for your agent definitions, workflows, and configs.

Typical patterns:

  • One appdir per project (./risk-assessment-agents, ./support-bot-agents).
  • A shared appdir for a platform team where business squads contribute agent configs without touching Python.

Note: You can combine all flags:

autogenstudio ui \
  --host 0.0.0.0 \
  --port 8081 \
  --appdir /srv/autogen/apps/claims-intake

That gives you a project-specific Studio instance reachable across your dev network.

5. Optional: Install from Source (If You Need to Modify the UI)

If you want to change the React UI (brand, layout, deeper integration), you can install from source. The high-level steps are:

  1. Clone the AutoGen Studio repository.

  2. Open python/packages/autogen-studio/ in VS Code.

  3. Use “Dev Containers: Reopen in Container” if you want a containerized dev environment.

  4. From python/packages/autogen-studio:

    pip install -e .
    
  5. Build the frontend under python/packages/autogen-studio/frontend:

    npm install -g gatsby-cli
    npm install --global yarn
    
    cd frontend
    yarn install
    yarn build
    

    (Windows users may need alternative commands as noted in the docs, e.g., explicit gatsby clean and directory removal before gatsby build.)

After this, autogenstudio ui works the same way, but you control the UI source.

Warning: This workflow assumes you’re comfortable with Node, Yarn, and Gatsby. If you just want to run Studio, stick with the PyPI installation.

Common Mistakes to Avoid

  • Skipping a virtual environment:
    Running pip install -U autogenstudio into your system Python can collide with other packages and make version pinning painful.
    How to avoid it: Always create and activate a dedicated env (conda create -n autogen python=3.10) before installing Studio.

  • Binding Studio too broadly without controls:
    Using --host 0.0.0.0 on an open network exposes your agent UI and potentially sensitive logs.
    How to avoid it: Prefer localhost for local dev; if you need network access, put Studio behind a VPN and/or reverse proxy with authentication, and treat it like any internal tooling.

Real-World Example

In my environment, we use AutoGen Studio as a “playground layer” on top of the same model backends that production uses. A typical flow for a new project looks like:

  1. A platform engineer creates a new directory /srv/autogen/apps/credit-risk and wires in shared config (model endpoints, logging conventions, policies).

  2. We start Studio for that project:

    conda activate autogen
    
    autogenstudio ui \
      --host 0.0.0.0 \
      --port 8081 \
      --appdir /srv/autogen/apps/credit-risk
    
  3. The team connects via http://dev-host:8081/ over VPN and iterates on agent roles and tool usage in the browser.

  4. Once the team converges on a design, we port the definitions into Python using autogen-agentchat and eventually wire them to a SingleThreadedAgentRuntime or a distributed GrpcWorkerAgentRuntime on the autogen-core side.

Because Studio is just a local process with configurable host/port/appdir, we can spin up multiple isolated instances: one per project, one per feature branch, or even ephemeral instances for experiments.

Pro Tip: Standardize a small shell script (or Make target) per project, e.g., make studio, that wraps autogenstudio ui --appdir ./myapp --port 8081. That way every engineer can run “the right” Studio instance without memorizing flags, and you keep appdir/port conventions consistent across teams.

Summary

To install and run AutoGen Studio locally, you:

  • Create a Python 3.10+ virtual environment for isolation.
  • Install Studio from PyPI with pip install -U autogenstudio.
  • Launch the UI with autogenstudio ui --port 8081 and open http://localhost:8081/ in your browser.

Use --host to control where the UI binds (e.g., localhost vs 0.0.0.0), and --appdir to tie Studio to a specific application directory that mirrors your agent project. This keeps your Studio workflows aligned with how you’ll later implement agents using AutoGen AgentChat and Core, while staying within your local or internal network boundaries.

Next Step

Get Started