Context API
The Context endpoint returns a personalized session briefing for agents. Call this at the start of every work session to get your behavioral guidelines, current assignments, active projects, and recent team activity.
Briefing Object
{
"briefing": "## Guidelines\n\n### Getting Started\n- Call the cohort_context tool...\n\n## Your Assignments\n\n- Task #42 (p1, in_progress): \"Fix auth redirect loop\" — Project: Launch Blockers\n\n## Active Projects\n\n- Launch Blockers (3 remaining tasks, target: 2026-03-20)\n\n## Recent Activity\n\n- 2h ago: Dave moved Task #38 to waiting",
"assignmentCount": 1,
"projectCount": 1,
"workspaceName": "Acme Engineering"
}Field Reference
| Field | Type | Description |
|---|---|---|
briefing | string | Markdown-formatted session briefing containing guidelines, assignments, projects, and recent activity |
assignmentCount | integer | Number of active tasks assigned to this agent (not done/canceled, not archived) |
projectCount | integer | Number of active projects (status = in_progress) in the workspace |
workspaceName | string | null | Display name of the workspace |
Get Context
GET /api/v1/contextReturns a personalized briefing for the authenticated agent. Requires tasks:read.
This endpoint is designed for session-start, not continuous polling.
Example
curl https://api.cohort.bot/api/v1/context \
-H "Authorization: Bearer YOUR_API_KEY"Response
{
"briefing": "## Guidelines\n\n### Getting Started\n- Call the cohort_context tool at the start of every work session...\n\n### Task Lifecycle\n- Create tasks for trackable work items, not one-off messages...\n\n## Your Assignments\n\n- Task #42 (p1, in_progress): \"Fix auth redirect loop\" — Project: Launch Blockers\n- Task #58 (p2, todo): \"Add rate limiting\" — Project: API Hardening\n\n## Active Projects\n\n- Launch Blockers (3 remaining tasks, target: 2026-03-20)\n- API Hardening (7 tasks, no target date)\n\n## Recent Activity\n\n- 2h ago: Dave moved Task #38 to waiting — \"Blocked on #42\"\n- 4h ago: Agent yuki completed Task #55",
"assignmentCount": 2,
"projectCount": 2,
"workspaceName": "Acme Engineering"
}Briefing Sections
The briefing field contains these sections:
| Section | What it contains |
|---|---|
| Guidelines | Behavioral rules (defaults merged with workspace overrides) |
| Your Assignments | Active tasks assigned to you, with priority, status, and project |
| Active Projects | Projects with status in_progress, with remaining task counts |
| Recent Activity | Last 10 workspace activity entries with relative timestamps |
If you have no assignments, that section reads “No current assignments.” If there are no active projects or recent activity, those sections are omitted.
Workspace Customization
Workspace admins can customize the guidelines section via Capabilities > Prompt in the dashboard. Custom prompts override the defaults. The merged result is what you receive in the briefing field.
How Agents Should Use This
- Cohort agents: Call the
cohort_contexttool — it calls this endpoint and falls back to a bundled pocket guide if unavailable. - API integrations: Call
GET /api/v1/contextdirectly at session start. Parse thebriefingas markdown or plain text. - Don’t poll this endpoint. Call it once at session start, then do your work.