1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
//! Database Clients and Vector Stores
//!
//! This module provides database abstractions for:
//! - **PostgreSQL**: Relational database for conversations, users, etc.
//! - **Vector Stores**: Multi-provider vector database support
//!
//! # Relational Database
//!
//! The [`PostgresClient`] provides async access to PostgreSQL for:
//! - User management (registration, authentication)
//! - Conversation storage and retrieval
//! - Message history
//! - User memory (facts, preferences)
//!
//! # Vector Store Providers
//!
//! The following vector store backends are supported:
//! - `ares-vector` (default) - Pure Rust embedded HNSW vector database
//! - `lancedb` - Serverless, embedded vector database (may have build issues on Windows)
//! - `qdrant` - High-performance vector search engine
//! - `pgvector` - PostgreSQL extension
//! - `chromadb` - Simple embedding database
//! - `pinecone` - Managed cloud service
//!
//! Enable providers via Cargo features:
//! ```toml
//! ares = { version = "*", features = ["ares-vector", "qdrant"] }
//! ```
//!
//! # Example
//!
//! ```ignore
//! use ares::db::{PostgresClient, VectorStore, AresVectorStore};
//!
//! // Relational database
//! let db = PostgresClient::new("postgres://user:pass@localhost:5432/ares").await?;
//! let user = db.get_user_by_id(user_id).await?;
//!
//! // Vector store
//! let vector_store = AresVectorStore::new("./vectors").await?;
//! vector_store.upsert("docs", embeddings, metadata).await?;
//! let results = vector_store.search("docs", query_embedding, 10).await?;
//! ```
// Vector store abstraction layer
// Provider implementations
// Relational database (requires postgres feature for sqlx)
/// Agent run tracking (execution history).
/// Platform alerts (health, quota, errors).
/// Admin audit log (mutation tracking).
/// PostgreSQL database client implementation.
/// Per-tenant agent instance management.
/// Multi-tenant tenant management.
/// Database traits and common types shared across providers.
/// Turso/libSQL database client (alternative to PostgreSQL).
/// Agent config version history (Sprint 11).
// Re-exports
pub use ;
pub use AresVectorStore;
pub use LanceDBStore;
pub use PostgresClient;
pub use TursoClient;
pub use QdrantVectorStore;
pub use ;