Skip to main content

A dev tool for manually driving llm-agents-from-scratch's SupervisedTaskHandler one call at a time, over HTTP, via a React frontend.

Project description

Agent Inspector

A dev tool for manually driving llm-agents-from-scratch's LLMAgent.SupervisedTaskHandler one call at a time, over HTTP, via a React frontend.

This repo is a two-language monorepo (Python backend + TypeScript frontend) packaged as a single PyPI wheel that bundles the built frontend assets and ships a CLI.

Quickstart

demo.py (repo root) is a ready-to-run agent_builder entrypoint -- a port of llm-agents-from-scratch's examples/ch08.ipynb Example 3 (Hailstone sequence via a single next_number tool), driven one call at a time through the Inspector's UI instead of the notebook's own manual loop.

  1. Install and start Ollama, then pull the model demo.py uses:

    ollama serve                 # in one terminal
    ollama pull qwen3:14b        # in another
    
  2. From this repo's root:

    uv sync
    uv run agent-inspector launch demo.py
    

    This opens a browser tab. Enter a task, e.g. "Compute the full Hailstone sequence starting from 4, step by step using next_number, until you reach 1.", create the session, and step through get_next_step()/run_step() until the agent reaches a final result to approve.

Development

agent-inspector launch takes a path to a Python script that exposes an agent_builder (an LLMAgentBuilder instance) at module scope -- see docs/overview.md's "Entrypoint discovery" section for the full convention:

uv sync
uv run agent-inspector launch main.py --dev

See frontend/ for the React/Vite UI and src/agent_inspector/ for the FastAPI backend and CLI.

Testing

make test-backend    # pytest, backend only
make test-frontend   # Playwright E2E, frontend + a real backend
make test            # both

test-frontend runs the checked-in suite under frontend/e2e/ -- first time, install the browser binaries Playwright needs:

cd frontend && npx playwright install --with-deps chromium

The suite drives a real agent-inspector launch instance end to end (no mocking), but needs no live Ollama daemon: frontend/e2e/fixtures/ scripted_agent.py is a network-free agent_builder backed by a scripted BaseLLM, started automatically by playwright.config.ts's webServer. Nothing needs to be running beforehand.

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

llm_agents_from_scratch_inspector-0.1.0.tar.gz (51.0 MB view details)

Uploaded Source

Built Distribution

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

File details

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

File metadata

File hashes

Hashes for llm_agents_from_scratch_inspector-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cada3f7fdbaa84fbdb6e893ca120193d8c5f0ffb2362b469d08f8a121a7faa3e
MD5 a6237060ea7d102ffd396411949b0e9e
BLAKE2b-256 e088afa9bc22d77acf525593acfcf5507073cdd16e4dbcb117a4b78f84b5d878

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llm_agents_from_scratch_inspector-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a9e77fc2b74aef5962f00b4da6fa65b812ea29518466fc6f2e1264588178311e
MD5 26356772556a30d9ebdbbc63d62b9b89
BLAKE2b-256 09c754968e1c66915d4f073be1419d2e8ce6904cce072b529bb94b08fa2d3e25

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