Apple
0cfd3619ea
feat: auto-summarize trigger for agent memory
- Memory Service: POST /agents/{agent_id}/summarize endpoint
- Fetches recent events by agent_id (new db.list_facts_by_agent)
- Generates structured summary via DeepSeek LLM
- Saves summary to PostgreSQL facts + Qdrant vector store
- Returns structured JSON (summary, goals, decisions, key_facts)
- Gateway memory_client: auto-trigger after 30 turns
- Turn counter per chat (agent_id:channel_id)
- 5-minute debounce between summarize calls
- Fire-and-forget via asyncio.ensure_future (non-blocking)
- Configurable via SUMMARIZE_TURN_THRESHOLD / SUMMARIZE_DEBOUNCE_SECONDS
- Database: list_facts_by_agent() for agent-level queries without user_id
Tested on NODE1: Helion summarize returns valid Ukrainian summary with 20 events.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-09 10:15:43 -08:00
..
2026-01-10 07:52:32 -08:00
2026-01-17 08:16:37 -08:00
2026-02-09 09:42:44 -08:00
2025-11-15 10:14:26 -08:00
2026-02-09 10:15:43 -08:00
2026-01-17 08:16:37 -08:00
2026-01-17 08:16:37 -08:00
2026-02-09 10:15:43 -08:00
2026-02-09 08:46:46 -08:00
2026-01-10 07:52:32 -08:00
2025-11-27 00:19:40 -08:00
2025-11-15 12:31:01 -08:00
2026-02-09 08:46:46 -08:00
2026-01-10 07:52:32 -08:00