Self-hosted, durable runtime for building agentic applications where users and agents work together.
pip install mashpy==0.42.0
Mash is a self-hosted, durable runtime for building agentic applications where users and agents work together. You write your agents and workflows in Python, deploy them behind one API on your own Postgres, and connect them to the places your users already are: a Slack workspace, your product, a terminal.
Your application sends Mash events, one for each thing a user says or does. A session holds the context of one conversation, so every agent in it knows what came before. An app holds memory across its sessions, so a new conversation starts with what earlier ones learned. A policy controls what agents can access, such as a sandbox to run code in and a browser to work on websites.
Mash has no concept of a user. The application decides who takes part in a session, whether one person or a whole team, and everyone in it shares the same context.
Example: a team bot in Slack
A team bot is a good fit. Each channel is an app, each thread is a session, and each message is an event.
Alice asks for churn numbers and the bot hands the question to the right agents. One of them checks with her before it touches the database, and she approves from the thread. Bob picks up where she left off without repeating anything. A week later Carol opens a new thread, and the bot already knows what the channel has been working on.
The product brief has the full pitch.
Events, sessions, apps and policies : one endpoint for every input. A retried or redelivered event runs once, a session's events run in order, and the app follows each event's SSE stream or reads its state.
Agent harness : the agent loop runs inside a durable request with tools, skills, memory and structured output. Requests are recorded as replayable runtime events, so restarts and long-running work resume mid-loop.
Companion routing : every event to a host starts on the built-in companion, whose classifier picks one of the host's agents or workflows. The agent's streams to the user on the event, and every agent in the conversation reads the same board of earlier entries.
Human-in-the-loop : agents pause for approvals, questions and browser sign-ins, and the pause survives a host restart. The routed agent's questions come back on the event.
Sandboxes : each policy gets a container where the code the model writes (Python, JavaScript, shell) runs, in a folder per agent whose files and SQLite databases persist. Pages, files and servers the code makes open at links the host serves. The agents' secrets and the database stay with the host.
Browsers : each policy gets a Chromium whose profile keeps the sites the user signed in to. An agent that lists sites drives it with Playwright MCP's page tools, on those sites only. Sign-ins happen through a live-view link, and Mash never sees the password.
Cortex : opt-in memory per app, built from the app's sessions by the cortex-build workflow and shown to every request in the app.
Workflows : ordered pipelines of typed steps, a CodeStep of Python or an AgentStep of one agent run, durable and resumable from the failed step.
Frontier and open-source models : adapters for Anthropic, OpenAI and Gemini, and any open-source model served over a Chat Completions endpoint. Each agent picks its model in build_llm() .
API, CLI and REPL : HTTP with SSE streaming, a mash CLI, and a REPL that follows each message's agent live. mash.cli.App ships it as your own client.
Traces : every request as OpenTelemetry spans, read by the admin UI and /trace , and exported to any OTLP backend with mashpy[otel] .
Synthetic evals : a generated dataset and rubric for a host, experiments that run it through the live host, and comparisons of quality and cost across runs. Turn them on with HostBuilder.enable_evals() .
See Mash under the hood for a deeper look at each capability.
Each agent is an AgentSpec subclass. It names itself, picks an LLM, and declares a system prompt, tools, skills and agent config.
Author a workflow (optional):
A workflow is an ordered pipeline of typed steps, for work that should run as code. Use a CodeStep for Python and an AgentStep when a step needs an agent. The companion can start it when a message calls for it.
The CodeStep output becomes the AgentStep input. Mash validates both edges, runs each step durably, and uses the last step's output as the workflow result.
The pool is the unit of deploy: agents and workflows registered together.
A pool can also be workflows alone. A workflow of pure CodeStep s references no agents, and the resulting pool serves only workflow runs:
Configure the environment:
The host needs an LLM key, a Postgres URL for its durable runtime, and a secret it derives agent and sandbox tokens from. Put them in a .env file in the directory you run mash host serve from; the CLI loads it on start:
The host runs each agent as its own subprocess. For agents to get the sandbox tools, it also needs a Docker daemon; it pulls Mash's sandbox image, ghcr.io/imsid/mash-sandbox , on first start. Without Docker the host still runs, and its agents get no sandbox tools. Agents whose specs list sites with browser_sites() also get the browser tools, and the host pulls Mash's browser image, ghcr.io/imsid/mash-browser , the first time one opens a page.
Create a policy, connect, and browse available agents. Every message is an event that names the app posting it and the policy it runs under, so the connection saves both:
Compose an assistant host from agents and a workflow. Every event to it runs on the built-in companion, which routes it:
Talk to the host or execute / commands using Mash repl. Each message is an event in the REPL's session:
Post an event from your application. The first event creates the session and binds it to the host and policy; follow the answer on the event's stream:
See the agent's original exposed thought summaries in Admin → Activity → Thoughts . Filter by Agent and scroll the latest 50 traces with nonempty summaries. Underlined phrases bring out the language's personality; selecting one moves Mushy beside the passage. Each trace links to its Admin logs.
Capture is always enabled for runtime agents when their provider supports it (currently Gemini). The trace sidebar in Logs links directly to that trace's thoughts, including older traces. There is no separate interpreter, GIF generation API, or public sharing surface. See Mushy and Pilot .
Pilot is a command-line guide to the Mash codebase, built on the Mash SDK and shipped in this repo at src/pilot/ . Its pilot agent answers questions from the source and searches the docs site and GitHub in the policy's browser, and its builder agent builds Mash apps in the policy's sandbox. It also ships the pilot-changelog workflow. Run it from a checkout, with GEMINI_API_KEY , OPENROUTER_API_KEY , MASH_HOST_SECRET and MASH_API_KEY in .env :
See src/pilot/README.md for the agents, the keys and model overrides, the shipped workflow, and building your own app.
Build with a Coding Agent
This repo includes docs/sdk-reference.md so coding agents like Claude Code, Codex, and Cursor can scaffold a Mash-powered agent from a natural language prompt. Copy it into your project as CLAUDE.md or point your agent at this repo to get started. The Pilot guide (above) also carries the build-mash-agent , build-mash-workflow , and build-mash-host skills for interactive scaffolding from the REPL.
An app can ship its own terminal client with mash.cli.App : set its name, default host, deployment URL, app and policy, then expose app.main as a console entrypoint. It includes the live REPL and one-shot commands. See the CLI README for the app kit.
Product brief : what Mash offers, with a Slack team bot as the example
Mash under the hood — what Mash offers and where it fits
Synthetic evals — datasets, rubrics, experiments, and scoring for the cold-start problem
Deployment guide : agent processes, sandboxes, browsers, Docker, the host on a server
Building agent CLIs — custom CLI development
SDK reference — full SDK reference for coding agents
Package overview — subsystem boundaries and module guides
Contributing — development setup, tests, repo structure
Contributions are welcome. See CONTRIBUTING.md for setup, tests, and the pull request flow, and SECURITY.md for reporting vulnerabilities. Release notes live in CHANGELOG.md .
Mash is licensed under the Apache License 2.0 .
Release files for mashpy 0.42.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation .
Source distribution (sdist)
Built distribution (wheel)
Total release size: 2.3 MB
Release files / mashpy-0.42.0.tar.gz
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 Nov 28, 2026.
Release files / mashpy-0.42.0-py3-none-any.whl
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 Nov 28, 2026.
Security for mashpy 0.42.0
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.
Both files in this release have been uploaded with provenance metadata.
Attestation for mashpy-0.42.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 Nov 28, 2026.
Attestation for mashpy-0.42.0-py3-none-any.whl
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 Nov 28, 2026.
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.
Release history Release notifications | RSS feed
Nov 28, 2026 2 release files Full provenance
Nov 25, 2026 2 release files Full provenance
Nov 22, 2026 2 release files Full provenance
Nov 21, 2026 2 release files Full provenance
Nov 15, 2026 2 release files Full provenance
Nov 15, 2026 2 release files Full provenance
Nov 15, 2026 2 release files Full provenance
Nov 14, 2026 2 release files Full provenance
Nov 10, 2026 2 release files Full provenance
Nov 9, 2026 2 release files Full provenance
Nov 8, 2026 2 release files Full provenance
Nov 8, 2026 2 release files Full provenance
Nov 2, 2026 2 release files Full provenance
Oct 31, 2026 2 release files Full provenance
Oct 29, 2026 2 release files Full provenance
Oct 27, 2026 2 release files Full provenance
Oct 26, 2026 2 release files Full provenance
Oct 25, 2026 2 release files Full provenance
Oct 25, 2026 2 release files Full provenance
Oct 25, 2026 2 release files Full provenance
Oct 24, 2026 2 release files Full provenance
Oct 19, 2026 2 release files Full provenance
Oct 18, 2026 2 release files Full provenance
Oct 11, 2026 2 release files Full provenance
Oct 5, 2026 2 release files Full provenance
Oct 5, 2026 2 release files Full provenance
Sep 20, 2026 2 release files Full provenance
Sep 6, 2026 2 release files Full provenance
Aug 17, 2026 2 release files Full provenance
Jul 30, 2026 2 release files Full provenance
Jul 27, 2026 2 release files Full provenance
Jul 26, 2026 2 release files Full provenance
Jul 14, 2026 2 release files Full provenance
Jul 12, 2026 2 release files Full provenance
Jul 11, 2026 2 release files Full provenance
Jul 6, 2026 2 release files Full provenance
Jul 5, 2026 2 release files Full provenance
Jul 1, 2026 2 release files Full provenance
Jun 30, 2026 2 release files Full provenance
Jun 29, 2026 2 release files Full provenance
Jun 26, 2026 2 release files Full provenance
Jun 24, 2026 2 release files Full provenance
Jun 24, 2026 2 release files Full provenance
Jun 24, 2026 2 release files Full provenance
Jun 23, 2026 2 release files Full provenance
Jun 23, 2026 2 release files Full provenance
Jun 23, 2026 2 release files Full provenance
Jun 23, 2026 2 release files Full provenance
Jun 22, 2026 2 release files Full provenance
Jun 21, 2026 2 release files Full provenance
Jun 21, 2026 2 release files Change of provenance
Jun 21, 2026 2 release files Full provenance
Jun 21, 2026 2 release files Full provenance
Jun 20, 2026 2 release files Full provenance
Jun 20, 2026 2 release files Full provenance
Jun 20, 2026 2 release files Full provenance
Jun 20, 2026 2 release files Full provenance
Jun 20, 2026 2 release files Full provenance
Jun 18, 2026 2 release files Full provenance
Jun 17, 2026 2 release files Full provenance
Jun 17, 2026 2 release files Full provenance
Jun 17, 2026 2 release files Full provenance
Jun 16, 2026 2 release files Full provenance
Jun 15, 2026 2 release files Full provenance
Jun 12, 2026 2 release files Full provenance
Jun 12, 2026 2 release files Full provenance
Jun 10, 2026 2 release files Full provenance
Jun 10, 2026 2 release files Full provenance
Jun 9, 2026 2 release files Full provenance
Jun 9, 2026 2 release files Full provenance
Jun 9, 2026 2 release files Full provenance
Jun 8, 2026 2 release files Full provenance
Jun 7, 2026 2 release files Full provenance
Jun 7, 2026 2 release files Full provenance
Jun 7, 2026 2 release files Full provenance
Jun 3, 2026 2 release files Full provenance
May 31, 2026 2 release files Full provenance
May 27, 2026 2 release files Full provenance
May 27, 2026 2 release files Full provenance
May 26, 2026 2 release files Full provenance
May 21, 2026 2 release files Full provenance
May 20, 2026 2 release files Full provenance
May 20, 2026 2 release files Full provenance
May 20, 2026 2 release files Full provenance
May 20, 2026 2 release files Full provenance
May 19, 2026 2 release files Full provenance
May 11, 2026 2 release files Full provenance
May 11, 2026 2 release files Full provenance
May 10, 2026 2 release files Full provenance
May 4, 2026 2 release files Full provenance
Apr 20, 2026 2 release files Full provenance
Apr 5, 2026 2 release files Full provenance
Apr 5, 2026 2 release files Full provenance
Apr 5, 2026 2 release files Full provenance
Apr 1, 2026 2 release files Full provenance
Mar 28, 2026 2 release files Full provenance
Mar 22, 2026 2 release files Full provenance
Mar 15, 2026 2 release files Full provenance
Mar 11, 2026 2 release files Full provenance
Mar 8, 2026 2 release files Full provenance
Mar 1, 2026 2 release files Full provenance
Feb 26, 2026 2 release files Full provenance
The full story
This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.
