Guides

Using Vector DB

Using the Vector DB for search and retrieval

Vector storage enables semantic search for your agents, allowing them to find information by meaning rather than keywords. Ideal for knowledge bases, RAG systems, and persistent agent memory.

Understanding Vector Storage

Vector storage works by converting text into high-dimensional numerical representations (embeddings) that capture semantic meaning. When you search, the system finds documents with similar meanings rather than just keyword matches.

Key use cases:

  • Knowledge bases and documentation search
  • Long-term memory across agent sessions
  • RAG systems combining retrieval with AI generation
  • Semantic similarity search

Managing Vector Instances

Viewing Vector Storage in the Cloud Console

Navigate to Services > Vector in the Agentuity Cloud Console to view all your vector storage instances. The interface shows:

  • Database Name: The identifier for your vector storage
  • Projects: Which projects are using this storage
  • Agents: Which agents have access
  • Size: Storage utilization

You can filter instances by name using the search box and create new vector storage instances with the Create Storage button.

Vector Storage Overview

Creating Vector Storage

You can create vector storage either through the Cloud Console or programmatically in your agent code.

Via Cloud Console

Navigate to Services > Vector and click Create Storage. Choose a descriptive name that reflects the storage purpose (e.g., knowledge-base, agent-memory, product-catalog).

Via SDK

Vector storage is created automatically when your agent first calls context.vector.upsert() with an instance name:

Vector Storage API

Upserting Documents

The upsert operation inserts new documents or updates existing ones. You can provide either text (which gets automatically converted to embeddings) or pre-computed embeddings.

Searching Vector Storage

Search operations find semantically similar documents based on a text query. You can control the number of results, similarity threshold, and filter by metadata.

Search Parameters:

  • query (required): Text query to search for
  • limit (optional): Maximum number of results to return
  • similarity (optional): Minimum similarity threshold (0.0-1.0)
  • metadata (optional): Filter results by metadata key-value pairs

Deleting Vectors

Remove specific vectors from storage using their IDs.

Best Practices

Document Structure

  • Include context in documents: Store enough context so documents are meaningful when retrieved
  • Use descriptive metadata: Include relevant metadata for filtering and identification
  • Consistent formatting: Use consistent document formatting for better embeddings

Search Optimization

  • Adjust similarity thresholds: Start with 0.7 and adjust based on result quality
  • Use metadata filtering: Combine semantic search with metadata filters for precise results
  • Limit result sets: Use appropriate limits to balance performance and relevance

Performance Considerations

  • Batch upsert operations: Use bulk upsert instead of individual calls
  • Monitor storage usage: Track vector storage size in the Cloud Console
  • Consider document chunking: Break large documents into smaller, focused chunks

Integration with Agent Memory

Vector storage serves as long-term memory for agents, enabling them to:

  • Remember past conversations and context across sessions
  • Access organizational knowledge bases
  • Retrieve relevant examples for few-shot learning
  • Build and maintain agent-specific knowledge repositories

For more information on memory patterns, see the Key-Value Storage guide for short-term memory or explore Agent Communication for sharing knowledge between agents.

Need Help?

Join our DiscordCommunity for assistance or just to hang with other humans building agents.

Send us an email at hi@agentuity.com if you'd like to get in touch.

Please Follow us on

If you haven't already, please Signup for your free account now and start building your first agent!