Proposal: document AgentsKit as a portable Supabase pgvector adapter for JavaScript agents #48752
Unanswered
EmersonBraun
asked this question in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
JavaScript developers building agents with Supabase often have to assemble three separate pieces themselves: a vector-memory contract, PostgREST mutations, and a pgvector search RPC. The easy shortcut is a generic SQL-execution RPC, but exposing caller-provided SQL—especially through a
security definerfunction—is not a pattern I think the Supabase community should encourage.There is also a portability problem: if application code is written directly around one vector provider's API, moving between Supabase, local pgvector, or another managed backend becomes a rewrite instead of a configuration change.
What is already implemented
AgentsKit is an open-source, modular agent toolkit for JavaScript. Its
@agentskit/memorypackage now includes a Supabase adapter behind the sameVectorMemorycontract used by its other storage backends.The Supabase path intentionally uses:
supabase.from(table).upsert(...)for writes;delete().in('id', ids)for deletion;match_agentskit_vectorsRPC for similarity search;security invoker, a fixed return shape, metadata containment filters, a threshold, and a hard maximum of 100 results;@supabase/supabase-js;Source: https://github.com/AgentsKit-io/agentskit/blob/e47f30cf5a938dcf865e9342a41fcf9d7d378fd1/packages/memory/src/vector/supabase.ts
Current setup and security guide: https://github.com/AgentsKit-io/agentskit/blob/e47f30cf5a938dcf865e9342a41fcf9d7d378fd1/apps/docs-next/content/docs/data/memory/supabase-vector.mdx
Validation evidence
I tested the frozen implementation against a disposable Supabase free project in
sa-east-1:1and0.993883748801337;topK, threshold, and JSON metadata filtering were honored;service_role, and the project and credentials were deleted after validation.Proposed contribution
If this is useful to Supabase users, I would like to contribute a concise documentation entry rather than change Supabase core or
supabase-js. It would contain:security invokerguidance;Would this fit best as an AI integration, a pgvector framework example, or another existing docs section? I am happy to follow the maintainers' preferred scope and location before opening a PR.
All reactions