Skip to content

SurrealDB & Boundary ML Integration for Advanced Memory and Context Reasoning #9

Description

@kirill-0440

Describe the solution you'd like
Add optional integrations for:

SurrealDB – as a persistent, graph-native memory backend.

Store reasoning traces (agent_id, input, output, links) as nodes and edges.

Enable semantic queries like SELECT output FROM reasoning WHERE topic = "climate" directly from YAML.

Provide an agent type:

  • id: surreal_memory
    type: surreal_memory
    connection: surrealdb://localhost:8000
    query: >
    SELECT response FROM memory WHERE topic = {{ input }}

BAML (Boundary ML) – for structured and validated LLM outputs.

Add schema: field to local_llm or openai-* agents to enforce BAML DSL contracts.

Example:

  • id: structured_answer
    type: local_llm
    model: llama3.2
    schema: |
    baml:
    output:
    - name: title: str
    - name: confidence: float
    - name: explanation: str

Describe alternatives you've considered

Using Redis JSON modules for persistence — lacks graph and query capabilities.

Using Python-side JSON schema validation — works but adds complexity and loses YAML-level transparency.

Manual serialization and validation within each agent — too error-prone for multi-agent setups.

Additional context
SurrealDB offers SQL+Graph semantics that align perfectly with OrKa’s goal of “reasoning as dataflow.”
BAML (Boundary ML) extends this by providing scoped reasoning and type-safe outputs — a natural fit for OrKa’s YAML-first design.
Together, they bring:

Persistent, queryable, auditable memory.

Typed, schema-validated LLM outputs.

Safer agent composition for enterprise or regulated environments.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions