"""Pydantic schemas for the Agent Memory plugin.""" from __future__ import annotations from datetime import datetime from pydantic import BaseModel, Field class AgentMemoryCreate(BaseModel): agent_id: str = Field(..., description="UUID of the agent") memory_type: str = Field("fact", max_length=50, description="Type of memory (fact, context, pattern, instruction)") content: str = Field(..., min_length=1, description="Memory content text") class AgentMemoryUpdate(BaseModel): content: str | None = Field(None, min_length=1) memory_type: str | None = Field(None, max_length=50) class AgentMemoryRead(BaseModel): id: str agent_id: str memory_type: str content: str owner_id: str | None = None created_at: datetime | None = None updated_at: datetime | None = None score: float = 0.0 class AgentMemoryListResponse(BaseModel): items: list[AgentMemoryRead] total: int