axio-context-sqlite

SQLite-backed persistent conversation contexts.

async axio_context_sqlite.connect(db_path: str | Path) → Connection[source]

Open (or create) a SQLite database and initialise the schema.

The caller is responsible for closing the returned connection.

class axio_context_sqlite.SQLiteContextStore(conn: Connection, session_id: str, project: str | None = None, db_name: str = 'axio_context')[source]

Persistent conversation storage backed by SQLite.

The caller owns the connection and is responsible for closing it. Use connect() to open a properly initialized connection.

async close() → None[source]

No-op: the caller owns the connection.

async fork() → SQLiteContextStore[source]

Returns a MemoryContextStore deep copy by default.

async get_context_tokens() → tuple[int, int][source]

Returns (0, 0) by default.

async list_sessions() → list[SessionInfo][source]

List all sessions for a project, newest first.

property session_id: str

Lazy-init UUID hex; works without calling super().__init__().

async set_context_tokens(input_tokens: int, output_tokens: int) → None[source]

No-op by default; tokens are silently dropped.