Memory Space
Overview
Memory Space is autobotAI's native RAG (Retrieval-Augmented Generation) engine. It acts as a dedicated long-term memory for your AI Agents, allowing them to store and retrieve information across different bot executions and sessions.
Unlike standard LLM context windows which are ephemeral, Memory Spaces use a Vector Database (Amazon DocumentDB) to index information semantically. This enables your agents to "think" with your private documentation, previous incident reports, or real-time infrastructure data.
Key Capabilities
- Semantic Search: Find information based on meaning, not just keywords.
- Automated Ingestion: Feed bot outputs (like API results) directly into memory.
- Advanced Indexing: AI-generated "Embedding Strategies" for structured data.
- Data Sovereignty: All vectors are stored within your own AWS environment.
Architecture & Concepts
1. Memory Space
The top-level container. Each space is tied to a specific AI Integration. This integration provides the embedding model (to index information) and the LLM (to query it).
2. Memory Artifacts
The individual "knowledge units" within a space. An artifact can be:
- A Document: Uploaded files (PDF, DOCX, etc.).
- A Data Stream: Dynamic outputs from workflow nodes (e.g., a list of EC2 instances from an API call).
3. Embedding Strategy
For structured data (JSON/CSV), autobotAI use AI to analyze the data and generate a strategy. This includes:
- Fields to Embed: Which fields contain the actual knowledge.
- Metadata Fields: Fields used for filtering (e.g.,
status,region). - Primary Key: Used for the Upsert logic to update existing information instead of creating duplicates.
Setting Up Memory Space
Step 1: Initialize the Space
- Navigate to Memory Spaces in the navigation bar under Bot Building Blocks.
- Click Create Memory Space.
- Fill in the following required fields in the drawer:
- Name*: A descriptive name for the memory space.
- Description*: Detailed explanation of what this memory space will store.
- Integration Type*: Select the AI service provider (e.g., OpenAI or AWS Bedrock).
- Account ID*: Select the specific integration account to use for embeddings.
- Click Create to initialize your space.
Creating and Managing Artifacts
Artifacts are the actual pieces of data stored within a Memory Space. There are two primary ways to create and use them:
1. Manual Ingestion (File Upload)
Use this for static knowledge like playbooks, compliance standards, or static documentation.
- Open your Memory Space from the Memory Spaces list.
- Click Add Artifact.
- Provide a Name and Description.
- Upload File: Supported formats include
.pdf, .docx, .txt, .md, .csv, .json, .yaml, .ipynb. - The system will automatically chunk and embed the file content into the vector store.
2. Automated Capture (Node Output)
Use this to build a dynamic knowledge base from your automation workflows.
- In a bot workflow, select an action node (e.g., REST API or Python).
Important: The node must have been executed at least once (successfully) in a prior run so the system can analyze its output structure.
- Scroll to the Advance Settings section and enable Save Output to Memory Space Artifact.
- Select your Memory Space.
- Click Create New Artifact.
- Strategy Generation: The system will automatically analyze the output from the last execution to generate an Embedding Strategy (identifying which fields to embed and which to use as filters).
- Give that artifact a name and description.
- Upsert Logic: By defining a
primary_key(likeinstance_id), every time the bot runs, it will update existing information in memory rather than creating redundant copies.
Using Memory in AI Agents
To grant an agent access to these memories:
1. Connecting the Space
In the AI Agent Node, go to the AI section and select your Memory Space in the Memory Space dropdown.
Important: Attaching a Memory Space here is what automatically equips the agent with the query_memory_space tool. The agent uses this tool to search through all connected artifact data to provide context-aware responses.
2. Enabling Episodic Memory
In the Advanced section, you will find a Use Memory toggle. This specifically refers to the agent's Episodic/Conversation Memory (summarizing past turns for better nuance). This adds the load_memory_tool. While complementary, it is distinct from the long-term knowledge retrieval provided by selecting a Memory Space ID.
3. How the Agent Queries
The agent intelligently decides when to search. It reformulates the user's request into a standalone question for the vector search.
- Top K: The agent can specify how many relevant chunks (default 25) to analyze.
- Artifact Filtering: If the agent knows the information is in a specific report, it can filter its search to a specific
artifact_id.
Data Management & Logic
Upsert and Modification
Memory Space supports incremental updates:
- Content Hashing: Only re-embeds data if the content has changed.
- Explicit Deletions: If your data contains
modification_type: "delete", the system will remove that entry from the vector store.
Best Practices
- Descriptive Names: Use clear names for Artifacts (e.g.,
FY25_Compliance_Audit) so the agent knows what it's searching. - Schema Regularity: For automated ingestion, ensure the node output schema is consistent so the Embedding Strategy remains effective.
- Hybrid Strategy: Use the "Hybrid" strategy type for data that contains both technical codes (keywords) and descriptive text (semantic).