Skip to content

Add memory provider#13

Open
fivetran-davefowler wants to merge 2 commits into
mainfrom
memory-provider
Open

Add memory provider#13
fivetran-davefowler wants to merge 2 commits into
mainfrom
memory-provider

Conversation

@fivetran-davefowler
Copy link
Copy Markdown

Summary

Adds a tool-agnostic memory provider: durable, agent-facing notes anchored to the warehouse objects where they're relevant. Supersedes #11 (that PR's branch notes_provider was renamed to memory-provider, which closed it).

  • agents-schema memory --memory-file memory.yml → writes AGENTS.MEMORY + AGENTS.MEMORY_ANCHOR, registers the memory provider in AGENTS.ROOT
  • Adds the matching reusable workflow + composite action and memory-setup.md, mirroring dbt/Looker/OSI

Positioning (what changed from #11)

Memory is framed as the lightweight path for teams without a semantic layer. If you run OSI, object-local ai_context already carries these notes and memory is largely redundant — the SPEC and setup guide say so plainly rather than overselling. Anchors target physical objects (schema/table/column) on purpose: a column anchor is reachable from raw schema and from an OSI-aware consumer (OSI fields map down to columns); the reverse isn't true. metric and relationship are the only logical anchors, for things with no single physical column.

Schema / design decisions

  • confidence is FLOAT in [0,1] (was free-form varchar) so consumers can threshold and rank.
  • Relationship anchors carry the join inline via from_*/to_* with positionally-paired from_columns/to_columns arrays (handles composite/>2-column keys, mirrors OSI_RELATIONSHIP). relationship_name is an optional, unenforced pointer to OSI_RELATIONSHIP.name when OSI is present — memory does not depend on OSI.
  • Provenance stays flat on MEMORY (source + confidence) for v1; a separate MEMORY_SOURCE edge table is deferred.
  • Tighter anchor validation: rejects locator columns that don't belong to the anchor's type, plus the existing fail-fast checks (unknown fields, bad scalar types, dup memories/anchors, invalid anchor types, missing locators) and confidence range.
  • Key naming follows the OSI parent/child convention (MEMORY.memory_idMEMORY_ANCHOR.memory_id), documented in code and SPEC.

Verification

uv run python -m unittest discover -s tests
Ran 21 tests
OK

git diff --check   # clean

🤖 Generated with Claude Code

fivetran-davefowler and others added 2 commits May 30, 2026 21:43
…, OSI framing

- confidence is now FLOAT in [0,1] (was free-form varchar) so consumers can threshold/rank
- relationship anchors carry the join inline via from_*/to_* (+ paired array columns)
  instead of a single-table locator; relationship_name is an optional, unenforced
  pointer to OSI_RELATIONSHIP when present
- tighten anchor validation: reject locator columns that don't belong to the anchor type
- document when to use memory and that OSI-native teams should prefer object-local
  ai_context (memory is the no-semantic-layer path)
- add agents-schema-memory workflow + composite action + memory-setup.md to match
  the other providers; link from README
- follow OSI parent/child key convention (documented in code + SPEC)
- fix memory_path variable shadowing

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant