Skip to content

BrainAPI is a knowledge graph–powered AI memory layer that transforms unstructured data into structured knowledge, enabling intelligent search, recommendations, and contextual memory for AI agents and applications.

738 B
Raw Blame
"""
File: /output_schemas.py
Created Date: Wednesday October 29th 2025
Author: Christian Nonis <[email protected]>
-----
Last Modified: Wednesday October 29th 2025 7:50:18 pm
Modified By: the developer formerly known as Christian Nonis at <[email protected]>
-----
"""

from pydantic import BaseModel, Field


class KGNeighbor(BaseModel):
    """
    Neighbor model.
    """

    uuid: str = Field(description="The UUID of the neighbor.")
    similarities: list[str] = Field(
        description="A list of string reasons that explain why the nodes are similar."
    )


class RetrieveNeighborsOutputSchema(BaseModel):
    """
    Output schema for the retrieve neighbors operation.
    """

    neighbors: list[KGNeighbor]