A Textual TUI for sequential CrewAI pipelines
Project description
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_inputcompatibility property is back. A 1.14.5 executor regression crashedhuman_input=Truewith'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.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file crewui-0.1.0.tar.gz.
File metadata
- Download URL: crewui-0.1.0.tar.gz
- Upload date:
- Size: 26.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6759cb6b8c1cfcf6e0ca776ac34ea97cdf19733dca692ebadc660d20089365bb
|
|
| MD5 |
99f3e4afcbc86168ff43cd91516b64bd
|
|
| BLAKE2b-256 |
ca4546d05d84c4e27becf86afe2b43cc96392fd84861bc2a4f17a9d84b72765e
|
Provenance
The following attestation bundles were made for crewui-0.1.0.tar.gz:
Publisher:
release.yml on coolhandle01/crewui
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
crewui-0.1.0.tar.gz -
Subject digest:
6759cb6b8c1cfcf6e0ca776ac34ea97cdf19733dca692ebadc660d20089365bb - Sigstore transparency entry: 2255234382
- Sigstore integration time:
-
Permalink:
coolhandle01/crewui@cb62bbcfd17641daccbfd0c22bc13c0f129246eb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/coolhandle01
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@cb62bbcfd17641daccbfd0c22bc13c0f129246eb -
Trigger Event:
push
-
Statement type:
File details
Details for the file crewui-0.1.0-py3-none-any.whl.
File metadata
- Download URL: crewui-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b73457ee16699c4ce6dd87b593bfdd9c02c3b6d9436981af51341475f416bdaf
|
|
| MD5 |
9a0c458d68b051fecfac6cef1730086c
|
|
| BLAKE2b-256 |
9632cccae60eccf7a3f38d76c989b27e5254cbafdd00121241b84f08b7ae2877
|
Provenance
The following attestation bundles were made for crewui-0.1.0-py3-none-any.whl:
Publisher:
release.yml on coolhandle01/crewui
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
crewui-0.1.0-py3-none-any.whl -
Subject digest:
b73457ee16699c4ce6dd87b593bfdd9c02c3b6d9436981af51341475f416bdaf - Sigstore transparency entry: 2255234386
- Sigstore integration time:
-
Permalink:
coolhandle01/crewui@cb62bbcfd17641daccbfd0c22bc13c0f129246eb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/coolhandle01
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@cb62bbcfd17641daccbfd0c22bc13c0f129246eb -
Trigger Event:
push
-
Statement type: