Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

🌙 Dream Architect

A multi-agent AI system that transforms your dreams into psychological insights, stories, visual art prompts, and long-term pattern analysis.

Built for the Google × Kaggle AI Agents Intensive 2026 Capstone · Track: Freestyle

Kaggle Notebook YouTube Demo License: MIT Python 3.10+ Gemini 3.1 Flash Lite

What it does

You describe a dream in plain language. Four specialized AI agents work together to give you:

Agent What it produces
🔮 Symbolism Agent Psychological analysis of every symbol in your dream, grounded in Jungian psychology
📖 Story Agent Your dream rewritten as a beautiful 3-paragraph short story
🎨 Art Prompt Agent 3 ready-to-use image generation prompts (cinematic, surrealist, anime style)
🧠 Memory Agent Cross-dream pattern analysis that grows smarter with every entry

All four outputs are assembled by an Orchestrator Agent using the A2A (Agent-to-Agent) communication pattern and rendered as a rich HTML report inside the Kaggle notebook.


Demo

"I was driving a super-cool futuristic car on a wide empty highway at night, dressed in a suit, feeling like the hero of the moment — sky shining, cool and breezy, lights all around. Then I reached a wedding venue and saw my deceased maternal uncle, fully fit and fine, interacting with everyone. The moment my mind recalled he was no longer alive — I woke up."

Watch the full demo → YouTube

Run it yourself → Kaggle Notebook


Architecture

User Dream Input (plain text)
         │
         ▼
┌─────────────────────────┐
│    Orchestrator Agent   │  coordinates pipeline, handles A2A handoffs
└─────────┬───────────────┘
          │
    ┌─────┴──────────────────────────────────────┐
    │                                             │
    ▼                                             ▼
┌──────────────────┐                   ┌──────────────────┐
│  Symbolism Agent │                   │   Memory Agent   │
│  symbols, theme, │                   │  reads journal,  │
│  tone, insight   │                   │  finds patterns  │
└────────┬─────────┘                   └──────────────────┘
    passes theme+tone       passes symbols
    ▼                            ▼
┌──────────────┐      ┌──────────────────┐
│  Story Agent │      │ Art Prompt Agent │
│  3-paragraph │      │ 3 image prompts  │
│  narrative   │      │ (3 art styles)   │
└──────┬───────┘      └────────┬─────────┘
       │                       │
       └──────────┬────────────┘
                  ▼
       ┌──────────────────────┐
       │  Combined Dream      │
       │  Report (HTML)       │
       └──────────┬───────────┘
                  │
                  ▼
       ┌──────────────────────┐
       │  Dream Journal       │  ← long-term memory, persists all entries
       └──────────────────────┘

Course concepts demonstrated

This project was built as part of the Google × Kaggle AI Agents Intensive 2026 and demonstrates:

  • Multi-agent architecture — 1 Orchestrator + 4 specialist sub-agents
  • A2A communication — theme, tone, and symbols passed between agents as structured data
  • Tool use — structured JSON outputs used as inter-agent interfaces
  • Long-term memory — dream journal persists across sessions, Memory Agent reads full history
  • Session context — full journal history injected into each Memory Agent call
  • Observability — per-agent execution log with timing, session ID, and input tracking

Tech stack

  • Model: Gemini 3.5 Flash Lite
  • SDK: google-genai (Google's unified GenAI SDK)
  • Platform: Kaggle Notebooks (runs entirely in browser, no local setup needed)
  • Output: Custom HTML report rendered inline

How to run

Option 1 — Kaggle Notebook (recommended, no setup)

  1. Go to the Kaggle Notebook
  2. Click Copy & Edit
  3. Add your Gemini API key: click the 🔒 lock icon → Add secret → Name: GEMINI_API_KEY
  4. Run All cells
  5. Edit YOUR_DREAM in Cell 7 with your own dream and re-run

Option 2 — Local

git clone https://github.com/ayushman1sharma/dream-architect
cd dream-architect
pip install google-genai

Set your API key:

export GEMINI_API_KEY=your_key_here

Get a free Gemini API key at aistudio.google.com.

Then open dream_architect.py and run it. Edit the YOUR_DREAM variable at the bottom with your own dream.


Sample output

🌙 DREAM ARCHITECT — Orchestrator Starting
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📍 Step 1/4 — Symbolism Analysis
  🤖 Symbolism Agent is thinking...
  ✅ Symbolism Agent done in 7.61s

📍 Step 2/4 — Story Generation
  🤖 Story Agent is thinking...
  ✅ Story Agent done in 6.29s

📍 Step 3/4 — Art Prompt Generation
  🤖 Art Prompt Agent is thinking...
  ✅ Art Prompt Agent done in 8.45s

📍 Step 4/4 — Memory & Pattern Analysis
  🤖 Memory/Pattern Agent is thinking...
  ✅ Memory/Pattern Agent done in 1.45s

✅ All agents completed in 23.8s
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The final output is a full HTML report with dark theme, symbol cards, a short story, image prompts, pattern insights, and an agent execution trace.


Project structure

dream-architect/
├── dream_architect.py     # Complete single-file implementation
├── README.md
└── LICENSE

About

Built by AYUSHMAN SHARMA — developer, builder, lifelong learner.


License

MIT — free to use, fork, and build on.

About

Multi-agent AI system that transforms your dreams into psychological insights, stories, image prompts, and long-term pattern analysis. Built with Gemini 2.5 Flash for Google × Kaggle AI Agents 2026.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages