Recallr seamlessly integrates with Google Gemini by acting as a forward proxy. Configure your Gemini client to use our proxy URL and we’ll inject relevant context from user memory into each request.
Quick Start
Supported APIs
Generate Content
Standard text generation with non-streaming support
Generate Content Stream
Real-time streaming responses for interactive experiences
Required Headers
These headers must be included via thehttp_options configuration:
Unique identifier for the user. Used to maintain separate memory graphs per user.
Must be passed in the headers configuration when initializing the Gemini client.
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.
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 last N messages from past sessions when building context.
Include 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
Generate Content - Non-Streaming
Generate Content - Streaming
How It Works
Need Help?
Contact our support team for assistance with Gemini integration