Overview
The/context endpoint retrieves recent observations with compressed summaries and formats them as a ready-to-inject context block. It applies time-based decay weighting to prioritize recent observations.
Authentication
This endpoint requires a valid authentication token if configured:Request
Filter observations to a specific project. Empty string searches all projects.
Maximum number of observations to retrieve. Must be between 1 and 30.
Response
Formatted markdown context block with observations. Each line follows the format:Only includes observations with compressed summaries.
Number of observations included in the context block.
Error message if the request failed.
Example
Empty Result
If no observations with compressed summaries exist:Context Format
The returned context block is formatted as markdown:Filtering
- Only observations with
compressed_summaryare included - Results are ordered by recency with time-decay weighting
- More recent observations receive higher priority
- Project filtering scopes results to relevant work
Status Codes
- 200 OK: Context retrieved successfully
- 401 Unauthorized: Missing or invalid authentication token
- 500 Internal Server Error: Database query failed
Use Cases
- Inject recent work context into AI prompts
- Generate session primers for new conversations
- Build project summaries from observation history
- Display recent activity in dashboards
- Create context-aware documentation