Problem
ConversationNode.convSummary is empty when reconstructed from graph nodes. Without summaries, conversation_history returns raw question text only. Summaries enable compact context for future queries and semantic search over past answers.
The LLM client (Infrastructure.LLM.OpenAI) already exists but isn't wired to conversation creation.
Solution
Wire Infrastructure.LLM.OpenAI to conversation creation. When add_conversation is called with an empty answer_summary:
- Generate summary via LLM (gpt-4o-mini or local model)
- Store summary in ConversationNode
- Save to disk
Fallback: if no LLM available, use question text as summary.
Configuration (graphos.yaml):
summarization:
provider: openai # openai | ollama | none
model: gpt-4o-mini
api_key: "${OPENAI_API_KEY}"
max_tokens: 100
Acceptance Criteria
Files to Modify
- src/Graphos/UseCase/Conversation.hs — add summarizeConversationWithLLM
- src/Graphos/Infrastructure/Server/MCP.hs — wire summarization to add_conversation
- src/Graphos/Domain/Config.hs — add SummarizationConfig
- src/Graphos/Infrastructure/Config.hs — parse summarization config from YAML
Effort: 1-2 days
Priority: High
See: docs/proposals/memory-agent/05-technical-specifications.md (Spec 4)
Problem
ConversationNode.convSummary is empty when reconstructed from graph nodes. Without summaries, conversation_history returns raw question text only. Summaries enable compact context for future queries and semantic search over past answers.
The LLM client (Infrastructure.LLM.OpenAI) already exists but isn't wired to conversation creation.
Solution
Wire Infrastructure.LLM.OpenAI to conversation creation. When add_conversation is called with an empty answer_summary:
Fallback: if no LLM available, use question text as summary.
Configuration (graphos.yaml):
Acceptance Criteria
Files to Modify
Effort: 1-2 days
Priority: High
See: docs/proposals/memory-agent/05-technical-specifications.md (Spec 4)