Selected work02 / 06

DAEMON

Multi-agent LLM system coupled with mechanistic ODE simulations for autonomous scientific discovery. Agents explore parameter spaces on digital twins and produce human-readable hypotheses with Bayesian evidence tracking.

Date
March 2025
Disciplines
AI Agents, Scientific Discovery, Simulation, Python
DAEMON system architecture: principal investigator, web layer, orchestrator discovery cycle, five agents, and knowledge base, simulation and LLM servicesPrincipal investigatorResearch questions, interventions, parameter restrictions, monitoringWeb layerFastAPI, Next.js, SSESession dashboardReal-time agent activityHypothesis panelEvidence chains and scoresExperiment logParameters and resultsConvergence metricsCycle progressSSE streamOrchestratorPython, asyncioQuestionProposeExecuteObserveUpdateConveneConverged?discovery cycle, repeats until convergeddispatchAgent systemindependent beliefsScoutBreadth-first explorerRefinerDepth-first optimizerAuditorQuality verificationConservativeRisk validationMonitorPI proxy / observerServicesKnowledge baseSQLite, full provenancesessionscyclesagentsexperimentshypothesesboard_postsnotebook_entriesmonitor_flagsagent_questionsHypothesis confidence (Bayesian)retire < 0.2accept ≥ 0.9Simulation9-state ODE, SciPy BDFSimulationInterfaceabstract base class (ABC)lyo-mech-model20 parameters, trajectories, CQAsLLM providersper-agent model configAnthropicClaude APIOpenRouterGemini FlashZero silent fallbacksAll failures surface immediately

Context

Lyophilization (freeze-drying) of LNP/mRNA formulations is a process with a large parameter space, expensive lab runs, and poorly understood process-quality relationships. Pure ML approaches can fit the data but produce opaque models. The goal with DAEMON was to build a system that generates explicit, testable hypotheses rather than black-box predictions.

DAEMON stands for Discovery Agents Exploring Mechanistic ODE Networks. It was developed at the University of Massachusetts Lowell Department of Chemical Engineering.

Knowledge baseSQLiteScoutRefinerAuditorConservativeMonitorSimulation9-state ODE
Illustration
01System architecture: agents, simulation backend, knowledge base
ProposeExecuteObserveUpdateConvergedone turn per cycle
Illustration
02Propose-execute-observe-update discovery loop

Architecture

Five specialized agents (Scout, Refiner, Auditor, Conservative, Monitor) each maintain independent belief states and use different scientific reasoning strategies to propose experiments. They share a SQLite-backed knowledge base where hypotheses are tracked with Bayesian confidence scoring. The agents cooperate rather than compete: they review each other's conclusions, identify knowledge gaps, and flag contradictory evidence before the system declares convergence.

The simulation backend is a 9-state ODE model of the lyophilization process, tracking product temperature, ice thickness, chamber pressure, moisture, potency, cake resistance, encapsulation efficiency, RNA integrity, and particle size. Agents design and run experiments on this digital twin, then interpret the results against their current hypothesis set.

ScoutRefinerAuditorConservativeMonitorearlier versionsHypothesisconfidence
Illustration
01Agent hypothesis refinement through cooperative debate
agentsexperimentsevidencehypothesesconfidenceretire < 0.2accept ≥ 0.9
Illustration
02SQLite-backed hypothesis store with Bayesian confidence tracking

Monitoring Interface

The web layer is FastAPI (backend) + Next.js with shadcn/ui (frontend). Sessions stream in real time over SSE so a human PI can observe the discovery process and intervene when needed. The dashboard shows live agent activity, hypothesis evolution, experiment logs, and convergence metrics.

Agent activityScoutRefinerAuditorConservativeMonitorHypothesesConvergencelive
Illustration
01Real-time session monitoring dashboard
Illustration
02Hypothesis panel with evidence chains and confidence scores
Illustration
03Experiment log with parameter sets and simulation results

Stack

LayerDetail
Agents / OrchestratorPython, Anthropic API, OpenRouter
Simulation9-state ODE kernel (lyo-mech-model submodule), SciPy solve_ivp, BDF method
Knowledge BaseSQLite, Bayesian hypothesis tracking, auto-accept >= 0.9, auto-retire < 0.2
BackendFastAPI, SSE streaming, asyncio with thread-offloaded SQLite
FrontendNext.js 14, shadcn/ui, Tailwind CSS, Recharts
Agent RolesScout (exploration), Refiner (optimization), Auditor (verification), Conservative (risk), Monitor (convergence)
ReliabilityZero silent fallbacks. All LLM and simulation failures surface immediately.

Design Decisions

This system is intended for pharmaceutical manufacturing contexts, so reliability constraints are strict. There are no silent fallbacks anywhere in the stack. If an LLM call fails or the simulation returns an error, the system surfaces it immediately rather than degrading to a heuristic. In life-critical applications, silent degradation is worse than a visible failure.

The discovery loop follows a structured cycle: propose, execute, observe, update, converge. Each cycle produces traceable artifacts. A researcher can read any hypothesis, follow its evidence chain back to specific simulation runs, and evaluate whether the reasoning holds.

confidencecyclesaccept ≥ 0.9retire < 0.2
Illustration
01Discovery session output: hypotheses, evidence, confidence over time
convergence metricsconverged? checked every cycleYescycles
Illustration
02Convergence metrics across discovery cycles

Next project

Manifest Labor

Multi-modal motion capture pipeline for skilled trade demonstrations, structured for humanoid robot training. Targeting the gap between lab-demo training data and real-world construction work.