L’interface est localisée ; les présentations et documents des Skills sont traduits automatiquement par IA dans votre langue. Le code, les commandes, chemins et termes techniques restent en version originale, et le document de l’auteur fait foi.
Explorer les Skills
Productivité · SKILL.md

sessions-memory

sessions-memory

Choose and configure session memory, server-managed continuation, backends, compaction, and multi-turn history for openai-agents-python.

Independent GitHub snapshot · Automated classification · Original documentation governs

Documentation de la Skill

GitHub

name: sessions-memory description: "Choose and configure session memory, server-managed continuation, backends, compaction, and multi-turn history for openai-agents-python." disable-model-invocation: true metadata: disco-role: operating license: MIT

Sessions and Memory

Use this sub-skill when a task mentions session, memory, SQLiteSession, RedisSession, SQLAlchemySession, conversation_id, previous_response_id, compaction, or multi-turn history.

Route First

NeedUseDetails
SDK-managed client-side historysession=... with a Session backendSee backends and workflows.
OpenAI server-managed continuationconversation_id, previous_response_id, or auto_previous_response_idDo not combine with session; see workflows.
Basic agent loop behaviorCore runtimeRoute to core-runtime.
Provider auth, model defaults, transport selectionModels/providersRoute to models-providers.
Sandbox filesystem/process memorySandbox agentsRoute to sandbox-agents unless normal SDK sessions are involved.

What To Configure

  • Pick one history owner: either an SDK Session backend or OpenAI server-managed continuation, never both in the same run.
  • For local or simple persistent memory, start with SQLiteSession(session_id, db_path=...).
  • For production storage, choose an extension backend by deployment constraints, required extras, and lifecycle ownership in backends.
  • For long conversations, use SessionSettings(limit=...), RunConfig.session_input_callback, or compaction depending on whether you need retrieval limiting, custom merge logic, or stored-history replacement.
  • For approval or interruption resumes, pass the same session object or another instance pointing at the same backing store when calling Runner.run(agent, state, session=session).

Required Safety Checks

  • Before recommending a backend, run or adapt the bundled no-network helper: python scripts/check_session_backend.py --backend sqlite --json.
  • When optional backends fail to import, report the missing extra and avoid constructing network clients unless the user explicitly asks.
  • When behavior is surprising, consult troubleshooting before changing runtime code.
Skills enregistrées