Overview
This guide will walk you through creating your first memory, storing it in Azen, and performing a semantic search to retrieve it. You’ll learn the core workflow that powers AI applications with long-term memory.What you’ll build: A working memory system that stores user preferences and retrieves them using semantic search.
Prerequisites
Before you begin, make sure you have:- An Azen account (sign up at console.azen.sh)
curlor any HTTP client installed
Create an account and get your API key
- Sign up at console.azen.sh
- Complete the onboarding flow to create your organization
- Navigate to the API Keys section in your dashboard
- Click Create API key to generate a new key
- Copy your API key immediately — you won’t be able to see it again
Create your first memory
Let’s store a memory about a user’s preference. Azen automatically encrypts the content at rest and queues it for vector embedding.Response:Save the
The
embedding field shows "processing" because embeddings are generated asynchronously. This typically takes 1-2 seconds.memoryId — you’ll need it to retrieve or delete this memory later.Search memories semantically
Now let’s search for memories using natural language. Azen uses vector similarity to find the most relevant memories, even if the exact words don’t match.Response:The search returns the most relevant memories ranked by similarity score. Notice how it found memories about hiking and rock climbing, even though the query asked about “outdoor activities.”
The
topK parameter controls how many results to return (1-50, default is 5). Higher scores indicate better matches.List all memories
You can retrieve all memories with pagination support:Response:Memories are ordered by creation date (newest first), with support for pagination up to 100 items per page.
Complete example
Here’s a complete working example that ties everything together:Next steps
Now that you’ve created your first memories and performed semantic search, explore these topics:API Reference
Explore all available endpoints and parameters
Understanding Search
Learn how semantic search works under the hood
Security & Encryption
Understand how Azen encrypts your data at rest
Memory System
Learn how Azen’s memory architecture works
Common patterns
Building a conversational AI
Use Azen to give your AI assistant long-term memory:User preferences engine
Store and retrieve user preferences across sessions:Troubleshooting
Embeddings still processing after 5 seconds
Embeddings still processing after 5 seconds
Embedding generation typically takes 1-2 seconds. If the
embedded field remains false after 5+ seconds:- Check your embedding job status in the dashboard
- Verify your text content is valid UTF-8
- Contact support if the issue persists
Search returns no results
Search returns no results
If your search returns empty results:
- Ensure memories have
embedded: truebefore searching - Try broader search queries
- Verify memories were created for the correct organization
- Check that your memories contain relevant text
401 Unauthorized error
401 Unauthorized error
Rate limit exceeded (429 error)
Rate limit exceeded (429 error)
You’ve exceeded the rate limit for your API key:
- Implement exponential backoff in your retry logic
- Check your usage in the console dashboard
- Consider upgrading your plan for higher limits
- Contact support for custom rate limits
Need help? Join our Discord community or email us at [email protected]

