Fergana-Labs/stash

Open-source infrastructure for agents that learn from experience. Capture production traces and turn lessons into reusable knowledge and skills.

What it solves

Stash solves the problem of agents failing to learn from their past mistakes or human corrections. It captures the history of agent sessions—including successful approaches, failures, and human feedback—and turns that raw data into durable, reusable knowledge that helps agents perform better in future tasks.

How it works

Stash functions as a memory and optimization layer for your existing agents. First, it captures session data (prompts, tool calls, and responses) via SDKs or APIs. A curator then extracts lessons from these traces, which are stored as accessible knowledge. You can package these lessons into "Skills"—folders containing instructions—that agents can install and reference. Additionally, Stash uses feedback to train reward models, which can grade agent work or automatically optimize prompts to improve performance over time.

Who it’s for

This project is for developers building AI agents who want to create a feedback loop where agents continuously improve based on production traces, human reviews, and past performance.

Highlights

  • Captures agent experience through hooks, SDKs, and a REST API.
  • Converts feedback and corrections into reusable "Skills" that agents can install.
  • Trains reward models from production traces to grade performance and optimize prompts.
  • Supports continuous prompt improvement by comparing candidate instructions against real tasks.
  • Integrates with existing agent workflows via CLI, MCP, and Python SDK.

Related

  • Project
  • Project
  • Project
  • Project
  • Project