Skip to main content

Agent Chat Minimal

This local Python distribution bundles the fixed weather/graph demo agent, FastAPI server, and a prebuilt static minimal chat UI. Node is needed only to build the web payload, not to install or run the resulting wheel.

From the repository root, build the UI and wheel with:

packages/agent-chat-minimal/scripts/build_wheel.sh

The script runs the frozen pnpm install and static export, stages out/ as package data, and writes the wheel under packages/agent-chat-minimal/dist/. Generated web/ content and dist/ are intentionally gitignored.

Install from PyPI (Python 3.11+, no Node required) and serve with:

pip install agent-chat-fastapi-langgraph-assistant-ui
minimal-chat-serve --port 8011

Install durable application persistence separately when needed:

pip install "agent-chat-fastapi-langgraph-assistant-ui[persistence]"
minimal-chat-migrate ./agent-chat.db

Or install and serve the locally built wheel with:

python -m pip install packages/agent-chat-minimal/dist/*.whl
minimal-chat-serve --port 8011

Open http://localhost:8011/ (single-prompt chat) or http://localhost:8011/full/ (thread sidebar with previous chats). Set OPENAI_API_KEY to enable /assistant; without it, the UIs and /health still work and /assistant returns 503. MINIMAL_WEB_DIR / FULL_WEB_DIR may override the bundled web directories.

Arbitrary agents & providers

from agent_chat_minimal import create_app
from my_agent import make_my_agent  # any compiled graph over {"messages": [...]}

app = create_app(graph=make_my_agent("anthropic:claude-sonnet-4-5"))
# or deferred: app = create_app(graph_factory=make_my_agent)
# or multi-agent: app = create_app(agents={"mine": make_my_agent})
  • Models are provider:name specs via init_chat_model (openai:gpt-4o-mini, anthropic:claude-sonnet-4-5, ollama:llama3.1). Factories also accept a chat-model instance (handy for fake-model tests).
  • GET /agents lists the registry (weather, calculator, plus agent_chat.agents entry points); POST /assistant/{agent_id} selects one, POST /assistant aliases the default.
  • create_app(..., prepare_state=fn) overrides the message reducer; state.thread_id / runConfig.thread_id is forwarded as LangGraph configurable.thread_id for checkpointer-backed graphs.

Documentation (in the wheel)

Guides ship inside the package and are readable at runtime:

from agent_chat_minimal import docs
docs.list()           # ['index', 'quickstart', 'agents', ...]
docs.show("threads")
Guide Covers
quickstart install → first chat in 2 minutes
agents write + serve + share your own agent
providers OpenAI / Anthropic / Ollama specs & creds
configuration env vars, CLI flags, hooks, 503 semantics
threads multi-thread chats, frontend-full compat
transport pinned Python/frontend protocol boundary and replacement criteria
persistence principal, domain ports, service authorization, and deletion semantics

Threads (frontend-full compatible)

The server also speaks the full-stack thread protocol (/threads, /threads/{id}/messages, scoped POST /assistant with thread_id/user_id), so frontend-full works against either backend. See the threads guide.

Configuration

HOST=0.0.0.0                # uvicorn bind host
PORT=8011                   # uvicorn bind port
MODEL=openai:gpt-4o-mini    # provider:model spec
DEFAULT_AGENT=weather       # registry id aliased by POST /assistant
MINIMAL_WEB_DIR=            # override bundled web/ (empty = bundled)
FULL_WEB_DIR=               # override bundled web_full/ (empty = bundled)
UI_PRESET=minimal           # runtime UI preset: minimal or full
DATABASE_PATH=agent-chat.db # default application SQLite file
DATABASE_URL=               # SQLAlchemy URL; overrides DATABASE_PATH
CHECKPOINT_DATABASE_PATH=agent-chat-checkpoints.db # graph checkpoint SQLite file
CHECKPOINT_DATABASE_URL=    # SQLite URL; overrides checkpoint path
AUTO_MIGRATE=true           # migration policy for a future composition root
OPENAI_API_KEY=             # credential for the default openai model
ANTHROPIC_API_KEY=          # credential when MODEL uses anthropic:

CLI mirrors it: minimal-chat-serve --model ollama:llama3.1 --agent calculator, plus --check to build the default graph and exit without booting uvicorn.

Run the offline serving tests and clean-venv smoke check from the repository root:

python3 -m venv /tmp/agent-chat-minimal-tests
/tmp/agent-chat-minimal-tests/bin/pip install \
  "packages/agent-chat-minimal[test]"
/tmp/agent-chat-minimal-tests/bin/pytest packages/agent-chat-minimal
packages/agent-chat-minimal/scripts/smoke_test_wheel.sh

Build the Python-only runtime image after building the wheel:

docker build -t agent-chat-minimal packages/agent-chat-minimal
docker run --rm -p 8011:8011 agent-chat-minimal

Metadata

Release files for agent-chat-fastapi-langgraph-assistant-ui 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-chat-fastapi-langgraph-assistant-ui 0.4.0
File Size Uploaded Provenance Actions
agent_chat_fastapi_langgraph_assistant_ui-0.4.0.tar.gz 1.1 MB With provenance Details for agent_chat_fastapi_langgraph_assistant_ui-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agent-chat-fastapi-langgraph-assistant-ui 0.4.0
File Interpreter ABI Platform Actions
agent_chat_fastapi_langgraph_assistant_ui-0.4.0-py3-none-any.whl Python 3 none any Details for agent_chat_fastapi_langgraph_assistant_ui-0.4.0-py3-none-any.whl

Total release size: 2.3 MB

Release files / agent_chat_fastapi_langgraph_assistant_ui-0.4.0.tar.gz

Download URL agent_chat_fastapi_langgraph_assistant_ui-0.4.0.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
b99cfdf061df3d4d04eb728b4308c4c40e1fc4ac83ac650a080c4d58a763bff6
BLAKE2b-256 checksum
How to use checksums
0de57803d62088bb236c77b832e3ba765956fedf460b3c2af150ebecb5b88f4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release files / agent_chat_fastapi_langgraph_assistant_ui-0.4.0-py3-none-any.whl

Download URL agent_chat_fastapi_langgraph_assistant_ui-0.4.0-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
a403ca2d43f4a509df44fee3bab21d025c1243844b3bee33fa4636d1ebc79801
BLAKE2b-256 checksum
How to use checksums
718bc98bfbe7894cb07a05e15ff26a5e2f985f56217def8b6e22c27438a8fcc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Security for agent-chat-fastapi-langgraph-assistant-ui 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for agent_chat_fastapi_langgraph_assistant_ui-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page