wolf-agent (Python)
A thin client for the wolf mcp stdio server. wolf itself is a native executable: it needs no
Python, no pip packages and no network. This client uses only the Python standard library
(Python 3.11 or newer), opens no sockets, and holds no tool logic: it spawns
wolf mcp --workspace-root ROOT, speaks newline-delimited JSON-RPC 2.0 (initialize,
notifications/initialized, tools/list, tools/call), and stops the child on close.
Install
pip install wolf-agent
The wolf executable ships with Wolf Runtime. Start a free evaluation at
https://wolfxl.com/evaluate, then run wolf mcp --help to check that your build includes the
server. MCP clients that launch servers by command can also run wolf mcp --workspace-root ROOT
directly, without this package.
Use
from wolf_agent import WolfAgentClient, ToolError
with WolfAgentClient("/abs/workspace", wolf="/path/to/wolf") as wolf:
read = wolf.read("report.docx") # revision_sha256, html, blocks
hits = wolf.search("report.docx", "Quarterly") # anchored matches
old = hits["matches"][0]["html"]
try:
receipt = wolf.edit(
"report.docx",
read["revision_sha256"],
"revised",
[{"old_html": old, "new_html": old.replace("Quarterly", "Annual")}],
approved=True,
)
except ToolError as refusal: # isError: typed refusal
print(refusal.code, refusal.hint)
else:
print(receipt["status"], receipt["published"])
wolf_observe, wolf_transact and wolf_diff take the native agent request directly
(wolf.wolf_observe(request)); wolf.lifecycle(phase, transaction, approved=None) continues a
server-owned transaction (lifecycle_plan through lifecycle_discard; commit needs
approved=True); call_tool(name, arguments) reaches any tool and list_tools() returns the
server's descriptors. Each result is the tool's structuredContent.
Behaviour
| Condition | Result |
|---|---|
Tool result with isError |
ToolError with .tool, .code, .hint, .document; the session stays usable |
| JSON-RPC error object | RpcError with .code, .message, .data; the session stays usable |
| Non-JSON line, wrong response id, malformed result | ProtocolError; the child is stopped and later calls re-raise it |
No response within request_timeout (default 120 s; startup_timeout 30 s) |
WolfTimeoutError; the child is stopped |
| Spawn failure, exit or closed pipes | WolfProcessError with .returncode and the stderr tail |
close() (and leaving the with block) closes stdin, waits shutdown_timeout (5 s), then
terminates, then kills. wolf may also be an argv prefix, for example
["docker", "run", "-i", "--rm", "--network", "none", ...]; env replaces the child's whole
environment.
Tests
python3 -m pytest tests
The tests drive a scripted stand-in server and need only pytest.
Metadata
Release files for wolf-agent 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 |
|---|---|---|---|---|
| wolf_agent-0.1.0.tar.gz | 11.2 kB | With provenance | Details for wolf_agent-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wolf_agent-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for wolf_agent-0.1.0-py3-none-any.whl |
Total release size: 21.6 kB
Release files / wolf_agent-0.1.0.tar.gz
| Download URL | wolf_agent-0.1.0.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ec1f7c292e3bec462d4c684bf0550e0b4da01482e00e560b2e69a33c5359a25
|
|
BLAKE2b-256 checksum How to use checksums |
e50d5f8298ee226a51a6c2257f71f63766483a2b0a78ed71f03e073192e2c35c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 30, 2026.
Transparency logRelease files / wolf_agent-0.1.0-py3-none-any.whl
| Download URL | wolf_agent-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b7b680eb1feb9511dd7a3b513fc835c32b5dac98a7694453fc5e59dd51381d64
|
|
BLAKE2b-256 checksum How to use checksums |
2fd9660485062a2018d80500fb33c781bf3c7fb7c2166434306ead895747031e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 30, 2026.
Transparency logSecurity for wolf-agent 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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for wolf_agent-0.1.0.tar.gz
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 Oct 30, 2026.
Transparency logA 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.