feat(F): F-MEM agent_memory + frontend agent overview components
Check Cross-Plugin Imports / check (push) Has been cancelled
Check Cross-Plugin Imports / check (push) Has been cancelled
- F-MEM: app/ai/agent_memory.py (236 lines) — store/retrieve/search agent memory with embeddings - Frontend: AgentDashboard.tsx (831 lines), AgentsOverview.tsx (35 lines) — agent list and dashboard - agent_memory plugin models updated
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
-- Agent Memory: add metadata JSONB column for structured memory metadata
|
||||
|
||||
ALTER TABLE agent_memories ADD COLUMN IF NOT EXISTS metadata JSONB;
|
||||
@@ -3,8 +3,10 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import uuid
|
||||
from typing import Any
|
||||
|
||||
from sqlalchemy import Index, String, Text
|
||||
from sqlalchemy.dialects.postgresql import JSONB
|
||||
from sqlalchemy.dialects.postgresql import UUID as PGUUID
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
@@ -35,5 +37,8 @@ class AgentMemory(Base, TenantMixin, OwnedMixin):
|
||||
String(50), nullable=False, default="fact"
|
||||
)
|
||||
content: Mapped[str] = mapped_column(Text, nullable=False)
|
||||
metadata_: Mapped[dict[str, Any] | None] = mapped_column(
|
||||
"metadata", JSONB, nullable=True
|
||||
)
|
||||
# embedding column is managed via raw SQL (pgvector extension)
|
||||
# embedding vector(768) — see migration 0001_initial.sql
|
||||
|
||||
Reference in New Issue
Block a user