Skip to main content

crewui

A Textual terminal UI for a sequential CrewAI pipeline. You build a Crew; crewui renders it — a sidebar task tracker, a live agent-output stream, a pipeline log, and a token/cost summary — and, when a task asks for human review, routes the feedback prompt to an input box instead of a blocking terminal input().

crewui is a presentation layer and nothing more. It reads a Crew and touches only two things beyond it: the step/task callback contract and, for human review, one semi-internal crewai provider hook. Everything application-specific — where a run id is recorded, how run metrics are computed and priced — is injected through callbacks, so the package never reaches up into your app.

Install

pipx install crewui        # the CLI + the demo, isolated
# or, as a library in your project:
pip install crewui

See it run without writing any code or setting an API key:

crewui demo                # drives a scripted three-phase pipeline in the TUI
crewui demo --dry-run      # render the layout without walking the pipeline

The demo is fully offline — no LLM call, no network — so it doubles as a smoke test that the install works.

Use it in your app

from crewui import CrewAIPipelineTUI

CrewAIPipelineTUI(
    crew=build_my_crew(),          # any sequential crewai.Crew
    record_prefix="myapp",         # log records under this name render in the agent pane
    pipeline_name="My Pipeline",   # sidebar title
).run()

The sidebar reads each task's display name (Task.name) and agent role straight off crew.tasks, so wiring the crew is the whole job — there is no separate task map to maintain.

Injecting host behaviour

Three optional callbacks carry everything crewui deliberately does not know:

Callback When it fires Typical use
on_start() worker thread, right before kickoff() bind a run id, stamp the start time
on_complete(result) right after kickoff() persist run metrics
get_token_cost(input_tokens, output_tokens) when rendering the summary return the USD estimate to display

A save failure in on_complete is swallowed and surfaced in the pipeline log — persistence never takes the UI down.

Theming

CrewAIPipelineTUI ships a usable dark theme and owns it as an absolute CSS_PATH. A subclass ships its own look by setting its own CSS_PATH:

class MyTUI(CrewAIPipelineTUI):
    CSS_PATH = "my_app.tcss"

Human review

A Task(human_input=True) pauses the run for feedback. crewui opens the input box, parks the worker thread until you submit, and feeds what you type back into crewai's feedback loop (empty input — just Enter — means "accept"). The routing leans on crewai.core.providers.human_input, a semi-internal API isolated to a single factory in crewui/app.py so there is one place to fix if it moves between crewai versions.

The crewai version pin, and the fork

crewui declares crewai>=1.15.6,<1.16.

  • The floor (1.15.6) is the first release where the agent executor's ask_for_human_input compatibility property is back. A 1.14.5 executor regression crashed human_input=True with 'AgentExecutor' object has no attribute 'ask_for_human_input'; below the floor, the human-review feature does not work.
  • The ceiling (<1.16) is deliberate, not lazy. The human-input routing is the one place crewui reaches past crewai's public surface, so a minor bump is a review event: re-check that seam, then move the ceiling.

There is a second, separate human-input bug that a stock PyPI crewai still carries: the feedback prompt tells the operator to review "the Final Result above", but crewai only renders that result when verbose=True — so under a TUI with verbose off, the operator is asked to review output that was never printed. The downstream project this library was extracted from pins a crewai fork that adds a Result-for-Review panel so the referenced output is always shown. crewui does not pin that fork — it works against stock crewai, and simply streams each answer into the agent-output pane before the review gate opens, which is the generic equivalent of what the fork's panel does. If you need the fork's exact behaviour, pin it in your application, not here.

Development

python -m venv .venv && . .venv/bin/activate
pip install -e ".[dev]"

ruff check .
mypy
pylint crewui
pytest --cov=crewui --cov-branch --cov-report=term-missing --cov-fail-under=95

The pure helpers in crewui/_helpers.py are unit-tested; the App itself is driven through Textual's pilot harness in tests/test_app.py — status transitions, the dry-run preview, the metrics block, the error path, and the human-review gate all run against a fake offline crew.

Licence

MIT. See LICENSE.

Metadata

Release files for crewui 0.2.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 crewui 0.2.0
File Size Uploaded
crewui-0.2.0.tar.gz 32.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for crewui 0.2.0
File Interpreter ABI Platform
crewui-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 51.0 kB

Release files / crewui-0.2.0.tar.gz

Download URL crewui-0.2.0.tar.gz
Size 32.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5685a5efc8589d6ea9f8b3501e935fce4b94b127333cfe81b3d69d8310a0795e
BLAKE2b-256 checksum
How to use checksums
b602371ba702c3d4c2782cd922857dc31cecd94167b44745b18a760ce31bce5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 29, 2026.

Transparency log

Release files / crewui-0.2.0-py3-none-any.whl

Download URL crewui-0.2.0-py3-none-any.whl
Size 18.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ca2c5eab8840d12804eddb1b050e3f9b2ed4cf652bc800c256b37585449e11f
BLAKE2b-256 checksum
How to use checksums
2a2be283fe032f0db076f39ff9f378407060f499c6200e2f369c742e7766bd99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 29, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

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