
How do I install and run AutoGen Studio locally (pip install, autogenstudio ui, port/host/appdir flags)?
Quick Answer: Install AutoGen Studio with
pip install -U autogenstudio, then launch the UI locally withautogenstudio ui --port 8081. You can customize how and where it runs using flags like--hostfor the bind address and--appdirto 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 uicommand, 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-agentchatandautogen-core.
Core Concepts & Key Points
| Concept | Definition | Why it's important |
|---|---|---|
| AutoGen Studio | A 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 command | The 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 flags | CLI 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:
- Prepare a Python environment: Use a dedicated virtual environment so Studio’s dependencies don’t collide with the rest of your system.
- Install AutoGen Studio: Use
pipto install theautogenstudiopackage from PyPI. - Run the UI with the right flags: Use
autogenstudio uiplus 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
autogenstudioCLI. - 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
localhostby 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.0only 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:
./myappis 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
appdirper project (./risk-assessment-agents,./support-bot-agents). - A shared
appdirfor 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:
-
Clone the AutoGen Studio repository.
-
Open
python/packages/autogen-studio/in VS Code. -
Use “Dev Containers: Reopen in Container” if you want a containerized dev environment.
-
From
python/packages/autogen-studio:pip install -e . -
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 cleanand directory removal beforegatsby 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:
Runningpip install -U autogenstudiointo 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.0on an open network exposes your agent UI and potentially sensitive logs.
How to avoid it: Preferlocalhostfor 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:
-
A platform engineer creates a new directory
/srv/autogen/apps/credit-riskand wires in shared config (model endpoints, logging conventions, policies). -
We start Studio for that project:
conda activate autogen autogenstudio ui \ --host 0.0.0.0 \ --port 8081 \ --appdir /srv/autogen/apps/credit-risk -
The team connects via
http://dev-host:8081/over VPN and iterates on agent roles and tool usage in the browser. -
Once the team converges on a design, we port the definitions into Python using
autogen-agentchatand eventually wire them to aSingleThreadedAgentRuntimeor a distributedGrpcWorkerAgentRuntimeon theautogen-coreside.
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 wrapsautogenstudio 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 8081and openhttp://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.