Skip to main content

Module session

Module session 

Source
Expand description

Session management. Public session management API — thin wrappers over SessionManager.

Mirrors the Python cognee/api/v1/session/session.py functions: get_session, add_feedback, delete_feedback, get_graph_context, set_graph_context.

Structs§

SessionContext
Session context passed to retrievers: the session ID and any loaded conversation history (as LLM messages).
SessionManager
Orchestrates session operations using an Arc<dyn SessionStore>.
SessionQAEntry
A single question-answer entry stored in a session.
SessionQAUpdate
Partial update DTO for a QA entry.
UsedGraphElementIds
Graph element IDs that were used to produce the answer for a Q&A entry.

Enums§

SessionError

Traits§

SessionStore
Abstraction over session Q&A storage backends (SQLite, Redis, filesystem, etc.).

Functions§

add_feedback
Add feedback (text and/or score) to a Q&A entry.
delete_feedback
Clear feedback from a Q&A entry.
get_graph_context
Retrieve the graph knowledge snapshot for a session.
get_session
Retrieve Q&A history from a session.
set_graph_context
Store (or overwrite) the graph knowledge snapshot for a session.