Logged
Your Progress
Updated every time you log a moment
/ 100
Control score
0 uses todayGoal: 5
On track
0
day streak
0
uses today
0
resisted
Agent memory — last pipeline output
No pipeline run yet. Log a moment to fire the agents.
Lily's read on you right now
🟢 Stable
Start chatting or log a moment — Lily will assess your state in real time.
Not yet assessed
⚠ Lily thinks you should talk to someone
Based on what you've shared, it might help to speak with a professional. Lily works best alongside — not instead of — real support. You don't have to do this alone.
📞 SAMHSA Helpline — free, confidential — 1-800-662-4357
How Lily works
Agentic pipeline architecture · CBT-grounded · Open source
The 4-agent pipeline
01 · User State Agent — synthesizes craving event + memory into behavioral snapshot
02 · Prediction Agent — estimates relapse probability and craving trajectory
03 · Intervention Agent — selects CBT strategy (urge surfing, reframing, substitution, nudge)
04 · Orchestrator — final decision + memory write that closes the feedback loop
Plug in your own agents
Lily exposes its pipeline via a simple JSON interface. You can swap out any agent with your own system prompt, or connect an external agent that reads and writes to the pipeline state.
// POST to Lily pipeline
{
  "craving": 8,
  "stress": 7,
  "contexts": ["After coffee", "Work pressure"],
  "memory": [...],
  "custom_agents": {
    "intervention": "your_system_prompt_here"
  }
}
See the API tab in the right panel to configure your own agents →
Clinical framing
Lily is a coaching tool, not a medical device. Interventions are grounded in CBT. Built with clinical guidance from Jana Krystofova Mike, MD (UCSF Pediatric Critical Care). For heavy use, Lily works best alongside professional support.
View on GitHub → Mobile version →
Agent pipeline status
01User State Agentidle
02Prediction Agentidle
03Intervention Agentidle
04Orchestratoridle
Last pipeline output (JSON)
Behavioral state
Current state
No pipeline run yet
Predicted risk
Last intervention
Memory log
Events will appear here as you log moments
Pipeline status
Lily's AI pipeline is managed server-side. No setup needed — just start chatting.
● Live — pipeline active
Bring your own agents
Override any agent in the pipeline with your own system prompt. Your agent receives the same structured JSON input and must return the same output schema.
User State Agent
Prediction Agent
Intervention Agent
Orchestrator Agent
Pipeline endpoint
Run the full pipeline programmatically. Send a craving event, get back structured agent outputs.
POST /api/pipeline
Content-Type: application/json

{"craving":8,"stress":7,
"contexts":["After coffee"],
"memory":[...]}