Skip to main content

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.

Figure

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.5.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 markov-agent 1.5.0
File Size Uploaded Provenance
markov_agent-1.5.0.tar.gz 11.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for markov-agent 1.5.0
File Interpreter ABI Platform
markov_agent-1.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.1 kB

Release files / markov_agent-1.5.0.tar.gz

Download URL markov_agent-1.5.0.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
cee13a0954df098b74f7a9f50fb37a834a33faf0788ac700d5d40b7392179fe7
BLAKE2b-256 checksum
How to use checksums
f1ab17c33f134363ce09bf6845c8fdd633bea77d29d0025f5bbf6b52f87392da
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.5.0-py3-none-any.whl

Download URL markov_agent-1.5.0-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9ca6345a8183bd9af14e7b22980cf801ef3f5ca8838799cbc3f80c778deaeb7c
BLAKE2b-256 checksum
How to use checksums
bbcb1f8eb9e2b8c3613fe163a1cce247d99ce0526f871abcfa863a8c909c6cf6
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.5.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.

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