Skip to main content

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-Key header
  • Embedded view: ?token=<view_token> query param (per-task, read-only)

Office view

  • Polls /tasks/<id>/state every 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

Requirements: Python 3.11+, Node.js 18+, pnpm

Backend

# from repo root
uv sync
denview serve --port 8000

On first boot the server creates an admin user with password admin. Change it immediately.

Frontend

cd ui
pnpm install
pnpm dev                      # development
pnpm build && pnpm start      # production

Set the backend URL in ui/.env.local:

BACKEND_URL=http://localhost:8000

Usage

1. Create an API key

Log in at http://localhost:3000, go to API Keys, and create a key.

2. Instrument your agents

from src.sdk import DenView

dv = DenView(
    api_key="your-api-key",
    backend_url="http://localhost:8000",
    frontend_url="http://localhost:3000",
)

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. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

denview-0.1.0.tar.gz (60.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

denview-0.1.0-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

Details for the file denview-0.1.0.tar.gz.

File metadata

  • Download URL: denview-0.1.0.tar.gz
  • Upload date:
  • Size: 60.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.10

File hashes

Hashes for denview-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ed077dab2723d71cbcc24810c0804f999561bef533c1c35bf874941ae7837ccc
MD5 1f9a9d1cfd96d67d6661385098384eae
BLAKE2b-256 6965bdab10c9f34433a6dfb91aa79d17633d459aece3918c6563832267c707db

See more details on using hashes here.

File details

Details for the file denview-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: denview-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.10

File hashes

Hashes for denview-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97531f112e97e48fe38e338fbcf455b794d75f00468cc0caaacecf8c0297fc34
MD5 98533d6440b4acc49213624704cf62f8
BLAKE2b-256 706e9f3b8c080f8e6e89a3c20c2c3c0f752dad30880f72fbd426c6bb7b1d18a6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page