Managing Shared Team Memory (Hive Minds)

Hive Minds let teams share memories, knowledge graphs, workflows, and preferences across all members. Build collective intelligence that grows as your team works together.

Overview

A Hive is a shared memory context. When a member writes a memory to the hive, all other members can search and access it. This creates a team knowledge base that grows organically from everyone's work -- shared debugging knowledge, architectural decisions, onboarding context, and team preferences.

Memory contexts

Rekall has three memory contexts: Personal (private to a user), Hive (shared with team), and Agent (scoped to an agent identity). When you create a memory, you choose which context it belongs to. See Memory Contexts for details.

Creating Hives

Create a new hive
import Rekall from '@rekall/agent-sdk';
const rekall = new Rekall({ apiKey: 'rk_your_key' });
// Create a team hive
const hive = await rekall.hives.create({
name: 'Platform Team',
description: 'Shared memory for the platform engineering team',
settings: {
defaultVisibility: 'members', // Only members can see memories
allowExternalSharing: false, // Cannot share outside the hive
autoSharePreferences: true, // Team preferences are auto-shared
},
});
console.log(`Hive created: ${hive.id}`); // hive_abc123
console.log(`Invite code: ${hive.inviteCode}`);

Adding Members

Manage hive members
// Add members by email
await rekall.hives.addMembers({
hiveId: hive.id,
members: [
{ email: 'alice@example.com', role: 'admin' },
{ email: 'bob@example.com', role: 'member' },
{ email: 'carol@example.com', role: 'member' },
],
});
// Or invite via invite code
const invite = await rekall.hives.createInvite({
hiveId: hive.id,
role: 'member',
expiresIn: '7d',
maxUses: 10,
});
console.log(`Share this link: https://rekall.ai/invite/${invite.code}`);
// List current members
const members = await rekall.hives.listMembers({
hiveId: hive.id,
});
for (const member of members.items) {
console.log(`${member.name} (${member.role}) - joined ${member.joinedAt}`);
}

Roles & Permissions

RoleReadWriteDeleteManage MembersSettings
ownerYesYesYesYesYes
adminYesYesYesYesNo
memberYesYesOwn onlyNoNo
viewerYesNoNoNoNo

Sharing Memories Across Team

Writing to Hive Context

To share a memory with the team, create it in the hive context.

Create shared memories
// Create a memory in hive context
const sharedMemory = await rekall.memories.create({
type: 'episodic',
content: 'Discovered that the Redis connection pool needs to be at least 50 connections for the payment service under peak load.',
context: {
hiveId: hive.id, // This makes it shared
},
metadata: {
tags: ['infrastructure', 'redis', 'performance'],
source: 'debugging-session',
},
importance: 0.9,
});
// You can also promote a personal memory to hive
await rekall.memories.share({
memoryId: 'mem_personal_abc',
hiveId: hive.id,
visibility: 'members',
});

Searching Hive Memories

Search across hive memories
// Search only within a specific hive
const results = await rekall.memories.search({
query: 'Redis performance tuning',
context: { hiveId: hive.id },
limit: 10,
});
// Search across personal + hive memories simultaneously
const combined = await rekall.memories.search({
query: 'Redis performance tuning',
context: { includeHives: true }, // Includes all hives you belong to
limit: 10,
});
// Each result indicates its source context
for (const memory of combined.memories) {
const source = memory.context.hiveId
? `hive:${memory.context.hiveName}`
: 'personal';
console.log(`[${source}] ${memory.content}`);
}

Access Control

Visibility Levels

Each memory in a hive can have its own visibility level:

Memory visibility options
// Visible to all hive members (default)
await rekall.memories.create({
content: 'Team standup notes...',
context: { hiveId: hive.id, visibility: 'members' },
});
// Visible only to admins and owner
await rekall.memories.create({
content: 'Salary discussion notes...',
context: { hiveId: hive.id, visibility: 'admins' },
});
// Visible to specific members
await rekall.memories.create({
content: 'Project proposal draft...',
context: {
hiveId: hive.id,
visibility: 'specific',
visibleTo: ['user_alice', 'user_bob'],
},
});

Privacy

Personal memories are never visible to hive members unless explicitly shared. The includeHives: true flag in search only returns memories that were created in or shared to the hive context.

Shared Knowledge Graphs

Hives support shared knowledge graphs, so the entire team contributes to and benefits from the same entity and relationship data.

Build shared knowledge graphs
// Create entities in hive context
const service = await rekall.semantic.createEntity({
name: 'api-gateway',
type: 'service',
description: 'Central API gateway for all microservices',
context: { hiveId: hive.id },
});
// Any team member can add relationships
await rekall.semantic.createRelationship({
sourceId: service.id,
targetId: 'ent_postgres',
type: 'uses',
context: { hiveId: hive.id },
});
// Query the shared graph
const graph = await rekall.semantic.searchEntities({
query: 'core infrastructure services',
context: { hiveId: hive.id },
types: ['service'],
});
// Traverse shared graph for impact analysis
const impacted = await rekall.semantic.traverse({
startEntityId: 'ent_postgres',
path: [{ type: 'uses', direction: 'incoming' }],
context: { hiveId: hive.id },
});
console.log('Services that use PostgreSQL:');
for (const node of impacted.nodes) {
console.log(` - ${node.name}`);
}

Team Workflows

Share procedural workflows across the team so everyone follows the same processes.

Shared team workflows
// Create a team workflow
const onboarding = await rekall.procedural.createWorkflow({
name: 'New Engineer Onboarding',
description: 'Standard onboarding checklist for new engineers',
context: { hiveId: hive.id },
steps: [
{ name: 'Set up dev environment', action: 'checklist', params: { items: [
'Install Node.js 20+', 'Clone monorepo', 'Run setup script',
'Verify tests pass', 'Set up IDE extensions',
]}},
{ name: 'Access provisioning', action: 'checklist', params: { items: [
'GitHub org invite', 'Neon database access', 'Sentry project access',
'Slack channels', 'AWS IAM role',
]}},
{ name: 'First task assignment', action: 'assign_task', params: {
type: 'good-first-issue',
mentor: '{{assignedMentor}}',
}},
],
});
// Any team member can trigger the shared workflow
const execution = await rekall.procedural.triggerWorkflow({
workflowId: onboarding.id,
params: { assignedMentor: 'alice' },
context: { hiveId: hive.id },
});

Evolving workflows

When any team member suggests improvements to a shared workflow, Rekall tracks the change as a new version. Admins can review and approve changes before they take effect.

Next Steps

Rekall
rekall