Getting Started
This guide will walk you through setting up your Hindsight Cloud account and creating your first memory bank.
Prerequisites
- A Hindsight Cloud account (sign up at ui.hindsight.vectorize.io)
- Basic understanding of REST APIs or familiarity with Python/TypeScript
Step 1: Sign Up and Log In
- Navigate to ui.hindsight.vectorize.io
- Click Sign Up and create your account
- Verify your email address
- Log in to access your dashboard
Step 2: Create an Organization
When you first log in, you'll be prompted to create an organization. Organizations are the top-level container for all your resources:
- Memory banks
- Team members
- API keys
- Billing information
Enter a name for your organization and click Create.
Step 3: Create Your First Memory Bank
- From the dashboard, click Create Memory Bank
- Enter a name for your memory bank (e.g., "My AI Assistant")
Step 4: Get Your API Key
- Click the Connect button in the top navigation bar
- Click Create API Key
- Give your key a descriptive name
- Choose an expiration period (or select "Never")
- Important: Copy your API key immediately—it won't be shown again!
Step 5: Make Your First API Call
- Python
- TypeScript
- cURL
pip install hindsight-client
from hindsight_client import Hindsight
client = Hindsight(
base_url="https://api.hindsight.vectorize.io",
api_key="your-api-key"
)
# Create a memory bank
bank = client.create_bank(
bank_id="my-assistant",
name="My Assistant"
)
# Store a memory
client.retain(
bank_id="my-assistant",
content="The user's name is Alice and she prefers Python."
)
# Retrieve relevant memories
result = client.recall(
bank_id="my-assistant",
query="What is the user's name?"
)
for memory in result.results:
print(memory.text)
# Create a mental model - a pre-computed reflection that stays current
result = client.create_mental_model(
bank_id="my-assistant",
name="User Profile",
source_query="What do we know about this user?"
)
print(f"Creating mental model (operation: {result.operation_id})")
# List mental models
models = client.list_mental_models(bank_id="my-assistant")
for m in models.items:
print(f"{m.name}: {m.content}")
client.close()
npm install @vectorize-io/hindsight-client
import { HindsightClient } from '@vectorize-io/hindsight-client';
const client = new HindsightClient({
baseUrl: 'https://api.hindsight.vectorize.io',
apiKey: 'your-api-key'
});
// Create a memory bank
const bank = await client.createBank('my-assistant', {
name: 'My Assistant'
});
// Store a memory
await client.retain(
'my-assistant',
"The user's name is Alice and she prefers Python."
);
// Retrieve relevant memories
const result = await client.recall(
'my-assistant',
"What is the user's name?"
);
result.results.forEach(memory => {
console.log(memory.text);
});
// Create a mental model - a pre-computed reflection that stays current
const mmResult = await client.createMentalModel(
'my-assistant',
'User Profile',
'What do we know about this user?'
);
console.log(`Creating mental model (operation: ${mmResult.operation_id})`);
// List mental models
const models = await client.listMentalModels('my-assistant');
models.items.forEach(m => {
console.log(`${m.name}: ${m.content}`);
});
# Store a memory
curl -X POST https://api.hindsight.vectorize.io/v1/default/banks/{bank_id}/memories \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{"items": [{"content": "The user'\''s name is Alice and she prefers Python."}]}'
# Retrieve memories
curl -X POST https://api.hindsight.vectorize.io/v1/default/banks/{bank_id}/memories/recall \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{"query": "What is the user'\''s name?"}'
# Create a mental model - a pre-computed reflection that stays current
curl -X POST https://api.hindsight.vectorize.io/v1/default/banks/{bank_id}/mental-models \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"name": "User Profile",
"source_query": "What do we know about this user?"
}'
Next Steps
- Learn about Memory Operations in depth
- Create Mental Models to curate pre-computed reflections from your memories
- Set up Team Management for collaboration
- Configure Billing and purchase credits
- Explore the API Integration guide for advanced usage