Skip to content

feat(python): add support for persistent_memory in SessionConfig#1122

Open
EaCognitive wants to merge 1 commit intogithub:mainfrom
EaCognitive:fix-python-agent-parity
Open

feat(python): add support for persistent_memory in SessionConfig#1122
EaCognitive wants to merge 1 commit intogithub:mainfrom
EaCognitive:fix-python-agent-parity

Conversation

@EaCognitive
Copy link
Copy Markdown

Problem

The GitHub Copilot SDK (Python) is currently missing support for the persistent_memory feature, which allows agents to maintain state across conversation sessions. While the underlying RPC protocol supports this, the high-level Python API does not yet expose it.

Solution

This PR adds the persistent_memory parameter to the SessionConfig TypedDict and the create_session method. The value is correctly passed through the payload to the session.create RPC call.

Changes

  • python/copilot/session.py: Added persistent_memory to SessionConfig.
  • python/copilot/client.py: Added persistent_memory parameter to create_session and updated the RPC payload construction.

Verification

  • Added a unit test (python/test_persistent_memory_unit.py) that mocks the RPC client and verifies the persistentMemory field is correctly sent.
  • Verified parity with the TypeScript SDK implementation.

@EaCognitive EaCognitive requested a review from a team as a code owner April 22, 2026 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant