| Crates.io | zoey-storage-supabase |
| lib.rs | zoey-storage-supabase |
| version | 0.1.1 |
| created_at | 2026-01-09 23:40:12.151405+00 |
| updated_at | 2026-01-09 23:56:38.085502+00 |
| description | Supabase database adapter for ZoeyAI |
| homepage | |
| repository | https://github.com/Agent-Zoey/Zoey.git |
| max_upload_size | |
| id | 2033164 |
| size | 210,203 |
Always watching over your data
Supabase storage adapter for ZoeyAI
A Supabase implementation of the IDatabaseAdapter trait from zoey-core. Leverages Supabase's PostgreSQL backend with REST API integration.
Add to your Cargo.toml:
[dependencies]
zoey-core = "0.1"
zoey-storage-supabase = "0.1"
use zoey_core::{AgentRuntime, RuntimeOpts, IDatabaseAdapter};
use zoey_storage_supabase::{SupabaseAdapter, SupabaseConfig};
use std::sync::Arc;
#[tokio::main]
async fn main() -> zoey_core::Result<()> {
// Create Supabase adapter
let config = SupabaseConfig {
url: "https://your-project.supabase.co".to_string(),
api_key: std::env::var("SUPABASE_KEY").unwrap(),
..Default::default()
};
let mut adapter = SupabaseAdapter::new(config);
// Initialize
adapter.init().await?;
// Use with runtime
let opts = RuntimeOpts::default()
.with_adapter(Arc::new(adapter));
let runtime = AgentRuntime::new(opts).await?;
Ok(())
}
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_KEY=your-anon-or-service-key
For direct database access (bypassing REST API):
let config = SupabaseConfig {
url: "postgresql://postgres:password@db.your-project.supabase.co:5432/postgres".to_string(),
api_key: "".to_string(),
use_direct_connection: true,
..Default::default()
};
Supabase supports pgvector for vector similarity search:
-- Enable pgvector (run once in Supabase SQL editor)
CREATE EXTENSION IF NOT EXISTS vector;
The adapter automatically handles vector operations when pgvector is enabled.
| Crate | Description |
|---|---|
zoey-core |
Core runtime and IDatabaseAdapter trait |
zoey-storage-sql |
SQLite & PostgreSQL adapters |
zoey-storage-mongo |
MongoDB adapter |
zoey-storage-vector |
Local vector storage |
MIT License - See LICENSE for details.
🔐 Your secrets are safe with Zoey