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

# Coaching

> Open a flagged agent. Read their worst-CSAT samples. Leave a coaching note. The full loop, in one drawer.

Forepost's Team view auto-flags an agent when their CSAT trajectory is sustained-falling. **Coaching** is the panel that opens from that flag — so the leader can go from *"Sarah is flagged"* to *"here's what I want her to know"* without leaving the app.

## Opening the drawer

From the **Team** view, click **Coach** on any agent (flagged or not). A side drawer slides in with three sections:

<CardGroup cols={2}>
  <Card title="Recent samples" icon="file-lines">
    Up to 20 worst-CSAT conversation summaries with deep-links to the helpdesk.
  </Card>

  <Card title="Note composer" icon="pen">
    Free text. Optional follow-up date. Optional "share with agent" toggle.
  </Card>

  <Card title="Notes history" icon="clock-rotate-left">
    Previous notes for this agent, recent first.
  </Card>
</CardGroup>

Notes are leader-private by default. Toggling **Share with agent** marks the note for agent visibility on a future agent-facing surface.

## How samples get captured

Two sources today:

<Steps>
  <Step title="Auto-capture on auto-flag">
    When an agent gets auto-flagged for sustained-falling CSAT, Forepost stores the worst conversation summaries from the prior review window as samples. Only the model-written summary (one to three sentences) is stored — never the conversation body.
  </Step>

  <Step title="Manual pin">
    `POST /coaching/samples` (coming soon) for pinning a specific conversation by id when you spot something worth coaching on.
  </Step>
</Steps>

Samples carry the source helpdesk, the conversation's external id, the precomputed deep-link URL (using your [deep-link templates](/help/deep-links)), the CSAT score, and the closed timestamp.

## Notes

A note is one record:

```json theme={null}
{
  "agent": "Sarah",
  "body": "Three billing-tier conversations this week ended with reset apologies. Let's role-play one in our 1:1.",
  "sharedWithAgent": false,
  "followUpAt": 1736870400000
}
```

The follow-up date can later be wired into a Google Calendar event from your linked calendar; for now it's a reminder timestamp surfaced on the drawer.

## API

```bash theme={null}
GET    /coaching?agent=Sarah     # samples + notes
POST   /coaching/notes           # create — body { agent, body, sampleId?, followUpAt?, sharedWithAgent? }
PATCH  /coaching/notes/:id       # edit body / followUpAt / sharing
DELETE /coaching/notes/:id       # archive (soft delete)
```

## Member scope

Workspace members can read coaching only for their own linked agent record. Owners and admins see and write everything.

## What coaching isn't

* **Not a QA queue.** No round-robin assignment, no calibration workflows. Coaching is point-of-need note-taking.
* **Not training content.** No saved playbooks or canned feedback. The whole surface is one note at a time.
* **Not visible to the agent by default.** Even with the future agent-facing view, only notes you explicitly mark **Share** are surfaced.

## Privacy

Sample summaries are model-written from the helpdesk content at capture time — the conversation body never lands in Forepost's database. The summary, the external id, and the URL are stored in your workspace's D1 scope.
