UI はローカライズ済みです。スキルの紹介と説明文書は選択した言語へ AI が自動翻訳し、コード・コマンド・パス・専門用語は原文のままです。原作者の文書が優先されます。
スキルを探す
生産性・共同作業 · 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

スキルの説明

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.
保存したスキル