SDK for building hosted multi-agent Mash applications.
Project description
mashpy
Mash is an SDK and host runtime for building self-hosted multi-agent applications.
It gives app developers a Python AgentSpec contract, a host API for composing
agents and workflows, a FastAPI server for deployment, and a CLI/REPL for talking
to a running host.
What Is Mash?
Mash is organized around three surfaces:
- SDK and runtime: define agents, tools, skills, workflows, memory, and request execution.
- API server: serve a Mash host over HTTP, including request streaming, workflow routes, and telemetry.
- CLI: connect to a running host, open an interactive REPL, inspect sessions, and run workflows.
pilot/ is the in-repo example host app. It uses the same public Mash contracts
that external host apps use, and adds Pilot-specific REPL commands such as
/changelog [N].
What Is In This Repo?
src/mash/ Mash package: SDK, runtime, API, CLI, workflows
pilot/ Example Mash host app built on the SDK
docs/rfcs/ Protocol and design RFCs
tests/ Mash and Pilot test suites
Dockerfile Base image for Mash host deployments
Quick Start
Create and activate the repo environment:
uv venv
uv sync
source .venv/bin/activate
Run the main test suites:
uv run --extra dev pytest -q tests/mash
uv run --extra dev pytest -q tests/pilot
Run Pilot Locally
Start the Pilot host:
mash host serve --host-app pilot.spec:build_host --host 127.0.0.1 --port 8001
In another terminal, connect the Mash CLI:
mash connect --api-base-url http://127.0.0.1:8001 --api-key secret --agent pilot
mash status
mash agents
Open the Pilot REPL, which includes Pilot-only commands such as /changelog [N]:
pilot repl
The API server also serves the telemetry UI at:
Build Your Own Host
A Mash app defines one or more AgentSpecs and returns a host from
build_host():
from mash.core.config import AgentConfig
from mash.core.llm import AnthropicProvider
from mash.runtime import AgentSpec, HostBuilder
from mash.skills import SkillRegistry
from mash.tools import ToolRegistry
class PrimaryAgent(AgentSpec):
def get_agent_id(self) -> str:
return "primary"
def build_tools(self) -> ToolRegistry:
return ToolRegistry()
def build_skills(self) -> SkillRegistry:
return SkillRegistry()
def build_llm(self):
return AnthropicProvider(app_id="primary")
def build_agent_config(self) -> AgentConfig:
return AgentConfig(
app_id="primary",
system_prompt="You are helpful.",
)
def build_host():
return HostBuilder().primary(PrimaryAgent()).build()
Serve it with:
mash host serve --host-app my_app:build_host --host 0.0.0.0 --port 8000
For containerized deployments, use the root Dockerfile as the base
host image and configure startup with MASH_HOST_APP, MASH_DATA_DIR, and
MASH_DATABASE_URL.
Documentation Map
- Mash package: package overview and boundaries.
- Runtime: host composition, request execution, persistence, structured output, and runtime internals.
- Workflows: code-defined workflows, dynamic publishing, task state, and DBOS orchestration.
- Skills: filesystem and inline skills plus dynamic skill registration.
- API: HTTP surface, request/response shapes, telemetry, and dynamic publishing endpoints.
- CLI:
mashcommands and REPL slash commands. - LLM providers: provider adapters, normalized LLM contracts, and provider-native structured output.
- Masher: built-in workflow-only trace digest and online eval worker.
- Pilot: example host composition and Pilot-specific REPL behavior.
Other useful module guides:
Development
Use the focused module READMEs above as the source of truth when changing a subsystem. For cross-surface behavior, update tests across the relevant layers:
- runtime changes:
tests/mash/runtime - API changes:
tests/mash/api - CLI/REPL changes:
tests/mash/cli - workflow changes:
tests/mash/workflows - Pilot changes:
tests/pilot
Before handing off broad changes, run:
uv run --extra dev pytest -q tests/mash
uv run --extra dev pytest -q tests/pilot
RFCs
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mashpy-0.3.7.tar.gz.
File metadata
- Download URL: mashpy-0.3.7.tar.gz
- Upload date:
- Size: 205.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02b5f4bb488c2564da55af2658413cb96cf004400f3a6075cad57a385527a93d
|
|
| MD5 |
bd0000bb3d805da5bae62596367b0323
|
|
| BLAKE2b-256 |
03238d74e56f44ea8ae7fe5c613def10951bb40c3a007455eaf565f01421d4dd
|
Provenance
The following attestation bundles were made for mashpy-0.3.7.tar.gz:
Publisher:
publish.yml on imsid/mashpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mashpy-0.3.7.tar.gz -
Subject digest:
02b5f4bb488c2564da55af2658413cb96cf004400f3a6075cad57a385527a93d - Sigstore transparency entry: 1635424864
- Sigstore integration time:
-
Permalink:
imsid/mashpy@1525974837af1bb80c23d61d678335c9e935ae61 -
Branch / Tag:
refs/tags/v0.3.7 - Owner: https://github.com/imsid
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1525974837af1bb80c23d61d678335c9e935ae61 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mashpy-0.3.7-py3-none-any.whl.
File metadata
- Download URL: mashpy-0.3.7-py3-none-any.whl
- Upload date:
- Size: 250.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed0649834c753eeb98e2400619c7c620dda0b934a18832b5e9a5f7bb50527d9a
|
|
| MD5 |
669fd1758b750cf7d3316a4b0960fd16
|
|
| BLAKE2b-256 |
30ee215e56b0bc893d9db96fda51102bebe43acabde4129201b9afe84d21244f
|
Provenance
The following attestation bundles were made for mashpy-0.3.7-py3-none-any.whl:
Publisher:
publish.yml on imsid/mashpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mashpy-0.3.7-py3-none-any.whl -
Subject digest:
ed0649834c753eeb98e2400619c7c620dda0b934a18832b5e9a5f7bb50527d9a - Sigstore transparency entry: 1635424870
- Sigstore integration time:
-
Permalink:
imsid/mashpy@1525974837af1bb80c23d61d678335c9e935ae61 -
Branch / Tag:
refs/tags/v0.3.7 - Owner: https://github.com/imsid
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1525974837af1bb80c23d61d678335c9e935ae61 -
Trigger Event:
release
-
Statement type: