Overview
The/observe endpoint records tool execution observations from AI agent interactions. It processes tool inputs and outputs, applies privacy filtering, and stores them for future retrieval and compression.
Authentication
This endpoint requires a valid authentication token if configured:Request
Unique identifier for the AI conversation session.
Name of the tool that was executed (e.g.,
"bash", "read", "edit").JSON object containing the tool’s input parameters.
String output returned by the tool execution. Large outputs (>100KB) are automatically truncated.
Sequential prompt number within the session (0-indexed).
Project identifier for organizing observations.
Working directory path where the tool was executed.
Response
Status of the observation. Values:
"ok": Successfully recorded"excluded": Filtered by privacy rules"skipped": Content marked as fully private
Database ID of the created observation (only present when status is
"ok" or "excluded").Reason for exclusion or skipping (e.g.,
"tool_excluded", "path_denylist", "private").Error message if the request failed.
Example
Privacy Filtering
The endpoint applies multiple privacy layers:- Tool Exclusion: Tools in
excludeToolsconfig are rejected - Path Exclusion: File paths matching
excludePathspatterns are filtered - Secret Redaction: Credentials, tokens, and API keys are automatically redacted
- Custom Patterns: User-defined regex patterns redact sensitive content
- Size Limits: Inputs/outputs exceeding configured limits are truncated
status: "excluded" with a reason code.
Status Codes
- 200 OK: Request processed (check
statusfield for outcome) - 401 Unauthorized: Missing or invalid authentication token
- 500 Internal Server Error: Failed to create session or save observation
Use Cases
- Record AI agent tool executions for memory building
- Build searchable knowledge base from tool interactions
- Track file operations and command executions
- Enable context retrieval for future prompts