Add brain memory services and APIs

Introduce the backend pieces for brain memory ingestion, routing, and
system telemetry so the new knowledge workflows can project data into a
brain view. The supporting tests lock in the new behavior and keep the
expanded backend surface stable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-22 13:47:34 +08:00
parent e3691b01bb
commit d2447ee635
28 changed files with 2278 additions and 197 deletions

View File

@@ -7,6 +7,15 @@ from app.models.agent import Agent, AgentMessage
from app.models.conversation import Conversation, Message
from app.models.knowledge_graph import KGNode, KGEdge
from app.models.memory import MemorySummary, UserMemory
from app.models.brain import (
BrainEvent,
BrainCandidate,
BrainMemory,
BrainTag,
brain_event_tags,
brain_memory_tags,
brain_memory_sources,
)
from app.models.todo import DailyTodo, TodoSource
from app.models.log import Log, LogType, LogLevel
@@ -27,6 +36,13 @@ __all__ = [
"KGEdge",
"MemorySummary",
"UserMemory",
"BrainEvent",
"BrainCandidate",
"BrainMemory",
"BrainTag",
"brain_event_tags",
"brain_memory_tags",
"brain_memory_sources",
"DailyTodo",
"TodoSource",
"Log",