Skip to main content

Stash

Help your agents learn from experience.

Agents generate valuable experience every time they work: successful approaches,
failed attempts, and human corrections. Stash captures that history and makes
its lessons available to future runs.

CI License: MIT Website Discord

This repository provides the open-source foundation: trace collection, persistent knowledge, and reusable skills, accessible through a Python SDK, REST API, MCP, and CLI. It works alongside your existing agents and models.

flowchart LR
    A[Agent runs and human corrections] --> B[Capture sessions via hooks or API]
    B --> C[Curate durable knowledge]
    C --> D[Retrieve knowledge or package skills]
    D --> E[Use in the next agent run]
    E --> A

Stash's broader work focuses on extracting reliable feedback signals from messy production traces and using them to improve prompts, skills, and ultimately model weights. The reward-model product docs cover trace review, reward-model training, and skill optimization with GEPA. The implementation is included in backend/services/rm/ and rm_worker/. Our research focuses on improving the reliability of feedback extracted from production traces.

The reward-model experiment is enabled for accounts created after the rollout. Existing accounts retain their current experience. Access is enforced in both the UI and API; see the rollout guide.

Reward models in action

Train from feedback in your traces. Stash derives preference pairs from reviewer comments and user reactions, including approval, disappointment, and corrections. A classifier attributes each judgment to a response and keeps the source quote; unclear reactions are excluded from training. You can add comments by highlighting a response. There is no separate Auto mode or rating control in the UI; existing explicit ratings can be supplied through the API. Training needs at least two grounded comparisons. User reactions are used when available; an AI assessor also evaluates response quality without manual annotations or reactions.

The product demo below follows a refund-support agent from reviewer feedback to a reusable skill. These screenshots show an earlier interface with demo data; the current controls are described below.

1. Review a trace. Highlight a response and explain what should change. Feedback already present in the conversation is extracted automatically during training.

Refund-support trace with a highlighted refusal and reviewer feedback explaining how to handle a damaged order

2. Train a reward model from traces. Select traces and choose Create new reward model. The worker extracts supported preferences, records their source, and trains the model. AI-generated comparisons receive a separate review for grounding and preference quality. View learning distinguishes user feedback from AI judgments, shows the supporting response or quote, and records whether each finding was included in training. AI judgments are model preferences, not measured customer satisfaction.

Six annotated traces selected for reward-model training, with three positive and three negative labels

3. Turn the reward signal into a skill. Choose View skill on a trained model. It opens an existing run or starts one using GEPA, the selected traces, and their feedback. Download the resulting SKILL.md for your agent.

Generated refund-requests skill showing candidate scores, reusable instructions, and a Download SKILL.md button

Try Stash · Read the docs

For CLI setup, local development, and self-hosting, see Running this repository.

How it works

  1. Capture experience. Hooks for coding agents record prompts, tool calls, and responses when session recording is enabled. Use the SDK or API to send events from your own agents.
  2. Extract durable lessons. A scheduled curator reads new sessions and source material, then updates linked pages in your Memory wiki. The knowledge stays available after the original session ends.
  3. Make lessons reusable. Agents search and read that knowledge through the CLI, MCP, API, or virtual filesystem. You and your agents can package related instructions and files into a Skill: a folder containing a SKILL.md.
  4. Carry them into future runs. Install skills into your agent with stash skills install. Installed skills auto-update at session start, so changes to shared instructions can reach the next run without changing the underlying model's weights.

Example: a correction becomes a reusable instruction

Illustrative workflow:

Stage What happens
Trace An agent proposes a database migration. The reviewer points out that it would discard existing customer data.
Durable lesson Record the project rule: schema changes must migrate existing data forward.
Reusable skill Package a migration checklist that requires a data migration and verification that existing records survive.
Next run The agent loads the checklist while planning another schema change. Reviewers check whether it applied the lesson.

The output is inspectable knowledge and instructions that another agent can read, use, and revise. Whether they improve results should be checked on subsequent tasks.

In an internal experiment, we measured a 49% speedup for long-running Claude Code instances using Stash. See the experiment for its setup and results.

Metadata

Release files for stashai 0.1.372

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stashai 0.1.372
File Size Uploaded
stashai-0.1.372.tar.gz 217.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for stashai 0.1.372
File Interpreter ABI Platform
stashai-0.1.372-py3-none-any.whl Python 3 none any Details

Total release size: 486.5 kB

Release files / stashai-0.1.372.tar.gz

Download URL stashai-0.1.372.tar.gz
Size 217.5 kB
Tags Source
SHA-256 checksum
How to use checksums
52d6a56212c86cba44c48d12d5e17ce2d1aeb839bb58eb3c2aed7f2b2fed48b2
BLAKE2b-256 checksum
How to use checksums
efe62bdc0b0c02e1cbeaae976cd70c3597a273d0b913d8bc97ebf8a58b23a714
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

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 Oct 5, 2026.

Transparency log

Release files / stashai-0.1.372-py3-none-any.whl

Download URL stashai-0.1.372-py3-none-any.whl
Size 269.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d6792380d86b3cf3b983f600d9c22739ee9e6c0213418b5452d89b9f3111024
BLAKE2b-256 checksum
How to use checksums
95f2c05aa7308546ea0268acaf4ed36ad9dd84010b4b46b52b21b49d6f63353c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

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 Oct 5, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.372 This release

2 release files

0.1.99

2 release files

0.1.98

2 release files

0.1.97

2 release files

0.1.96

2 release files

0.1.95

2 release files

0.1.94

2 release files

0.1.93

2 release files

0.1.91

2 release files

0.1.90

2 release files

0.1.89

2 release files

0.1.88

2 release files

0.1.87

2 release files

0.1.86

2 release files

0.1.85

2 release files

0.1.84

2 release files

0.1.83

2 release files

0.1.82

2 release files

0.1.81

2 release files

0.1.80

2 release files

0.1.79

2 release files

0.1.78

2 release files

0.1.77

2 release files

0.1.76

2 release files

0.1.75

2 release files

0.1.74

2 release files

0.1.73

2 release files

0.1.72

2 release files

0.1.71

2 release files

0.1.70

2 release files

0.1.69

2 release files

0.1.68

2 release files

0.1.67

2 release files

0.1.66

2 release files

0.1.65

2 release files

0.1.64

2 release files

0.1.63

2 release files

0.1.62

2 release files

0.1.61

2 release files

0.1.60

2 release files

0.1.59

2 release files

0.1.58

2 release files

0.1.57

2 release files

0.1.56

2 release files

0.1.55

2 release files

0.1.54

2 release files

0.1.53

2 release files

0.1.52

2 release files

0.1.51

2 release files

0.1.50

2 release files

0.1.49

2 release files

0.1.48

2 release files

0.1.47

2 release files

0.1.46

2 release files

0.1.45

2 release files

0.1.44

2 release files

0.1.43

2 release files

0.1.42

2 release files

0.1.41

2 release files

0.1.40

2 release files

0.1.39

2 release files

0.1.38

2 release files

0.1.37

2 release files

0.1.36

2 release files

0.1.35

2 release files

0.1.34

2 release files

0.1.33

2 release files

0.1.32

2 release files

0.1.30

2 release files

0.1.29

2 release files

0.1.28

2 release files

0.1.27

2 release files

0.1.20

2 release files

0.1.19

2 release files

0.1.18

2 release files

0.1.17

2 release files

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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