Skip to main content

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_URL overrides execution_context["api_proxy_url"]
  • runs-on defaults to verify=False unless 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
  • conversational
  • profile_fact
  • preference
  • outcome
  • tool

Supported aliases

  • conversationconversational
  • factconversational
  • episodicconversational
  • profileprofile_fact
  • identityprofile_fact
  • preferencespreference
  • tasktool
  • proceduretool
  • derived_eventoutcome
Validation behavior
  • Invalid values fail fast with an SDK error

Metadata

PYTHON

Prefer top-level fields

Use
  • memory_type
  • agent_id
  • run_id
  • sensitivity_classification
  • source_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 user
  • list() 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(...) succeeds
  • search(...) 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 entry
  • add_messages(...) writes memory
  • search(...) reads memory
  • memory is user-scoped
  • api_proxy_url must already be correct

References