Confirm this is a feature request for the Python library and not the underlying OpenAI API.
Describe the feature or improvement you're requesting
I’d like to propose an optional experience-memory interface for the OpenAI Python SDK.
The OpenAI APIs make it possible to build agents and long-running applications, but developers still need to build their own layer for preserving and reusing useful experience from previous tasks.
I think there is an interesting distinction between conversation history and experience.
Conversation history answers:
"What happened in the previous interaction?"
Experience answers:
"What did the system learn from completing that task that could help with a future task?"
For example, an application may use the OpenAI API to solve a difficult coding problem:
The agent tries several approaches.
Two approaches fail.
A third approach succeeds.
Tests verify the solution.
The useful outcome is then stored as structured experience.
A future request could retrieve that experience before execution.
A simple abstraction could look conceptually like:
experience = memory.retrieve(
query="authentication refresh token failure",
limit=3
)
response = client.responses.create(
model="...",
input=[
{
"role": "developer",
"content": experience
},
{
"role": "user",
"content": task
}
]
)
memory.record(
task=task,
outcome="success",
verified=True
)
The SDK would not need to implement a specific database or memory vendor. Instead, it could expose a small interface/protocol that developers and third-party memory systems can implement.
The experience record could contain things such as:
Task/problem
Relevant context
Approaches attempted
Failed approaches
Successful approach
Outcome
Verification/evidence
Relevant environment
Confidence
For example:
Problem:
Authentication requests intermittently failed.
Attempt 1:
Increase token expiration → failed
Attempt 2:
Change retry configuration → failed
Attempt 3:
Fix refresh-token lifecycle → successful
Verification:
Authentication tests passed
Confidence:
High
The important part is that this would NOT require storing hidden chain-of-thought or transferring model weights. The transferable object would be structured, user-visible information derived from completed work.
Why this could be useful
This would allow experience to move beyond a single conversation or application instance.
For example:
Agent A
↓
completes task
↓
validated experience
↓
experience store
↓
Agent B
↓
similar task
↓
retrieves relevant experience
This could be particularly useful for:
coding agents
customer-support agents
research agents
workflow automation
multi-agent systems
long-running applications
The underlying OpenAI model remains unchanged. The experience layer simply gives future requests access to relevant, validated lessons from previous work.
I have been experimenting with this concept in CogniCore, an open-source cognitive infrastructure project for AI agents:
https://github.com/cognicore-dev/cognicore-my-openenv
The project explores episodic, semantic, and procedural memory, reflection, and experience reuse.
I'm not suggesting that the OpenAI Python SDK should become a complete memory database. Rather, I think a small, provider-agnostic interface or extension point could make it much easier for applications to add portable experience memory while allowing different implementations underneath.
I'd be interested in hearing whether the community sees value in a standardized experience-memory interface at the SDK/application layer, and what the most appropriate API design would look like.
Additional context
No response
Confirm this is a feature request for the Python library and not the underlying OpenAI API.
Describe the feature or improvement you're requesting
I’d like to propose an optional experience-memory interface for the OpenAI Python SDK.
The OpenAI APIs make it possible to build agents and long-running applications, but developers still need to build their own layer for preserving and reusing useful experience from previous tasks.
I think there is an interesting distinction between conversation history and experience.
Conversation history answers:
"What happened in the previous interaction?"
Experience answers:
"What did the system learn from completing that task that could help with a future task?"
For example, an application may use the OpenAI API to solve a difficult coding problem:
The agent tries several approaches.
Two approaches fail.
A third approach succeeds.
Tests verify the solution.
The useful outcome is then stored as structured experience.
A future request could retrieve that experience before execution.
A simple abstraction could look conceptually like:
experience = memory.retrieve(
query="authentication refresh token failure",
limit=3
)
response = client.responses.create(
model="...",
input=[
{
"role": "developer",
"content": experience
},
{
"role": "user",
"content": task
}
]
)
memory.record(
task=task,
outcome="success",
verified=True
)
The SDK would not need to implement a specific database or memory vendor. Instead, it could expose a small interface/protocol that developers and third-party memory systems can implement.
The experience record could contain things such as:
Task/problem
Relevant context
Approaches attempted
Failed approaches
Successful approach
Outcome
Verification/evidence
Relevant environment
Confidence
For example:
Problem:
Authentication requests intermittently failed.
Attempt 1:
Increase token expiration → failed
Attempt 2:
Change retry configuration → failed
Attempt 3:
Fix refresh-token lifecycle → successful
Verification:
Authentication tests passed
Confidence:
High
The important part is that this would NOT require storing hidden chain-of-thought or transferring model weights. The transferable object would be structured, user-visible information derived from completed work.
Why this could be useful
This would allow experience to move beyond a single conversation or application instance.
For example:
Agent A
↓
completes task
↓
validated experience
↓
experience store
↓
Agent B
↓
similar task
↓
retrieves relevant experience
This could be particularly useful for:
coding agents
customer-support agents
research agents
workflow automation
multi-agent systems
long-running applications
The underlying OpenAI model remains unchanged. The experience layer simply gives future requests access to relevant, validated lessons from previous work.
I have been experimenting with this concept in CogniCore, an open-source cognitive infrastructure project for AI agents:
https://github.com/cognicore-dev/cognicore-my-openenv
The project explores episodic, semantic, and procedural memory, reflection, and experience reuse.
I'm not suggesting that the OpenAI Python SDK should become a complete memory database. Rather, I think a small, provider-agnostic interface or extension point could make it much easier for applications to add portable experience memory while allowing different implementations underneath.
I'd be interested in hearing whether the community sees value in a standardized experience-memory interface at the SDK/application layer, and what the most appropriate API design would look like.
Additional context
No response