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

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.post1.tar.gz.

File metadata

File hashes

Hashes for llm_agents_from_scratch_inspector-0.1.0.post1.tar.gz
Algorithm Hash digest
SHA256 ca9e8468bce9069fa991dec91bbb2a0d39907bc743ed420f496634bc57bd4ade
MD5 5750512fac0d9fd2614289b8addb030a
BLAKE2b-256 f386ecf1d238cb466cc2d5f7cd6e9bb2fffa8a219e6306a1bfee84e9341f95b7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llm_agents_from_scratch_inspector-0.1.0.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 46242084a3f46477702b9c06c9dd4ede28734ff67b8426f64114d7fc978319e4
MD5 c8760d6bb46bf35a1c2e5c272e79525d
BLAKE2b-256 d65311db2e2c13403a181e88961e6e168844fc1e8dbaa55017367dce907fecc4

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