Terminal channel for Zeno — stdin/stdout with streaming.
Project description
zeno-channel-cli
Terminal channel for Zeno. Reads
lines from stdin into IncomingMessages and renders the agent's
OutgoingMessages to stdout. Doubles as a manual smoke-test harness
and as the simplest reference implementation of the Channel protocol.
Install
uv add 'zeno-framework[cli]'
# or, without the AI package:
uv add zeno-channel-cli
Minimal usage
import asyncio
from zeno.agent import Agent
from zeno.app import ZenoApp
from zeno.channels.cli import CliChannel
from zeno.testing import FakeProvider
app = ZenoApp(
agent=Agent(name="root", instructions="You are Zeno, a helpful assistant."),
channels=[CliChannel()],
provider=FakeProvider(), # swap for OpenAIProvider / ClaudeSDKProvider in production
)
asyncio.run(app.run())
Then run the script. Type a line, hit return, see the reply. Ctrl-D
or Ctrl-C exits cleanly. user_id defaults to $USER (or "local"
if unset) so a developer running the snippet above gets a sensible
tenant scope without configuration. Override explicitly in production:
CliChannel(user_id="alice", prompt=">>> ")
Behavior
- Capabilities:
supports_streaming=False,supports_threading=False. The coreStreamBufferconsolidates chunked replies into onesend()at finalize-time, which the renderer emits as a single line. - Stdin: read via
asyncio.to_thread(stream.readline)so the CLI channel stays dependency-free (noaioconsole). At most one line read is in flight at a time, matching REPL semantics. - Inbound queue: exposes
inbound_put(message)sozeno-schedulercan inject proactive messages without going through stdin. - Shutdown:
stop()is idempotent and closes the renderer; callingsend()afterstop()raisesChannelError.
Testing
uv run pytest packages/zeno-channel-cli
Tests use io.StringIO for stdin/stdout — no terminal needed.
Part of the Zeno framework.
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 zeno_channel_cli-1.0.1.tar.gz.
File metadata
- Download URL: zeno_channel_cli-1.0.1.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e69c68c16b03251c43f7c741b4d7f9b6f17a93a9c4284c71b690c4db85def53e
|
|
| MD5 |
4fa930636e5da1d5f893b038072c9642
|
|
| BLAKE2b-256 |
7983edf79b202777d9b1a8ccabe203f5d4062f73ed3a38900cdf2cee7f1f3c36
|
Provenance
The following attestation bundles were made for zeno_channel_cli-1.0.1.tar.gz:
Publisher:
publish.yml on nkootstra/zeno
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zeno_channel_cli-1.0.1.tar.gz -
Subject digest:
e69c68c16b03251c43f7c741b4d7f9b6f17a93a9c4284c71b690c4db85def53e - Sigstore transparency entry: 1390034145
- Sigstore integration time:
-
Permalink:
nkootstra/zeno@d2cdcd756fc7ca022ec23fe9ef35d76e7683ac9c -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/nkootstra
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d2cdcd756fc7ca022ec23fe9ef35d76e7683ac9c -
Trigger Event:
push
-
Statement type:
File details
Details for the file zeno_channel_cli-1.0.1-py3-none-any.whl.
File metadata
- Download URL: zeno_channel_cli-1.0.1-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78e1a574c13e1233489fe07bed4f52506fef3139cd983cf535fff2b649b9c743
|
|
| MD5 |
4edbcdf77aefce91fce881b937ef6d79
|
|
| BLAKE2b-256 |
eca50b06df14195f6f309599ad2d1b18b6594cea827680b54a891c550a8b8758
|
Provenance
The following attestation bundles were made for zeno_channel_cli-1.0.1-py3-none-any.whl:
Publisher:
publish.yml on nkootstra/zeno
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zeno_channel_cli-1.0.1-py3-none-any.whl -
Subject digest:
78e1a574c13e1233489fe07bed4f52506fef3139cd983cf535fff2b649b9c743 - Sigstore transparency entry: 1390034243
- Sigstore integration time:
-
Permalink:
nkootstra/zeno@d2cdcd756fc7ca022ec23fe9ef35d76e7683ac9c -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/nkootstra
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d2cdcd756fc7ca022ec23fe9ef35d76e7683ac9c -
Trigger Event:
push
-
Statement type: