A creative AI system that thinks beyond its training data through autonomous graph exploration and cross-domain reasoning
Genesis is an experimental creative AI system that combines the power of Large Language Models (Claude) with graph databases (Neo4j) to enable genuine creative problem-solving. Unlike traditional AI systems that rely solely on parametric knowledge, Genesis builds and explores a self-managed long-term memory that enables:
- 🎨 Analogical Reasoning: Find structural similarities across completely different domains
- 🌉 Cross-Domain Exploration: Bridge ideas from biology to engineering, art to computer science
- 🔓 Constraint Relaxation: Break free from obvious solutions by temporarily removing limitations
- 🎲 Serendipitous Discovery: Use random walks to stumble upon unexpected connections
- 🧠 Persistent Memory: Build knowledge that grows and compounds across sessions
Current AI systems excel at tasks within their training distribution but struggle with genuine creativity:
- Limited to Known Patterns: LLMs can only recombine what they've seen before
- No Long-Term Memory: Each conversation starts from scratch
- Domain-Bound Thinking: Solutions tend to stay within the problem's original domain
- Constraint-Locked: Struggle to question fundamental assumptions
Genesis addresses these limitations by treating creativity as a graph exploration problem:
- Seed from Parametric Knowledge: Start with Claude's extensive training
- Externalize to Graph: Convert concepts and relationships into a queryable structure
- Explore Autonomously: Let the AI randomly walk, bridge domains, and relax constraints
- Discover Emergent Insights: Find connections that weren't explicitly in the training data
- Compound Over Time: Each session enriches the graph for future exploration
Genesis can tackle problems like:
- Innovation: "How can we make batteries last 10x longer?" → Discovers bio-inspired hibernation strategies
- Design: "Create a novel user interface paradigm" → Blends concepts from musical composition and urban planning
- Research: "Find unexplored angles in cancer immunotherapy" → Bridges insights from plant immunity and network security
- Education: "Explain quantum computing" → Builds analogies from orchestras, traffic systems, and democratic voting
┌─────────────────────────────────────────────────────────────┐
│ Claude LLM │
│ (Short-term Memory) │
│ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Parametric Knowledge + Current Conversation │ │
│ └──────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Creative Exploration Tools │ │
│ │ • seed_graph_from_hypothesis │ │
│ │ • random_walk │ │
│ │ • cross_domain_bridge │ │
│ │ • relax_constraint │ │
│ │ • analogical_search │ │
│ │ • conceptual_blend │ │
│ │ • query_graph │ │
│ │ • add_to_graph │ │
│ └──────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Neo4j Graph Database │
│ (Long-term Memory) │
│ │
│ Concepts ─[RELATES_TO]→ Concepts │
│ │ │
│ └─[ANALOGOUS_TO]→ Analogies │
│ │ │
│ └─[CROSS_DOMAIN]→ Other Domains │
│ │
│ Problems ←[CONSTRAINS]─ Constraints │
│ │ │
│ └─[ENABLES]→ Solutions │
└─────────────────────────────────────────────────────────────┘
- Graph-Based Memory: Neo4j as long-term knowledge storage
- Creative Tools:
- Random walks for serendipitous discovery
- Cross-domain bridges for analogical thinking
- Constraint relaxation for expanding solution spaces
- Conceptual blending for novel ideas
- Analogical search across domains
- Autonomous Exploration: Claude manages its own exploration strategy
- Persistent Knowledge: Graph persists across sessions
src/
├── index.ts # Main entry point
├── orchestrator.ts # Creative session coordinator
├── tool-executor.ts # Tool execution dispatcher
├── types.ts # TypeScript type definitions
├── claude/
│ ├── client.ts # Anthropic API wrapper
│ └── tools.ts # Tool definitions for Claude
├── graph/
│ ├── neo4j-client.ts # Neo4j connection & queries
│ └── seeding.ts # Graph seeding from LLM knowledge
└── creative-tools/
├── random-walk.ts # Random graph traversal
├── cross-domain.ts # Cross-domain bridge finding
├── constraint-relax.ts # Constraint relaxation
├── analogical.ts # Analogical reasoning
└── conceptual-blend.ts # Conceptual blending
Complete setup guide: See SETUP.md
# 1. Start Neo4j with Docker
npm run neo4j:start
# 2. Configure your API key
cp .env.example .env
# Edit .env and add your ANTHROPIC_API_KEY
# 3. Run Genesis
npm startnpm run neo4j:startUses docker-compose.yml to start Neo4j automatically.
- Download Neo4j Desktop
- Create and start a database
- Update
.envwith credentials
- Sign up at Neo4j Aura
- Create free instance
- Update
.envwith connection string
Run with the default problem:
npm startProvide your own problem as command-line arguments:
npm start "How can we reduce plastic waste in oceans?"Start fresh by clearing the database:
npm start "Your problem here" --clearWatch for changes:
npm run devStart Neo4j:
npm run neo4j:startStop Neo4j:
npm run neo4j:stopCheck if running:
npm run neo4j:checkAccess Neo4j Browser at http://localhost:7474
- Username:
neo4j - Password:
password
After each session, a detailed markdown report is saved:
# List all reports
npm run reports
# Open reports directory in Finder
npm run reports:openReports include:
- Problem statement and timing
- Graph statistics
- Complete exploration journey (all tool calls)
- Tool usage summary
- Final creative insights
Reports are saved to: ~/tmp/genesis-reports/
See example-report.md for a sample report.
Genesis uses a dual-model approach for optimal performance:
- 🚀 Claude Haiku 4.5 - Fast extractions and data processing
- 🧠 Claude Sonnet 4.5 - Deep reasoning and creative synthesis
- Seeding Phase: Claude extracts relevant concepts from its parametric knowledge and creates initial graph structure
- Exploration Phase: Claude autonomously explores using creative tools:
- Takes random walks to discover unexpected connections
- Finds cross-domain bridges for analogical thinking
- Relaxes constraints to expand solution spaces
- Blends concepts to create novel ideas
- Synthesis Phase: Claude synthesizes findings into 3-5 novel, actionable approaches
npm start "How can we make batteries last 10x longer?"Expected output:
- Seeds graph with concepts: batteries, energy storage, chemistry, etc.
- Random walks discover: hibernation, capacitors, regenerative braking
- Cross-domain finds: tardigrade survival mechanisms, data compression
- Synthesizes novel ideas: "biological hibernation for batteries", "energy compression", etc.
- Concept: Core knowledge concepts
- Properties: name, description, domain, source, confidence
- Problem: Problem definitions
- Properties: id, description, constraints
- Solution: Potential solutions
- Properties: description, domain
- Analogy: Analogical relationships
- Properties: from_concept, to_concept, structural_similarity
- Constraint: Problem constraints
- Properties: description, type, parent_problem
RELATES_TO: General relationships between concepts (strength, reasoning)ANALOGOUS_TO: Analogical relationships (structural_pattern)CROSS_DOMAIN: Cross-domain connections (from_domain, to_domain)CONSTRAINS: Constraint → Concept (what the constraint limits)ADDRESSES: Solution → Concept (what problem/concept the solution addresses)ENABLES: Enabling relationshipsOPPOSES: Opposing relationships
Note: The system automatically connects orphaned nodes to prevent isolated components in the graph.
Genesis uses two models for optimal cost/performance:
- Sonnet 4.5 (
claude-sonnet-4-5-20241022) - Creative reasoning - Haiku 4.5 (
claude-haiku-4-5-20251001) - Fast extractions
To change models, edit src/orchestrator.ts:
const REASONING_MODEL = "claude-sonnet-4-5"; // Line 14And src/claude/client.ts:
constructor(apiKey: string, model: string = "claude-haiku-4-5-20251001") // Line 11You can customize session behavior in orchestrator.ts:
const config = {
max_turns: 15, // Maximum exploration turns
temperature: 0.7, // Randomness in exploration
enable_random_walks: true, // Enable random walks
enable_cross_domain: true, // Enable cross-domain search
log_level: "info", // Logging verbosity
};- seed_graph_from_hypothesis: Bootstrap knowledge graph
- random_walk: Explore graph randomly
- cross_domain_bridge: Find analogies in different domains
- relax_constraint: Remove constraints to explore new solutions
- analogical_search: Find similar problem structures
- conceptual_blend: Combine concepts creatively
- query_graph: Execute custom Cypher queries
- add_to_graph: Add new discoveries to graph
src/claude/: Claude API integrationsrc/graph/: Neo4j database integrationsrc/creative-tools/: Creative exploration toolssrc/types.ts: TypeScript type definitionssrc/orchestrator.ts: Main session orchestrationsrc/tool-executor.ts: Tool execution logic
- Create tool implementation in
src/creative-tools/ - Add tool definition to
src/claude/tools.ts - Add case to
src/tool-executor.ts
- Verify Neo4j is running
- Check connection URI and credentials in
.env - Ensure firewall allows connection to Neo4j port
- Verify your API key is correct
- Check you have available credits
- Ensure you're using a supported model
- Try clearing the database with
--clearflag - Verify Neo4j version compatibility (5.x recommended)
MIT
Contributions welcome! Please open an issue or PR.