cognihive / README.md
vrushket's picture
Initial CogniHive demo upload
a36a494 verified

A newer version of the Gradio SDK is available: 6.8.0

Upgrade
metadata
title: CogniHive
emoji: ๐Ÿ
colorFrom: yellow
colorTo: red
sdk: gradio
sdk_version: 4.44.0
app_file: app.py
pinned: true
license: mit
short_description: Transactive Memory for Multi-Agent AI
tags:
  - multi-agent
  - memory
  - ai-agents
  - transactive-memory
  - crewai
  - autogen
  - langgraph
  - collective-intelligence
  - agent-orchestration
  - llm

๐Ÿ CogniHive

The World's First Transactive Memory for Multi-Agent AI

"Mem0 gives one agent a brain. CogniHive gives your agent team a collective mind."

GitHub stars PyPI License


๐Ÿง  The Problem No One Has Solved

Every multi-agent AI system today suffers from the same problem:

"Agents don't know what each other knows."

This leads to:

  • ๐Ÿ”„ Redundant work - Multiple agents research the same thing
  • ๐Ÿ’ฐ Token explosion - 15x more tokens wasted (Anthropic's research)
  • ๐ŸŽฒ Random routing - Questions go to the wrong agent
  • ๐Ÿคท Lost expertise - Agent A learns something, Agent B never finds out

๐Ÿ’ก The Solution: Transactive Memory

In human teams, not everyone remembers everything. Instead, teams develop "who knows what" awareness:

  • "Sarah handles legal stuff"
  • "Mike knows the technical details"
  • "Ask Jennifer about customer history"

This is called Transactive Memory Systems (TMS) โ€” proven by 40 years of cognitive science research to be the #1 predictor of team performance.

CogniHive is the FIRST implementation for AI agents.


๐ŸŽฎ Try The Demo

Tab 1: Who Knows What

Enter any topic and instantly find which agent is the expert.

Tab 2: Ask & Route

Ask a question and watch it automatically route to the right expert.

Tab 3: Memory

Store and recall team knowledge with full provenance.

Tab 4: Agents

View the expertise matrix across your entire agent team.


โšก Quick Start

pip install cognihive
from cognihive import Hive

# Create a hive
hive = Hive()

# Register specialized agents
hive.register_agent("coder", expertise=["python", "javascript"])
hive.register_agent("analyst", expertise=["sql", "data"])
hive.register_agent("writer", expertise=["docs", "tutorials"])

# Store team knowledge
hive.remember(
    "Use connection pooling for 3x database throughput",
    agent="analyst",
    topics=["database", "performance"]
)

# THE KEY INNOVATION: "Who Knows What"
experts = hive.who_knows("database optimization")
# Returns: [("analyst", 0.92), ("coder", 0.45)]

# Automatic routing to experts
result = hive.ask("How do I improve query performance?")
print(f"Routed to: {result['expert']}")  # โ†’ "analyst"

๐Ÿ”— Works With Your Stack

Framework Integration Status
CrewAI CrewAIHive โœ… Ready
AutoGen AutoGenHive โœ… Ready
LangGraph LangGraphHive โœ… Ready
# CrewAI Example
from cognihive.integrations import CrewAIHive

hive = CrewAIHive()
researcher = Agent(role="Researcher", memory=hive.agent_memory("researcher"))
writer = Agent(role="Writer", memory=hive.agent_memory("writer"))
# Now they share transactive memory!

๐Ÿ“Š Why This Matters

Metric Without CogniHive With CogniHive
Token usage 15x baseline 1x baseline
Query routing Random/manual Automatic
Team coordination Chaos Structured
Knowledge sharing None Full provenance

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                   CogniHive Core                     โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚         TRANSACTIVE MEMORY INDEX              โ”‚  โ”‚
โ”‚  โ”‚   "Who Knows What" - The Key Innovation       โ”‚  โ”‚
โ”‚  โ”‚                                               โ”‚  โ”‚
โ”‚  โ”‚   Coder: python(0.9), api(0.7), testing(0.8)โ”‚  โ”‚
โ”‚  โ”‚   Analyst: sql(0.95), data(0.85)             โ”‚  โ”‚
โ”‚  โ”‚   Writer: docs(0.9), tutorials(0.8)          โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚                        โ†“                             โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚            EXPERTISE ROUTER                   โ”‚  โ”‚
โ”‚  โ”‚   Query โ†’ Best Expert โ†’ Relevant Memories     โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐ŸŒŸ Features

  • ๐Ÿ” Who Knows What - Instantly find domain experts
  • ๐ŸŽฏ Smart Routing - Auto-route queries to the right agent
  • ๐Ÿ” Access Control - Private, shared, and team memories
  • ๐Ÿ“ Provenance - Track where knowledge came from
  • โš”๏ธ Conflict Resolution - Handle contradicting information
  • ๐Ÿ”Œ Integrations - CrewAI, AutoGen, LangGraph ready

๐Ÿ“š Research Background

CogniHive is backed by:

  • Wegner (1985) - Original Transactive Memory Systems theory
  • Anthropic (2025) - Multi-agent coordination research showing 15x token overhead
  • Stanford (2023) - Generative Agents memory architecture
  • LLM-MAS Survey (2025) - Identified "who knows what" as critical missing capability

๐Ÿš€ Get Started

pip install cognihive

Built for the multi-agent AI revolution ๐Ÿ

Star us on GitHub if you find this useful!