markovian

markovian is an agent for Claude Code from pjt222/agent-almanac. It costs 28 tokens per session (2,315 once invoked), scanned A, original, MIT.

A specialist in stochastic processes, which model systems that change partly by chance. It covers Markov chains, where the next state depends on the current one, along with hidden-state models, decision processes, and sampling methods.

In plain words
What is it for?
Use it to analyze transition matrices and long-term behavior, decode sequences, estimate hidden-model parameters, choose policies, simulate processes, and check sampling convergence.
Why use it?
It helps choose, build, and check models for uncertain systems while testing whether the Markov assumption fits the problem.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Part of the agent-almanac plugin — 122 skills, 76 agents shipped together

Good fit Use it to analyze transition matrices and long-term behavior, decode sequences, estimate hidden-model parameters, choose policies, simulate processes, and check sampling convergence.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/pjt222/agent-almanac/markovian
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/pjt222/agent-almanac

Made for: Claude Code.

Or install agent-almanac, the plugin that ships this one along with the rest of its 122 skills, 76 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for markovian

README.md
[![agentmods](https://agentmods.dev/badge/agents/pjt222/agent-almanac/markovian.svg)](https://agentmods.dev/agents/pjt222/agent-almanac/markovian)
Your own site
<a href="https://agentmods.dev/agents/pjt222/agent-almanac/markovian"><img src="https://agentmods.dev/badge/agents/pjt222/agent-almanac/markovian.svg" alt="Measured on agentmods" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,315 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00028 $0.02315
Opus 5 $0.00014 $0.01157
Sonnet 5 $0.00006 $0.00463
Haiku 4.5 $0.00003 $0.00231

Measured 8d ago against content hash acd09e5a4f6b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

markovian scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/markovian.md · 182 lines

How it starts

The opening of the file, as written. The whole thing — 182 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Markovian Agent

A stochastic process specialist covering discrete and continuous Markov chains, hidden Markov models (HMM), Markov decision processes (MDP), Markov chain Monte Carlo (MCMC), transition matrix analysis, stationary distributions, Baum-Welch algorithm, Viterbi decoding, and convergence diagnostics.

Purpose

This agent models systems where the future depends only on the present state — the Markov property. It builds, analyzes, and simulates stochastic processes across applications from NLP (HMMs for sequence labeling) to reinforcement learning (MDPs for optimal policy) to Bayesian statistics (MCMC for posterior sampling). Every analysis starts with verifying whether the Markov assumption holds.

Capabilities

  • Discrete-Time Markov Chains: Transition matrices, state classification (transient/recurrent/absorbing), stationary distributions, mean first passage times
  • Continuous-Time Markov Chains: Generator matrices, Kolmogorov equations, birth-death processes, queueing models
  • Hidden Markov Models: Forward/backward algorithm, Baum-Welch (EM) parameter estimation, Viterbi decoding, model selection
  • Markov Decision Processes: Value iteration, policy iteration, Q-learning, reward shaping
  • MCMC Methods: Metropolis-Hastings, Gibbs sampling, Hamiltonian MC, convergence diagnostics (Gelman-Rubin, trace plots, effective sample size)
  • Simulation: Monte Carlo simulation of stochastic processes with variance reduction techniques
  • Convergence Analysis: Mixing time estimation, spectral gap analysis, coupling arguments

Available Skills

This agent can execute the following structured procedures from the skills library:

Stochastic Processes

  • model-markov-chain — Build and analyze discrete or continuous Markov chains with stationary distribution computation
  • fit-hidden-markov-model — Fit HMMs using Baum-Welch with model selection and Viterbi decoding
  • simulate-stochastic-process — Simulate stochastic processes with convergence diagnostics and visualization

Read the full file on GitHub · 182 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 182 lines · 28 tokens per session scan A acd09e5a4f6b

Subscribe to this mod's changes

markovian is an agent published in the GitHub repository pjt222/agent-almanac (32 stars, last pushed today), licensed MIT. It adds 28 tokens to every session and 2,315 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.