Skip to main content

Wisp

Wisp

My personal terminal coding agent in Python and Rust, built as a testbed for agent runtime design—exploring agent engineering from the loop up.

I use Wisp for day-to-day work in the terminal and to study the parts of coding agents that are easy to hand-wave until you build them end to end: keeping the model/tool loop independent of persistence and UI, steering or cancelling a run mid-flight without corrupting history, enforcing tool approvals outside the model's control, compacting context, and driving a native Rust TUI over a typed RPC boundary.

The codebase and its companion write-ups—including the architecture notes and Crafting Coding Agents, a runnable walkthrough of the design trade-offs—are public in case they are useful to read, borrow from, or fork.

How it's built

Every interface is a thin adapter over one event-driven runtime:

CLI / JSONL-RPC / SDK adapters -> RPC command host -> CodingSession -> AgentHarness -> run_agent_loop
  • run_agent_loop runs the provider request and tool-execution cycle within a single turn and knows nothing about disk persistence or frontends.
  • AgentHarness owns the in-memory transcript across runs, queued user messages, and boundary decisions between model requests.
  • CodingSession adds append-only JSONL persistence, context compaction, project trust, and tool approval policy.
  • Typed WispEvent stream & JSONL-RPC. The Rust TUI (rust/wisp-tui), print/JSON CLI modes, and Python SDK (wisp.sdk) all consume the same typed event stream rather than maintaining separate agent loops.
  • Deterministic offline testing. A built-in fake provider exercises the full runtime, protocol, and test suite without API keys or network access.

Runtime mechanics

  • Mid-run steering. Corrections sent during an active run apply at the next safe boundary between model requests while preserving completed tool work (Alt+Enter steers in the TUI; Enter queues a follow-up).
  • Approval and trust gates. Read-only tools run directly; file writes, edits, and shell commands require approval outside the acting model's control. /permissions auto automatically approves eligible built-in workspace and session-scratch edits on macOS/Linux, but still asks before commands and other mutations. Git metadata, agent-control files, shared hard-linked files, protected paths, and mandatory confirmations are not automatically granted. Auto is saved per project (session-only in broad folders); /permissions ask revokes it. Automatic decisions are recorded in the session and shown on tool cards. This checks where and how an edit runs, not whether its contents are safe. Separately opt into /permissions auto-commands for macOS Seatbelt containment: supported tests/builds run without prompts or model review; other eligible commands receive independent review. Use uv run --no-sync pytest for installed Python environments and Bash's cwd argument for subprojects. Polling/cancelling a sandboxed job needs no further approval while its session and consent remain active. Network is blocked, filesystem access is restricted, and sandbox failure never silently runs unrestricted. Pre-existing hardlink aliases can still expose or modify protected/outside files: this is not complete file isolation. Existing Auto or earlier command-review consent does not enable this mode; select it again to opt in. Project-local settings, AGENTS.md, and skills stay inert until a repository is trusted.
  • Unwindable cancellation. Cancelling unwinds in-flight tool processes cleanly and leaves the session log valid so --continue resumes from the last committed state.
  • Append-only session trees. Runs are recorded as typed WispEvent entries in JSONL files that can be resumed, branched, or inspected after the fact.

See Staying in sync and Tools & safety for how those invariants are enforced.

Interfaces

Surface Command / entry point Role
TUI wisp Fullscreen Rust terminal UI over JSONL-RPC
Print wisp -p "…" Assistant text on stdout, events on stderr (--yes required for writes/shell)
JSON wisp -p "…" --mode json One WispEvent JSON object per line
RPC wisp --mode rpc Long-lived typed JSONL command/event process
Python SDK wisp.sdk (InProcessWisp) In-process or subprocess embedding; see examples/sdk/

Running it

Wisp targets Python 3.11+ on macOS and Linux (Windows is best-effort). It supports OpenAI (including ChatGPT Plus/Pro device sign-in via /connect), Anthropic, Google, xAI, and DeepSeek, plus the offline fake provider.

Install the published package with uv (native macOS arm64 and Linux x86_64 glibc 2.28+ wheels bundle the Rust TUI):

uv tool install --python 3.12 wisp-ai
wisp -p "hello" --provider fake

Or run directly from a source checkout (requires Python 3.11+, uv, and the Rust toolchain pinned in rust-toolchain.toml for the TUI):

uv sync --locked
uv run wisp -p "hello" --provider fake

cargo build -p wisp-tui
WISP_RUST_TUI_BINARY="$(pwd)/target/debug/wisp-tui" uv run wisp tui

Full usage details live in the documentation: Installation · Quickstart · TUI guide · Python SDK · Reference · Changelog

Project status & issues

Wisp is personal software maintained for my own use and learning rather than as a community-driven product. Interfaces and internals may change as experiments evolve.

  • Bug reports: GitHub issues are open for reproducible bug reports.
  • Feature requests & PRs: I'm not looking for feature requests or external pull requests. Feel free to fork the repository if you want to take it in a different direction.
  • Development notes: Local setup and verification gates are documented in CONTRIBUTING.md.
  • Security: Please report security vulnerabilities privately as described in SECURITY.md.

License

MIT

Metadata

Release files for wisp-ai 0.14.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 wisp-ai 0.14.0
File Size Uploaded Provenance Actions
wisp_ai-0.14.0.tar.gz 745.3 kB Without provenance Details for wisp_ai-0.14.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for wisp-ai 0.14.0
File Interpreter ABI Platform Actions
wisp_ai-0.14.0-py3-none-any.whl Python 3 none any Details for wisp_ai-0.14.0-py3-none-any.whl
wisp_ai-0.14.0-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details for wisp_ai-0.14.0-cp311-abi3-manylinux_2_28_x86_64.whl
wisp_ai-0.14.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for wisp_ai-0.14.0-cp311-abi3-macosx_11_0_arm64.whl

Total release size: 18.2 MB

Release files / wisp_ai-0.14.0.tar.gz

Download URL wisp_ai-0.14.0.tar.gz
Size 745.3 kB
Tags Source
SHA-256 checksum
How to use checksums
38b6cc4f4df9d4d52d0cbcf51660bf26b6bcac3bd8f79a5655c63076dc779292
BLAKE2b-256 checksum
How to use checksums
002417079452e35632c47b5e0d272be33ee326d88a8a33fc8782b9e8abd209a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / wisp_ai-0.14.0-py3-none-any.whl

Download URL wisp_ai-0.14.0-py3-none-any.whl
Size 853.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d3c47530279e473412344e1492ecf90212eb34b167f6a9acceeff8eedffea938
BLAKE2b-256 checksum
How to use checksums
a823ece1de791f461b972f5f09219eee3779e1857547d640cc973346ab683218
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / wisp_ai-0.14.0-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL wisp_ai-0.14.0-cp311-abi3-manylinux_2_28_x86_64.whl
Size 8.7 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
2fb11ee6cc8871d196a6da136a3a244358685dc5c0ae1f4f87e36b58f7b0584f
BLAKE2b-256 checksum
How to use checksums
6380f30e85eab873391ffdc239ab9cff319cdd05ae83951045c5180f12e95a51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / wisp_ai-0.14.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL wisp_ai-0.14.0-cp311-abi3-macosx_11_0_arm64.whl
Size 7.9 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1b999467b0b160af71c9996fe78c4b3b3ec9c5979c0c7b1fe5e00e8cb690f124
BLAKE2b-256 checksum
How to use checksums
fbb581536b91ba9a58e4eeeda20f7eaae91e9a17f2f44638adfb426c14862815
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for wisp-ai 0.14.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.14.0 This release

4 release files No provenance

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