markov-agent
A coding agent following the principles defined in the SKILL.state paper:
Runtime architecture that replaces append-only conversational history with an explicit, mutable execution state. At each execution step, the model receives only the immutable skill specification, the current structured execution state, and the latest observation. Intermediate reasoning is discarded immediately after producing a validated state update, preventing prompt growth with execution history.
Hence, the context given to the agent is modeled similar to a Markov process: the next state depends only on the current one and the (observed result of the) action taken.
Overview
Although the paper specifies tasks like inventory management or CTF, I wanted to use it for a coding agent and test it in tasks I normally throw at Pi and see what happens.
The action space is: bash. Nothing more and nothing less. While most coding agents have some specially guardrailed tools (read, patch, etc.), there is research proving that powerful LMs can do better without:
Predefined tools improve performance for models with weaker bash proficiency, whereas bash-capable models can operate effectively with a bash-only interface and achieve substantially lower cost, especially on command-line-centric tasks.
Installation
uv add markov-agent
Usage
TUI
uv tool install markov-agent
markov # --model defaults to mistral:mistral-large-4
As a library
skill_state.py is the whole implementation of the paper. Define your
state as a pydantic model plus an immutable instruction block, then consume the StepEvents of
run(). agent.py is a small coding-agent domain to copy from.
If you only want the core and not the terminal UI (nor its textual dependency), copy
skill_state.py and prompt_template.jinja into your project: they import nothing else from this
package, and lmdk + jinja2 are their only requirements.
Development
This project uses uv, just and prek.
See justfile for pre-built commands used along pre-commit hooks and CI.
Made with mold template
References
@misc{badhe2026skillstatescalablelonghorizonagent,
title={SKILL.state: Scalable Long-Horizon Agent Skills},
author={Sanket Badhe and Priyanka Tiwari and Jonghyun Chung},
year={2026},
eprint={2608.26263},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2608.26263},
}
Metadata
Release files for markov-agent 1.4.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 | |
|---|---|---|---|---|
| markov_agent-1.4.0.tar.gz | 10.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| markov_agent-1.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.8 kB
Release files / markov_agent-1.4.0.tar.gz
| Download URL | markov_agent-1.4.0.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
231d9d9bec660c13b28675eced20cddf95e2f5eff8f9b9c1a882a44cccc00d57
|
|
BLAKE2b-256 checksum How to use checksums |
935cd2d9c80278931e948ce1e335e39292cd4ac851b621b018fb34b6de077148
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / markov_agent-1.4.0-py3-none-any.whl
| Download URL | markov_agent-1.4.0-py3-none-any.whl |
|---|---|
| Size | 12.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a1aa3fd19436b6394ab0bbfad32228b986d4a7695c56d71431831f9700789f6
|
|
BLAKE2b-256 checksum How to use checksums |
a3b721ba35563443045df8e2f0e14f63eaa5b44c328c857e379df096d0b4f08b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for markov-agent 1.4.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.