Akshauhini is a live visual monitoring tool for multi-agent applications. It renders your agents as characters in an animated office, where each movement reflects a real telemetry event: agents walk to tool stations, carry tasks, wait on dependencies, hand off work and react to errors.
Behind the animation, Insights answers the questions you actually debug with: why an agent is stuck, which agent is responsible for most of the latency, whether two agents keep calling each other, why a workflow failed, which agent consumed the most tokens, and whether the latest version performs worse than the previous one. Each answer comes with the events it is based on, backed by built-in LLM tracing and LLM evaluation.
It also provides a read-only view of the coding agents already installed on your machine (Claude Code, Codex CLI and Gemini CLI), built from the transcripts they save locally, with optional questions answered by a local offline LLM.
Live office view. Agents, tasks, tool calls, handoffs and errors are animated in real time from recorded events.
One collector per machine. Every instrumented application reports to the same local collector, regardless of the directory it runs from.
Simple integration. A single decorator instruments a Python agent function; any other language can post JSON events over HTTP or send OpenTelemetry spans.
Live and replay modes. Follow a run as it happens, or replay stored events at 0.5×, 1×, 2× or 5× speed.
Agent inspector. Inspect each agent's task queue, model, reported token usage, errors and operation durations.
Insights. Answers the operational questions for every run and project, with the events that back each answer: why an agent is stuck, which agent causes most of the latency, whether two agents keep calling each other, why a workflow failed, which agent used the most tokens, and whether the latest version performs worse than the previous one.
LLM tracing. Every LLM call with its model, latency, tokens, cost and errors, per agent and task; prompts and responses only when you opt in.
LLM evaluation. Record quality checks (office.evaluate) and compare pass rates and scores between versions of your app.
Local agent transparency. Review what Claude Code, Codex CLI and Gemini CLI did on this machine: timelines, files read and written, shell commands and external targets.
Offline analysis. Ask questions about recorded activity using a local model served by Ollama.
Local by default. The server binds to 127.0.0.1 and stores data in SQLite.
The backend is built with FastAPI and SQLite and uses the Akshauhini Event Protocol (AOEP). The frontend is built with React and PixiJS.
Akshauhini requires Python 3.11 or later.
pip install akshauhini The published package includes the prebuilt web UI, so Node.js is not required.
Every akshauhini command can also be run as python -m akshauhini, for example python -m akshauhini run python my_app.py. Use this form on Windows if Smart App Control or an organization's App Control policy reports that akshauhini.exe "has been blocked": that small launcher is generated by pip at install time and is unsigned, while python.exe is signed. Akshauhini itself always starts its server and your apps through Python, so nothing else is affected.
akshauhini This starts the collector in the background and opens http://127.0.0.1:8765. If another program already uses port 8765, a free port is chosen and printed instead; your apps find it automatically.
Instrument a Python agent:
import akshauhini office = akshauhini.init("my-agents", "My Agent Team") @office.track("researcher", name="Research Agent", role="researcher") def research_agent(topic): return run_your_agent(topic) research_agent("market trends") init starts the collector if it is not already running, so the office and your application can be launched in any order.
A typical workflow is to start the office, connect an application, monitor its runs, review local agents, and stop the office when you are finished.
akshauhini The office starts in the background and opens http://127.0.0.1:8765 (or a free port, if another program holds 8765) in your browser. To run it in the current terminal instead, use:
akshauhini serve --open Press Ctrl+C to stop an office running in the foreground.
Use one of the following methods.
Python SDK. Add the decorator to your agent functions (see Quick start) and run your application as usual:
python your_app.py Command wrapper. Run any program with the office attached. The program's start, completion and failure are recorded, and the office opens on the new run:
akshauhini run python your_app.py HTTP or OpenTelemetry. Applications written in other languages can post events to /api/events or send spans to /v1/traces. See HTTP API and OpenTelemetry input.
Open the office in your browser.
Select an application from the toolbar shortcuts or the project switcher. The Apps tab lists every application that has reported.
Choose a mode: Live follows the selected run as events arrive.
Replay steps through stored events at 0.5×, 1×, 2× or 5× speed.
Demo shows clearly labelled sample telemetry.
Click an agent to open the inspector, which shows its task queue, model, token usage, errors and operation durations.
Click a task card to follow the agent carrying it.
Drag to pan and scroll to zoom.
Open the Local agents tab to see sessions from Claude Code, Codex CLI and Gemini CLI on this machine, or list them in the terminal:
akshauhini agents Select a session to view its timeline, files, commands and external targets. See Local agents for details.
5. Ask questions with a local model (optional)
Questions are answered by a model served by Ollama on this machine.
Install Ollama, start it and download a model:
Select the model from the Settings menu in the office, or set it before starting the office:
export AKSHAUHINI_OLLAMA_MODEL=
Select a session or agent and enter your question, or press ? to ask about all sessions.
6. Check status and stop the office
akshauhini status # Show whether the office is running and which applications have reported akshauhini stop # Stop the running office Insights
Press I or click Insights in the office to see answers for the open run and its project. Each answer is computed from the events your app recorded and names the agents, events and numbers it is based on; when the data needed for an answer was not reported, it says what to add.
The LLM calls tab traces every call in the run, and Evaluations lists quality checks and their failures. The same answers are available from the terminal (akshauhini insights) and the HTTP API (/api/insights/...).
Version comparison needs to know which version produced each run: pass version= to akshauhini.init() or set AKSHAUHINI_APP_VERSION; the git commit is recorded automatically when the app runs in a git checkout. Without versions, the latest runs are compared with the ones before them.
akshauhini [--port PORT] [--version] [COMMAND] [OPTIONS] Running akshauhini without a command is equivalent to akshauhini start.
Global options must be placed before the command, for example akshauhini --port 9000 serve.
akshauhini start Starts the office as a background process if one is not already running on the selected port, then opens it in the browser. The office keeps running until it is stopped with akshauhini stop.
akshauhini serve [--host HOST] [--db PATH] [--app APP_ID] [--open] [--no-local-agents] Runs the office in the foreground of the current terminal. Press Ctrl+C to stop it.
akshauhini status Reports whether the office is running, its version, the number of stored runs and the time of the last event for each application. Exits with code 1 if the office is not running.
akshauhini stop Stops a background office started by akshauhini, akshauhini start, akshauhini.init() or akshauhini run. An office started with serve is stopped with Ctrl+C in its terminal.
akshauhini run [--no-open] COMMAND [ARGS...] Runs COMMAND with the office attached. If no office is running, one is started and remains available after the command finishes so the run can be inspected; press Ctrl+C to stop it. The command receives the AKSHAUHINI_ENDPOINT and AKSHAUHINI_RUN_ID environment variables, and its start, completion or failure is recorded. run exits with the exit code of COMMAND.
run does not inspect arbitrary Python code or patch frameworks such as LangGraph, CrewAI or AutoGen. Agent-level activity is recorded only through SDK calls, HTTP events or OpenTelemetry spans.
akshauhini insights [--run RUN_ID] [--app APP] [--db PATH] [--json] Prints the Insights answers for a run (default: the latest run) and, with --app, for that project, including the version comparison. It reads the database directly, so the office does not need to be running.
akshauhini agents Lists each supported local agent with its state (running, installed or not found), number of sessions and data directory, followed by its three most recent sessions with their tool-call and file-write counts.
akshauhini delete-run RUN_ID [--db PATH] Permanently deletes all events and questions recorded for RUN_ID. Stop any office that uses the database before running this command.
akshauhini scan ollama [--interval SECONDS] Polls a local tool's API and mirrors what it reports into the office. Ollama is currently the only supported source. The office must already be running. Run this command in a separate terminal and press Ctrl+C to stop it.
# Open the office on a different port akshauhini --port 9000 # Run a dedicated office for one project with its own database akshauhini serve --db ./office.sqlite --app my-app-id --open # Run a script without opening the browser akshauhini run --no-open python your_app.py # Why did the latest run of a project fail, and is the new version worse? akshauhini insights --app my-app-id # Delete a run from the default database akshauhini stop akshauhini delete-run Connecting an application
The complete connection guide covers Python and HTTP integration, dynamic agent registration, progress updates, question handlers and Ollama setup. The UI also includes a Connect app guide.
Office.track is the simplest integration. It supports regular and async functions, preserves return values and exceptions, and automatically records agent registration, task lifecycle, duration, success and failure.
from akshauhini import Office office = Office(app_id="my-agents", app_name="My Agent Team") @office.track("researcher", name="Research Agent", role="researcher") def research_agent(topic): return run_your_agent(topic) result = research_agent("market trends") Within a tracked function, use:
office.operation(...) to time tool calls and other operations.
office.progress(...) to report completed work, waiting dependencies, blockers, next steps and work-unit counts. When progress is unknown, no percentage is shown.
office.artifact(...) to record results and artifact metadata.
For full control, register agents and emit events directly:
LLM tracing, evaluations and versions
office.evaluate(name, score=..., passed=..., threshold=...) records an eval.recorded quality check. Give a score, a pass/fail result or both; with a score and a threshold, it passes when score >= threshold.
version= (or AKSHAUHINI_APP_VERSION) tags the run so Insights can compare versions. The current git commit is added automatically when available, or set AKSHAUHINI_APP_COMMIT.
A run started with akshauhini.init() or with Office(app_id=...) is marked completed when the program or block ends, or failed with the error if it raises. Call office.finish("failed", error=...) to record it yourself.
Dynamic agents and questions
Register the application with Office(app_id="my-app", app_name="My App") and its agents with office.agent(...). Each run has its own roster; agents can join, update their metadata and leave at any time.
Use with office.answer_questions({agent_id: callback}): ... to answer questions sent from the inspector. Each question is delivered to the matching agent's callback, and structured replies update its displayed progress.
Optional summaries from a local LLM (Ollama) explain recorded telemetry without changing runtime state. No model is selected unless configured, and no fallback provider is used.
Note: Events are stored exactly as supplied, without redaction. Do not include secrets in event data, and enable prompt and response capture only where storing them locally is acceptable.
Applications in any language can send events by posting a JSON array of 1 to 1000 events to /api/events:
[{ "version": "1.0", "event_id": "unique-event-1", "run_id": "run-42", "type": "tool.call.started", "timestamp": "2026-09-06T12:00:00Z", "agent_id": "researcher", "task_id": "task-1", "operation_id": "search-1", "data": {"tool": "web_search", "title": "Find references"} }] Quality checks are eval.recorded events with data.name and a data.score, a data.passed, or both; agent_id is optional for them. Report a run's version with data.version on run.started (or version in POST /api/apps/connect).
Use the same operation_id for the matching completion or failure event. Submitting an identical event twice has no effect; reusing an event_id with different contents returns 409 Conflict and rolls back the whole batch. Producers should keep timestamps and IDs stable when retrying.
The machine-readable protocol schema is available at docs/aoep.schema.json.
Send OTLP/HTTP JSON to /v1/traces. Resource or span attributes must include the following:
Each completed span is converted into a pair of AOEP start and end events with the original timestamps and duration. A failed span produces a failure event. A review span produces only review.started, because the end of a span does not indicate approval; emit explicit approval or rejection events instead. Spans without these attributes are ignored.
Limitations: OTLP protobuf and gRPC are not supported, and automatic framework instrumentation is not provided. Because spans are exported only when they complete, in-progress operations are not visible; use SDK start events for live visibility.
The Local agents tab (and the akshauhini agents command) shows the coding agents on this machine and what they did, based on the transcript files those agents already save.
Sessions are displayed on the same office floor as connected applications. Each recent session appears as a character, grouped by agent as a department, with its project folder as its role. Every movement corresponds to a transcript entry: shell commands and edits go to engineering, file reads and searches to the archive, and web access to research, while model turns take place at the desk. Each prompt appears as a request. Inactive sessions return to the lobby and resume when their transcript is updated.
Selecting a character shows the full session timeline, files read and written, commands, external targets, token usage and models. The Sessions & data view provides the same details for every session.
Every view identifies the file its data came from.
You can ask a question about a single session, a single agent or all agents (press ?). Answers are generated by a local model served by Ollama, using only a digest of the relevant transcripts. Each answer lists its sources and the exact text provided to the model. Questions and answers are stored per session in your browser.
To continue using a database from an earlier version, set AKSHAUHINI_DB to the path of your existing ./akshauhini.sqlite.
By default, a single office serves the whole machine. The Apps tab shows how many applications have reported and how many are currently active. Applications that reported within the last 15 seconds appear as shortcuts in the toolbar, and the project switcher groups runs by app_id.
Each project's office shows only its own agents and the stations they use. A station (research, archive, records, engineering, compute, human review or meeting) appears the first time an event sends an agent there, and the operations desk appears while an agent with the manager role is present.
To isolate a project completely, give it its own database and scope:
akshauhini --port 8765 serve --db /path/to/project/office.sqlite --app my-app-id A scoped office lists only runs for that app_id and follows the newest run; disable Follow latest run to keep an older run selected. An unscoped office can be filtered in the browser with ?app=my-app-id.
Stop the office before running delete-run against its database. SQLite on a network file system is not safe for concurrent writers.
AOEP events → SQLite collector → state projector → behaviour engine → presentation scheduler → character controller → A* navigation → PixiJS Runtime state is authoritative. The state projector determines task state; animations never advance it.
Priority handling. Errors, human decisions and cancellations interrupt the current animation immediately. Short successful operations may be displayed for up to 450 ms longer than they took, while the inspector shows the reported metrics.
Progress. Progress remains indeterminate unless a task.progress event reports a measured data.progress value between 0 and 1.
Tools are mapped to stations by whole words in the tool name, in the following order of precedence:
For example, vector_search maps to the archive. A producer can set the station explicitly with data.station.
message.sent or handoff.started with data.target_agent_id moves the agent to the target worker.
Messages with three or more data.participants take place in the meeting area.
human.requested moves the agent to human review. This is for display only and does not provide an approval mechanism.
Teams of any size are supported; workers beyond the first five are placed in an open-plan area that extends the floor.
These protections are provided as is, without warranty; see License.
The server binds to loopback by default. It has no authentication or tenant isolation and is not intended for exposure to untrusted networks.
Local agent transcripts are read-only. Akshauhini never modifies or uploads them; excerpts are shown only in your local browser.
Local agent endpoints accept only requests that originate from loopback and carry a loopback Host header, which prevents DNS rebinding. This applies even when the server is started with --host 0.0.0.0.
Questions are refused for cloud-tagged Ollama models (*-cloud) and non-loopback Ollama URLs unless AKSHAUHINI_ALLOW_REMOTE_LLM=1 is set.
The web UI loads fonts from Google Fonts when online. This is the only request the office makes outside the local machine; without a connection it falls back to system fonts.
Known limitations and remaining work are tracked in IMPLEMENTATION_LOG.md.
Building from source requires Python 3.11 or later and Node.js 20.19 or later.
python3 -m venv .venv source .venv/bin/activate # Windows PowerShell: .venv\Scripts\Activate.ps1 pip install -e '.[dev]' cd web && npm ci && npm run build && cd .. akshauhini serve --open For frontend development, run npm run dev in the web directory alongside the collector. Vite proxies /api and WebSocket traffic to port 8765.
pytest -q cd web npm test npm run test:e2e Browser tests require Chrome. Set CHROME_PATH if it is not installed at the default macOS location. The tests start a local collector automatically.
cd web && npm run package-ui && cd .. python -m build python scripts/check_dist.py dist twine check --strict dist/* npm run package-ui copies the built UI into akshauhini/static so the wheel can serve it without Node.js; run it again after any UI change. scripts/check_dist.py fails if a wheel is missing the UI. Releases are built and published by .github/workflows/publish.yml when a v* tag is pushed; see docs/RELEASING.md.
akshauhini run python examples/connected_app.py --directory . --seconds 90 Research team
akshauhini run python examples/research_team.py Insights
python examples/insights_demo.py Records three runs of a simulated support desk at version 1.0 and three at a deliberately worse 1.1, with LLM calls, evaluations, a loop between two agents and one failure. Open Support Desk in the office and press I.
Request Studio is a standalone demo application. Run it in a second terminal:
.venv/bin/python sample_projects/request_studio/run.py Open http://127.0.0.1:8766, enter a request, its requirements and optional source documents, then follow the run in Akshauhini. The manager agent can answer follow-up questions or route them to a specialist, with source citations. The saved report and the office artifact contain identical output. Ollama chat and embedding models can be configured from the Settings menu and enabled in the demo form.
Akshauhini is released under the Apache License 2.0 and is free for personal, academic and commercial use. See LICENSE and NOTICE.
You may use, modify and redistribute it for any purpose.
Redistributions must include the LICENSE and NOTICE files and state any changes made.
Contributions are accepted under the same license.
If you use Akshauhini in published research, please cite this repository.
The web UI bundles third-party open-source components (React, PixiJS and their dependencies, and Lucide icons), each under its own permissive license; see THIRD_PARTY_NOTICES.md. The DM Sans, DM Mono, Manrope, Press Start 2P and Noto Sans Devanagari fonts are served by Google Fonts under the SIL Open Font License.




