Recallr seamlessly integrates with Anthropic by acting as a forward proxy. Simply point your Anthropic client to our base URL and we’ll inject relevant context from user memory into each request.
Quick Start
Supported APIs
Messages API
Anthropic’s Messages API with streaming and non-streaming support
Required Headers
These headers must be included with every request:Unique identifier for the user. Used to maintain separate memory graphs per user.
Can also be passed as
user
field in the request body for OpenAI compatibility.Optional Headers
Session Management
Automatically create a new user if the specified User-ID doesn’t exist. Set to
true
to avoid errors for new users.Inactivity period (in seconds) before creating a new session. Minimum value is 600 (10 minutes).
Messages within a session are always passed directly to the LLM. Only memories from previous sessions are retrieved and injected as context.
Continue a specific past session by providing its ID. Get session IDs from response headers.
Recall Configuration
Controls the recall method used for retrieving memories. Affects latency and accuracy.
- low_latency
- balanced
- deep
Best for: Voice agents and real-time applications
- Fastest response time
- Retrieves more memories to compensate for reduced accuracy
- Use when sub-second latency is critical
Minimum number of memories to retrieve from the knowledge graph.
Maximum number of memories to retrieve from the knowledge graph.
Similarity threshold for retrieving individual memories (0.0 to 1.0). Lower values retrieve more memories.
Similarity threshold for retrieving session summaries (0.0 to 1.0). Lower values retrieve more summaries.
Include only the last N messages from past sessions when building context.
Include only the last N session summaries when building context.
User’s timezone for temporal context (e.g., “America/New_York”). Helps with time-based memories.
Whether to include Recallr AI’s system prompt (~ 3k tokens) in the context. This prompt includes instructions for how to use the injected memories. Set to
false
if you already have those instructions in your system prompt.Response Headers
Recallr returns these headers in the response for debugging and session tracking:The internal session ID used by Recallr. Use this to continue the same session in future requests.
Unique identifier for the user. Matches the
X-Recallr-User-Id
sent in the request.Unique identifier for this request. Use for debugging and tracing.
Time taken to process the request on Recallr’s side (in milliseconds).
Examples
Messages API - Non-Streaming
Messages API - Streaming
How It Works
Need Help?
Contact our support team for assistance with Anthropic integration