Expand description
PostgreSQL wire protocol server for Mnemo.
Exposes Mnemo’s memory database through the PostgreSQL wire protocol, allowing SQL-native clients (psql, pgAdmin, any PostgreSQL driver) to query memories using familiar SQL syntax.
§Supported SQL subset
SELECT * FROM memories WHERE agent_id = '...' LIMIT nINSERT INTO memories (content, importance, ...) VALUES (...)DELETE FROM memories WHERE id = '...'
§Architecture
The server accepts TCP connections and speaks the PostgreSQL wire protocol (startup, query, parse/bind/execute extended protocol). Queries are parsed and mapped to Mnemo engine operations:
SELECT→engine.recall()INSERT→engine.remember()DELETE→engine.forget()
Modules§
Structs§
- PgWire
Config - Configuration for the pgwire server.
Functions§
- start_
server - Start the pgwire server.