Add your description here
Project description
DenView
A real-time multi-agent office visualizer. Run a task with multiple AI agents and watch them work in an animated office — each agent is a fox character at their own desk, switching between screens and idle activities as their status changes.
Table of Contents
Overview
DenView has three parts:
- Python SDK — instrument your agent code with a few async calls to report task and work state.
- FastAPI server — stores tasks, agents, and work items; serves a state API for the frontend.
- Next.js UI — admin dashboard (tasks, API keys) and an embeddable office view per task.
Each task gets a shareable iframe URL (/view/<task_id>?token=<view_token>) that can be embedded anywhere without authentication.
Architecture
your agent code
|
| Python SDK (httpx, async)
v
FastAPI server <--> SQLite (SQLModel)
|
| proxied via Next.js route handlers
v
Next.js UI
|- /login, /register
|- /dashboard
|- /tasks (table + embedded office view)
|- /api-keys
|- /view/[task_id] (embeddable, no auth — view token only)
Auth model
- Admin UI: JWT in httpOnly cookie (
/login) - SDK calls:
X-API-Keyheader - Embedded view:
?token=<view_token>query param (per-task, read-only)
Office view
- Polls
/tasks/<id>/stateevery 3 seconds - Each agent has a randomized screen (code, chat, charts, files, terminal, kanban, ...) that rotates every 3–6 seconds while working
- Idle agents cycle through short animations (sleep, stretch, doodle, ...) every 1–2 seconds
- Agents going away (coffee, sofa, window) fade out of their desk
Installation
From PyPI (recommended)
Requirements: Python 3.11+
pip install denview
denview serve --port 8000
On first boot the server creates an admin user with password admin. Change it immediately.
The UI is bundled separately. Run it via Docker (recommended) or clone the repo and run pnpm dev.
Docker (quickstart)
docker compose up
Backend on http://localhost:8004, frontend on http://localhost:3009.
From source
Requirements: Python 3.11+, Node.js 22+, pnpm
git clone https://github.com/your-org/denview
cd denview
# backend
uv sync
denview serve --port 8000
# frontend (separate terminal)
cd ui
pnpm install
pnpm dev
Set the backend URL in ui/.env.local:
BACKEND_URL=http://localhost:8000
Usage
1. Create an API key
Log in at http://localhost:3009, go to API Keys, and create a key.
2. Instrument your agents
pip install denview
from denview.sdk import DenView
dv = DenView(
api_key="your-api-key",
backend_url="http://localhost:8004",
frontend_url="http://localhost:3009",
)
task = await dv.start_task(
name="My Task",
description="Optional description",
agents=[
{"name": "Alice", "role": "Researcher", "color": "#d95f12"},
{"name": "Bob", "role": "Coder", "color": "#3b82f6"},
],
)
print(task.embed_url) # shareable iframe URL
agent = await task.agent(name="Alice")
async with agent.working("refactoring auth module"):
await do_work() # marks work failed automatically on exception
await task.finish()
await dv.aclose()
3. Resume an existing task
task = await dv.get_task(task_id=42)
print(task.embed_url)
print(task.data.status)
4. Embed the office view
<iframe src="<task.embed_url>" width="100%" height="500"></iframe>
The embed URL works without login — authenticated by the per-task view_token.
CLI reference
denview serve [--host HOST] [--port PORT] [--reload]
| flag | default | description |
|---|---|---|
--host |
0.0.0.0 |
bind address |
--port |
8000 |
port |
--reload |
false |
auto-reload on file change (dev only) |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file denview-0.1.1.tar.gz.
File metadata
- Download URL: denview-0.1.1.tar.gz
- Upload date:
- Size: 60.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80838140f516cfc04b64c5580fd37669511e631a5bd9eada40dfd5d5cc5afe73
|
|
| MD5 |
a2f8871c5dd165b28b23058d940cfe6a
|
|
| BLAKE2b-256 |
d87d377d77061475577aaefbe77b69619a75f1d1f2d160ff93c2ec02ec0fa0a6
|
File details
Details for the file denview-0.1.1-py3-none-any.whl.
File metadata
- Download URL: denview-0.1.1-py3-none-any.whl
- Upload date:
- Size: 23.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
172fa1516124c1590d5407656f94cdc2b510d20951c13727075d326ae19c1bf3
|
|
| MD5 |
d574abb4d02a7c3075fdbec64b994bb5
|
|
| BLAKE2b-256 |
f6ec4bb98daaf1f5406f3601b2976e98c38072a28fad90072c89daeb481eba01
|