Overview
Use the Agentic SDK memory APIs to persist user information and retrieve relevant data during agent execution.This page defines the supported APIs, runtime requirements, and correct usage patterns for runs-on custom agents.
Initialize the SDK
Initialize the SDK client before using memory features. For more information, see Client.Example endpoints the SDK calls
/memories/memories/search
Additional behavior
WXO_API_PROXY_URLoverridesexecution_context["api_proxy_url"]- runs-on defaults to
verify=Falseunless overridden
Minimal Runs-On Agent
PYTHON
Packaging and Import
BASH
This command
- Packages the directory
- Uploads code and dependencies
- Creates or updates the agent
Memory APIs
Write API
PYTHON
Read APIs
PYTHON
Delete APIs
PYTHON
Removed API
store()is removed- Use
add_messages(...)
Recommended Usage
PYTHON
Search examples
PYTHON
PYTHON
Public Method Signatures
add_messages
PYTHON
search
PYTHON
retrieve
PYTHON
list
PYTHON
delete
PYTHON
delete_all
PYTHON
Valid Message Format
BASH
Common message shapes
- single user message
- user + assistant
- user + tool
Supported memory_type Values
Canonical values
conversationalprofile_factpreferenceoutcometool
Supported aliases
conversation→conversationalfact→conversationalepisodic→conversationalprofile→profile_factidentity→profile_factpreferences→preferencetask→toolprocedure→toolderived_event→outcome
Validation behavior
- Invalid values fail fast with an SDK error
Metadata
PYTHON
Prefer top-level fields
Use
memory_typeagent_idrun_idsensitivity_classificationsource_reference
Scoping Rules
Memory is user-scoped
- Not agent-owned
- Not thread-scoped
Implications
- Users can recall memory across agents
delete_all()affects all memory for the userlist()returns all user memory
Infer behavior
Use infer=False when
- Memory type is known
- Deterministic storage is required
Use default inference when
- Passing rich message windows
- Backend extraction is preferred
Example Memory Loop
PYTHON
Common failure modes
Missing api_proxy_url
- Runtime did not provide it
- Environment variable not set
TLS or hostname errors
- SDK uses URL exactly as provided
- Invalid certificates cause failures
Invalid memory_type
- Fails immediately with validation error
Empty search results
- Valid outcome
- Not an error
What to test
- Agent initializes from
RunnableConfig add_messages(...)succeedssearch(...)returns structured response- Empty results handled correctly
- Invalid types fail fast
Mental model
- runs-on is the runtime path
Client.from_runnable_config(config) is the standard entryadd_messages(...)writes memorysearch(...)reads memory- memory is user-scoped
api_proxy_urlmust already be correct

