> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sense-lab.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# How Sensei learns

> Sensei learns on every request from how earlier work turned out, and on Team it trains a version of itself for your project.

Sensei is a self-improving model. It learns from one source: how your agents' work turned out. This page covers the two ways it learns, defines the terms the dashboard uses and follows one task through the loop.

## Two ways of learning

Sensei learns on the job. When a turn gets an outcome, Sensei keeps what the turn showed as Learnings. On later requests in the same project it recalls the Learnings that fit the ask and answers with them in hand. This starts with the first session and works on every plan.

Sensei also trains itself. On Team and Enterprise, once a project has enough verified successes, Sensei trains a version of itself on them, checks the version against what the project's keys use now, and then serves it to those keys or waits for your review. See [Your model](https://docs.sense-lab.ai/sensei/your-model.md).

## The terms

A **session** is the calls that belong to one task. A **turn** is one ask from you and every model call Sensei made before it answered.

An **outcome** says how a turn went. It is one of `success`, `minor_failure`, `failure` or `critical_failure`. An outcome is **verified** when a person, an editor hook, CI or a harness reported it. When nobody reports one, Sensei reads the outcome itself from the checks that ran in the turn. The dashboard labels that case **Sensei's read**.

**Learnings** are what Sensei keeps from finished sessions: a summary of each turn, what you told it to do differently and, for work on code, a map of the codebase. Later sessions on the same project start with the Learnings that fit the ask.

A **project** groups API keys. Sessions on those keys belong to the project, and so do its Learnings and its model.

A **version** is a model trained on the turns of one project that ended in a verified success. Versions are named `v1`, `v2` and so on. Before any version exists, a project's keys are served the **included model**.

## One task through the loop

1. An agent starts a task. Its calls to Sensei are grouped into a session.
2. The turn ends and something reports how it went: your CI, your own code, a hook in your editor, or a person on the dashboard. When nothing reports, Sensei reads the result from the checks that ran in the turn.
3. The outcome seals the turn. Sensei writes a summary of what was asked, what the agent read, changed and ran, and how it ended.
4. The next session on that project asks for something related. Sensei recalls the earlier summary and answers with it in hand.
5. On Team, the turn is also kept for 30 days as training material for the project's next version. See [Your model](https://docs.sense-lab.ai/sensei/your-model.md).

## The learning loop on Overview

The **Learning loop** card on **Overview** counts the last 30 days at five points. A weak point shows a warning under its ring.

![The Learning loop card on Overview: five rings for Sealed, Verified, Agreed, Recorded and Reused, each with its counts](https://mintcdn.com/senselab/7GJRxwA5n_G2FDq5/images/sensei/overview-learning-loop.png?fit=max\&auto=format\&n=7GJRxwA5n_G2FDq5\&q=85\&s=d2b8dbf82c2c25edc44ef96db89e3a6a)

| Link | What it counts |
| - | - |
| Sealed | Sessions in which a turn got an outcome. A session with no outcome taught nothing. |
| Verified | Turns whose outcome came from a person, a hook, CI or a harness. The rest carry Sensei's read, or went idle before an answer and are left out. |
| Agreed | Turns that have both a verified outcome and Sensei's read, and where the two say the same. This is how far Sensei's read can be trusted when it stands alone. |
| Recorded | Outcomes and session notes that reached your Learnings. Writes are queued and retried. One that failed after ten attempts shows a **Retry** button. |
| Reused | Sessions that started with an earlier session on at least half the same ask. |

Under the rings, the card compares turns that built on an earlier session with turns that did not, and gives the success rate of each group. It is a count of what happened. While the groups are small the card shows an **Early** badge.

## What raises the quality of what Sensei learns

A posted result stands above Sensei's read. Two things produce verified outcomes with little effort:

* The [editor hook](https://docs.sense-lab.ai/sensei/outcomes.md#from-your-editor) posts the verdict of the last check when a session ends.
* [One request from CI](https://docs.sense-lab.ai/sensei/outcomes.md#from-ci-or-a-script) marks a session after your pipeline finishes.

For runs, marking a run **Right** or **Wrong** on its page does the same job. See [Review a run](https://docs.sense-lab.ai/sensei/runs/review.md#say-how-it-turned-out).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.