1. Why It Matters
A consistent response schema allows:- Developers to reliably parse success and failure outcomes
- LLMs to consume context-aware memory or planning responses
- API clients to trace, audit, and retry requests with a known
trace_id - Calendar integrations to generate
.icsfiles with structuredsummaryanddescriptioncontent
2. Core Response Envelope
All Chronologue responses use the following format:| Field | Type | Description |
|---|---|---|
status | string | "success" or "error" |
data | object/array | Main payload if the request succeeded |
error | string | Error name/code (if status = error) |
detail | string | Human-readable explanation of error |
trace_id | string | Unique request ID for auditing/debugging |
meta | object | Optional: timing, token usage, version, model info |
3. Success Response Format
Returned when a request completes successfully. Example:4. Error Response Format
Returned when validation, authentication, or internal logic fails. Example:5. LLM-Aware Responses
To support LLM function calls and prompt injection, Chronologue formatssummary and description fields using OpenAI-compatible language:
| Field | Description |
|---|---|
summary | Short, token-efficient title derived from content or task label |
description | Rich context block including content, chat_url, agent/source note |
- Rule-based logic
- OpenAI function call (e.g.,
summarize_trace,describe_event) - User-editable overrides via interface or patch request
.ics generation:
SUMMARY:Deep Work BlockDESCRIPTION:Wrote CUDA kernels from 9–11am.
Chat log: https://chat.openai.com/share/example-id
6. Example Endpoint Responses
Memory Pull
GET /memory/pullFunction Call (via LLM or client)
POST /functions/call7. Traceability and Logging
All responses include atrace_id field which can be logged by:
- Frontend clients (for debugging or support)
- Backend logs (FastAPI logger)
- Audit trails in MemPort
trace_id to correlate between agent outputs, feedback loops, and execution latency.
8. Future Enhancements
warnings[]: for soft schema mismatches, unsafe tempo tokensstream: true: for SSE or WebSocket responses from agentsactions[]: suggested next functions or trace-level promptscached: true|false: mark responses from Redis or MemPort cache
9. Best Practices
- Always parse
statusbefore accessingdata - Log
trace_idon both success and error - Use
summaryfor.icscalendar event titles - Use
descriptionfor rich trace exports or downstream LLM use - Keep all time fields in UTC ISO format