- OpenAI’s
functionsortool_choiceAPI - Internal agent runtime (
/functions/call) - Manual interface triggers (e.g., UI buttons or editable tables)
2. Use Cases
- Translate user prompts into
agent_planactions - Reflect on memory with structured
create_reflectioncalls - Log new observations or task completions
- Schedule calendar events based on structured parameters
- Edit traces or plans via interactive table or UI interface
3. Function Calling Schema
Each function includes:
Example:
4. Defined Functions in Chronologue
5. API Integration with FastAPI
Function calls are processed via: POST/functions/call
Request body:
- A new memory trace
- A
calendar_eventblock - A confirmation or summary message
6. Function Calling with LLMs
Chronologue registers these functions with tool-enabled LLM runtimes (e.g. OpenAI, Claude). Prompt:“Schedule a writing session for tomorrow afternoon.”Resulting call:
7. Design Principles
- Schema-driven: Validated with JSON Schema and Pydantic
- Composable: Output can be stored, revised, or chained
- Reversible: Every function call result is a trace
- Minimal: Only expose essential agent operations
8. Error Handling and Feedback
When a function call fails:- Returns a
400or422response with detail trace_idis included for log correlation- Suggestions (
hint) may be returned for retry
9. Manual Function Calls from UI (Editable Calendar/Table)
Chronologue supports invoking functions directly from:- Calendar editors (e.g., dragging a block)
- Markdown tables in chat interface (editable fields)
Example Table (Editable in UI):
On interaction, each
Edit button triggers a corresponding function call:
propose_revisionreschedule_taskupdate_trace_field
10. Related Modules
- Agent DSL and Execution Model
- Memory Trace Schema
- API Endpoints Overview
- OpenAI Function Calling Guide
Chronologue’s function calling interface enables structured, transparent, and user-aligned interaction with agents. Whether invoked by an LLM, clicked in a UI, or scheduled via planner, each function brings natural language closer to structured, traceable execution.