Files
agent-framework/python/packages/devui/dev.md
T
Victor Dibia 1ef24d3e91 Python: Add DevUI to AgentFramework (#781)
* add initial backend service code for devui

* add tests

* add frontendcode

* ui updates

* update readme

* ui updates and tweaks

* update ui bundle

* improve ui, add react flow base

* add react flow ui, fix background

* update ui, fix introspection bug

* update readme

* update ui build

* add support for multimodal input - both backend and frontend

* update ui build

* refactor as main framework package

* backend and tests refactor

* ui build update

* ui build update and refactor

* update pyproject.toml, update uv.lock

* update ui build

* ui update to fit oai responses types

* add backend updat and readme update

* mypy and other fixes

* add intial dev guide

* update ui and fix workflow bug

* update ui build, add thread support

* type fixes

* update workflow view

* update uv.lock

* fix workflow iport errors

* lint and other fixes

* mypy fixes

* minor update

* update ui build

* refactor to use oai dependencies directly, update examples to samples, improve typing

* readme update

* update ui and ui build

* fix workflow pyright error

* update ui, fix issues with run workflow placement, miniamp menu, etc

* make samples integrate serve

---------

Co-authored-by: Chris <66376200+crickman@users.noreply.github.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-09-22 23:30:08 +00:00

2.0 KiB

Testing DevUI - Quick Setup Guide

Hi everyone! Here are the step-by-step instructions to test the new DevUI feature:

1. Get the Code

git pull
git checkout victordibia/devui

2. Setup Environment

Navigate to the Python directory and install dependencies:

cd python
uv sync --dev
source .venv/bin/activate

3. Configure Environment Variables

Create a .env file in the python/ directory with your API credentials:

# Copy the example file
cp .env.example .env

Then edit .env and add your API keys:

# For OpenAI (minimum required)
OPENAI_API_KEY="your-api-key-here"
OPENAI_CHAT_MODEL_ID="gpt-4o-mini"

# Or for Azure OpenAI
AZURE_OPENAI_ENDPOINT="your-endpoint"
AZURE_OPENAI_CHAT_DEPLOYMENT_NAME="your-deployment-name"

4. Test DevUI

Option A: In-Memory Mode (Recommended for quick testing)

cd packages/devui/samples
python in_memory_mode.py

This runs a simple example with predefined agents and opens your browser automatically at http://localhost:8090

Option B: Directory-Based Discovery

cd packages/devui/samples
devui

This launches the UI with all example agents/workflows at http://localhost:8080

5. What You'll See

  • A web interface for testing agents interactively
  • Multiple example agents (weather assistant, general assistant, etc.)
  • OpenAI-compatible API endpoints for programmatic access

6. API Testing (Optional)

You can also test via API calls:

curl -X POST http://localhost:8080/v1/responses \
  -H "Content-Type: application/json" \
  -d '{
    "model": "agent-framework",
    "input": "What is the weather in Seattle?",
    "extra_body": {"entity_id": "weather_agent"}
  }'

Troubleshooting

  • Missing API key: Make sure your .env file is in the python/ directory with valid credentials
  • Import errors: Run uv sync --dev again to ensure all dependencies are installed
  • Port conflicts: DevUI uses ports 8080 and 8090 by default - close other services using these ports

Let me know if you run into any issues!