🧠 Inspiration

Mobile app development is often slowed by the disconnect between product thinking and engineering execution. Ideas get stuck in backlogs, specs go stale, and context is lost in handoffs.

We asked: What if AI could eliminate that gap — by acting as both PM and engineer in sync?

TwinStack was born from this idea: a pair of intelligent agents — one thinking like a Product Manager, the other like a Software Engineer — collaborating to take ideas from thought to deploy in minutes, not weeks.


⚙️ What It Does

TwinStack is an AI-powered duo that helps you go from product vision to working mobile code — all through natural language.

  • 🧑‍💼 PM Agent breaks down high-level goals, identifies missing requirements, and asks clarifying questions
  • 👩‍💻 SWE Agent responds with full-stack architecture, code snippets, and UI components using React Native

Together, they simulate real-world product–engineering collaboration — instantly and interactively.


🧰 Technology & Architecture

Layer Stack Role
AI Agents Letta AI SDK Powers the PM and SWE agents with memory, persona, and coordination
Backend Flask Routes messages and maintains agent workflows
Frontend Next.js + React (deployed on Vercel) Sleek, real-time chat interface for user interactions
Agent Memory Letta Memory Blocks Shares structured context and keeps agents aligned
Experimentation Letta .text / .reasoning Fine-tuned agent response parsing and orchestration
App Output React Native / Flutter Generates starter code and UI components

🛠️ How We Built It

  • Built two stateful AI agents using the Letta AI SDK with distinct personas
  • Used Flask to create a lightweight backend API and manage chat routing
  • Designed a Next.js frontend for intuitive real-time interactions
  • Enabled context-sharing and multi-turn memory between agents to ensure alignment and coherence

🧗 Challenges We Ran Into

  • Agent state drift: The SWE agent would occasionally misinterpret the PM agent’s plan — solved through improved memory synchronization
  • Multi-turn clarity: Ensuring agents stayed in character and retained roles across turns required thoughtful orchestration
  • Letta SDK quirks: Understanding the nuances between .text and .reasoning fields took experimentation and tuning

🏆 Accomplishments We’re Proud Of

  • Engineered a dual-agent system using Letta SDK that models real-world PM–SWE collaboration through asynchronous, role-aware communication
  • Implemented stateful memory orchestration across agents, preserving long-term conversational coherence and enabling context-dependent reasoning
  • Applied state-of-the-art agentic architectural patterns, decoupling responsibilities into task-specific micro-agents with composable behaviors and message-passing over a lightweight coordination layer

📚 What We Learned

  • Prompt engineering is a necessary surface-level interface, but robust agent behavior requires well-structured memory hierarchies, goal decomposition strategies, and stateful control loops
  • Multi-agent collaboration mirrors distributed systems coordination, where role-specialized agents operate as loosely coupled services communicating via shared context and intent propagation
  • Clarifying user intent before generation improves output reliability and reduces common issues like incomplete logic or incorrect code structure

🚀 What’s Next for TwinStack

  1. Add streaming responses for smoother real-time chat
  2. Implement persistent sessions so users can return to projects later
  3. Let the SWE agent execute and validate code in a sandboxed environment
  4. Integrate with GitHub, Figma, and Expo Go for full-cycle app workflows
  5. Evolve TwinStack into a plugin-based AI coworker for product and dev teams

Built With

Share this project:

Updates