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

# Learn

> Extract learnings after each turn and inject them into the next.

`learn` extracts durable learnings after each turn and folds them back into the next system prompt.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    T[💬 turn] --> X[🧠 extract learnings]
    X --> I["📌 inject Learned Insights"]
    I --> N[💬 next turn]

    classDef turn fill:#8B0000,stroke:#7C90A0,color:#fff
    classDef step fill:#189AB4,stroke:#7C90A0,color:#fff

    class T,N turn
    class X,I step
```

## Quick Start

**1. Enable agentic learning**

```typescript theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
import { Agent } from 'praisonai';

const agent = new Agent({ instructions: 'Assist the user', learn: 'agentic' });
await agent.chat('Remember I prefer metric units');
await agent.chat('How tall is Everest?'); // answer respects the learned preference
```

`learn: true` is the same as `learn: 'agentic'`.

**2. Propose instead of applying**

```typescript theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
const agent = new Agent({ instructions: 'Assist', learn: 'propose' });
```

***

## Modes

| Mode | Behaviour |
| - | - |
| `'agentic'` | Extracts and applies learnings automatically. |
| `'propose'` | Extracts learnings as proposals rather than applying them. |
| `'disabled'` | Off (same as omitting `learn`). |

## Injection and nudges

After a turn, the manager extracts learnings and injects a `Learned Insights` block into the next system prompt. Two fields on `LearnConfig` add periodic reminders:

| Field | Default | Effect |
| - | - | - |
| `nudgeInterval` | `0` | Turns between `[System nudge]` reminders (0 disables). |
| `nudgeMinToolIters` | `3` | Minimum tool iterations before a nudge fires. |

```typescript theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
import { Agent } from 'praisonai';

const agent = new Agent({
  instructions: 'Assist',
  learn: { mode: 'agentic', nudgeInterval: 5, nudgeMinToolIters: 3 },
});
```

> [!NOTE]
>
> An unsupported `learn` value disables learning with a warning rather than throwing — e.g. `learn: 'sometimes'` logs `Unsupported learn= value "sometimes"; ... Learning disabled.`

## Reading the manager

```typescript theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
import { Agent } from 'praisonai';

const agent = new Agent({ instructions: 'x', learn: 'agentic' });
console.log(agent.getLearnManager()); // the lazily-built manager, or undefined
```

## Related

> [card] [Self Improve](https://praison.ai/docs/features/self-improve.md)
>
> Skill review turns

> [card] [Agent](https://praison.ai/docs/js/agent.md)
>
> Constructor options


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