⬡ Inspiration
Traditional drug discovery takes over a decade and costs billions. Repurposing shortens this path, but the number of possible chemical combinations is astronomical. We designed PharmaFuture 2050 to automate this exploration through an autonomous virtual laboratory, where specialized AI agents simulate a scientific committee that evolves molecular hypotheses at the speed of light.
⬡ What it does
The user enters a target disease, and a multi-agent cluster executes a real-time evolutionary loop:
- Generator: Proposes a novel chemical combination.
- Critic: Evaluates biomedical consistency and rules out risks.
- Ranker & Evolver: Score the hypothesis using a fitness score and refine the mechanism.
- Meta: Determines whether the cycle continues or consolidates.
The system features a Command Center that displays live metrics and convergence graphs. Once the viability threshold is cleared (fitness ≥ 0.80), the Paper Generator extracts the data from the database to structure an academic manuscript ready for download in Markdown format, complete with its BibTeX citation.
⬡ How we built it
- AI Core: Multi-agent pipeline using
qwen/qwen-2.5-7b-instructvia OpenRouter (DashScope backend). - Database: Supabase (PostgreSQL) with Realtime channels to stream
evolution_logslive directly to the interface's terminal. - Frontend: Developed on TanStack React Start for strongly-typed server functions, Framer Motion, and Recharts, deployed on Vercel.
- Resilience: Fault-tolerance layer featuring
AbortController(45s timeouts), exponential backoff retries, and strict JSON schema validation using Zod.
⬡ Challenges we ran into
- Silent DB Locks: Hidden triggers and legacy schema mismatches were aborting transactions. We resolved this by cleaning up obsolete constraints on the
hypothesestable and forcing explicit exceptions with.throwOnError(). - Prose in JSON Responses: Open-source models tended to include explanatory conversational text outside the JSON block. We implemented robust capture using regular expressions and native fallback structures in Zod.
- Interface State Mismatch: Valid hypotheses were successfully saved to the database but did not increment the visual scoreboard. We discovered that the frontend was strictly filtering by the linguistic state
'published', so we aligned the final mutation on the backend.
⬡ Accomplishments that we're proud of
- Perfect Fitness Convergence: We achieved a perfect 1.000 fitness score live, autonomously consolidating a real synergistic combination of Aspirin and Metformin for Chronic Inflammatory Diseases.
- Full Cluster Resilience: If an AI node experiences throttling or a timeout, the orchestrator logs the error in the system but does not interrupt the user's evolutionary flow.
- Dynamic Coupling: Successfully connecting raw LLM processing directly to the automatic generation of real, downloadable scientific literature.
⬡ What we learned
- Runtime Validation: In concurrent multi-agent architectures, validating data integrity with Zod before touching the database is mandatory to prevent state corruption.
- Control Over Prototyping: Visual tools accelerate frontend design, but production success ultimately depends on surgical control over your physical database schemas.
⬡ What's next for Pharma Loop Engineering
- Biomedical Knowledge Graphs: Connecting the Critic agent with real clinical databases (such as PrimeKG) to cross-reference proposed combinations with validated genetic interactions.
- Native PDF Compilation: Integrating support for direct PDF exports with advanced academic formatting and LaTeX equation support.
Built With
- alibabacloud
- python
- qwen

Log in or sign up for Devpost to join the conversation.