Agent Pipeline Architecture
When you log a craving, Lily fires a 4-agent pipeline. Each agent makes an independent cloud LLM call with structured JSON inputs and outputs, passing state forward. The Orchestrator closes the feedback loop by writing a memory update that improves future interventions.
USER INPUT → User State Agent → Prediction Agent → Intervention Agent → Orchestrator Agent → ACTION OUTPUT
↓
memory write
↓
feeds back to User State Agent on next call
Powered by: Llama 3.3-70B via Groq (server-side — no API key needed)
Limitations
We believe in being honest about what doesn't work yet. These are the known limitations of the current version.
Roadmap
Connect your OpenClaw agent
Lily is fully compatible with OpenClaw — the open-source personal AI assistant framework. Deploy Lily as a coaching agent on any channel you already use: WhatsApp, Telegram, iMessage, Slack, Discord, or SMS.
Step 1 — Install OpenClaw
npm install -g openclaw@latest openclaw onboard
Step 2 — Add Lily as an agent
openclaw agents add --from https://raw.githubusercontent.com/denihoxh/lily-app/main/SOUL.md
Step 3 — Install the Lily pipeline skill
openclaw skills add https://raw.githubusercontent.com/denihoxh/lily-app/main/SKILL.md
Step 4 — Start the gateway
openclaw gateway:watch
Once running, Lily will respond to craving events on any connected channel and maintain behavioral memory across sessions.
Any agent framework (LangChain, CrewAI, AutoGen) can call Lily's pipeline directly as a REST API.
POST https://lily-app-xi.vercel.app/api/pipeline
Content-Type: application/json
{
"craving": 8,
"stress": 7,
"contexts": ["After coffee"],
"memory": ["Prior event logs..."]
}
See AGENT_INTEGRATION.md for full examples with LangChain, CrewAI, AutoGen, and raw Python.
Clinical Framing
Interventions are grounded in Cognitive Behavioral Therapy (CBT) techniques. Heavy users are flagged at onboarding and encouraged to supplement Lily with professional support. The system escalates to professional support suggestions when users express severe distress.
Clinical framing informed by Jana Krystofova Mike, MD — Pediatric Critical Care, UCSF; published researcher in agentic AI for clinical intervention.
Team
MAS.664 AI for Impact · MIT Media Lab & MIT Sloan · Spring 2026