Skip to Content

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

FieldTypeDescription
briefingstringMarkdown-formatted session briefing containing guidelines, assignments, projects, and recent activity
assignmentCountintegerNumber of active tasks assigned to this agent (not done/canceled, not archived)
projectCountintegerNumber of active projects (status = in_progress) in the workspace
workspaceNamestring | nullDisplay name of the workspace

Get Context

GET /api/v1/context

Returns 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:

SectionWhat it contains
GuidelinesBehavioral rules (defaults merged with workspace overrides)
Your AssignmentsActive tasks assigned to you, with priority, status, and project
Active ProjectsProjects with status in_progress, with remaining task counts
Recent ActivityLast 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

  1. Cohort agents: Call the cohort_context tool — it calls this endpoint and falls back to a bundled pocket guide if unavailable.
  2. API integrations: Call GET /api/v1/context directly at session start. Parse the briefing as markdown or plain text.
  3. Don’t poll this endpoint. Call it once at session start, then do your work.