xah
xah is an extensible agent harness for people who want to change how an agent works in Python, not just change what its prompt says. Run it as an ACP server and use it from an editor or another ACP client. Start with the built-in tooling, or subclass the harness for your own workflow, whether or not it involves coding.
What you can change
Prompts, configuration, and plugins have their place. xah also lets you change the code that handles a tool call, decide what happens before it runs, and control how its result is presented. Extend just the part you need without rebuilding the rest of the harness.
- Control what can run. Give tools typed inputs and validate proposed calls in Python. A validator can warn the model, reject a call, or ask the user for permission in the client. Toolset policies and separate read and write directories let you set limits without relying on the prompt to enforce them.
- Compose tools and workflows. Subclass existing tools, connect an MCP server, or let the model activate a toolset when it needs it. Tools can keep session state, and a tool can delegate a focused job to a child harness with its own instructions and tools.
- Give users direct controls. Expose session options and typed slash commands with flags, subcommands, and help. A command can update state that a tool reads later, without asking the model to interpret the command.
- Give the model and the user different views. A tool can return a concise result to the model while showing the user a formatted preview or diff in the ACP client. The server log shows prompts, tool calls, and replies as they happen, without repeating the full conversation on every turn.
xah is built on Pydantic AI and Pydantic Deep Agents. The Agent Client Protocol (ACP) connects the server to the interactive client, so you don't have to build a separate interface for each harness.
Who might find it useful?
xah is for people comfortable working in Python, directly or with an agent, who want more control over how their agents behave. It may be a good fit if you want to:
- Work with locally hosted models and catch invalid or inappropriate tool calls in code rather than relying on the model to follow instructions every time.
- Add a project-specific capability, such as running checks with the right Python interpreter, or extend an existing tool without starting from scratch.
- Build an agent for work beyond coding while keeping the familiar interface of an editor or terminal client.
If an off-the-shelf agent already behaves the way you want, or you don’t want to maintain Python customizations, a ready-made harness may be a better fit.
Why does xah exist?
The first motivation is extensibility. Instructions such as AGENTS.md and skills give the agent context. Configuration selects from behavior the harness already supports. Plugins can go further, but may require a separate extension workflow. xah gives you a direct route: write and debug the behavior as ordinary Python, including rules the harness enforces even when the model doesn’t follow a prompt.
The second is making it easier to build ACP agents for work beyond coding. An ACP client already gives users a place to ask questions, see tool activity, and approve proposed actions. With xah, you can reuse that interface and write the parts specific to your work in Python: which tools the agent can use, what it checks before acting, and what it shows the user.
For example, a research assistant could search a reference collection and show source links alongside its findings. An editorial assistant could check a draft against a style guide, show suggested changes as a diff, and ask for approval before writing them. In both cases, you can start with one tool and try it in an existing ACP client, then add controls and checks as the workflow develops—without having to build a chat interface first.
About the name
eXtensible Agent Harness—or perhaps “Not Another Harness!” The a is silent.
Get started
pip install xah
xah
To try it without installing it separately, run uvx xah. Follow the quick start to configure a model provider and connect an ACP client. Then explore the built-in toolsets or follow the tutorials to write your own harness, tools, and commands.
Documentation
Visit the xah documentation for server settings, client setup, live logging, and runnable examples.
Metadata
Release files for xah 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xah-0.1.0.tar.gz | 93.6 kB | Without provenance | Details for xah-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| xah-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for xah-0.1.0-py3-none-any.whl |
Total release size: 231.0 kB
Release files / xah-0.1.0.tar.gz
| Download URL | xah-0.1.0.tar.gz |
|---|---|
| Size | 93.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
16dd2449ed370afe095d9d53f582488db53823f6463fe58fc72ad5c949e07d03
|
|
BLAKE2b-256 checksum How to use checksums |
cd9b1475301179491a0bc0bc7e2baf8557fff8a79e7c2d19905164caa4c8821e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.10
|
Release files / xah-0.1.0-py3-none-any.whl
| Download URL | xah-0.1.0-py3-none-any.whl |
|---|---|
| Size | 137.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d948df9e6236120b115be1ac31138d0d9f29597cf61db84eb118f99ee2fb1e6
|
|
BLAKE2b-256 checksum How to use checksums |
dddb0399b7cdf5fe44c339cdb2d40d57324aa69eaf7be7ef93de490bafb5687c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.10
|
Security for xah 0.1.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.