How cong-lab/crispr-gpt-pub works
Project type and purpose
• CRISPR-GPT is an open-source, agent-based Large Language Model (LLM) application for automating gene-editing experiment design.
• It orchestrates multiple agent components (Planner, Executor, User-Proxy, Tool Providers) to decompose tasks, execute protocols, interact with users, and call external bioinformatics tools/APIs.
File structure
• In this case, the only file is README.md. All structural and architectural details must be inferred from that document.
• The README describes a four-agent architecture, an optional web front-end (Gradio demo), LLM back-end (OpenAI API), and external tool integrations (Primer3, CRISPResso2, CRISPRitz, search engines, lab automation).
Key insights from the README
• Four core agents collaborate:
• LLM Planner Agent
• Task Executor Agent
• LLM User-Proxy Agent
• Tool Provider Agent(s)
• Three user modes: Meta, Auto, QA.
• External services: OpenAI API, bioinformatics tools, databases, search engines, and a demo web UI.
Main components
a. Client/User Interface
– Web front-end (Gradio or custom UI) where the user selects mode, inputs requests, and views results.
– QA panel or workflow monitor.
b. LLM Core
– Planner Agent (task decomposition & planning)
– Task Executor Agent (state-machine, instruction generation, feedback loop)
– User-Proxy Agent (mediates user corrections & monitors execution)
c. Tool Provider Layer
– A set of microservices or adapter modules wrapping external bioinformatics tools and APIs (Primer3, CRISPResso2, CRISPRitz, genomic databases, search engines)
d. External Systems
– OpenAI API or other LLM endpoints
– Bioinformatics tool servers/containers
– Databases (e.g., genomic reference, ClinVar)
– Lab automation APIs (future integration)
e. Persistence / Logging (optional)
– Experiment plans, logs, results, user corrections stored in a database or file store.
Relationships and interactions
• User → Web UI → User-Proxy Agent
• User-Proxy Agent ↔ Task Executor Agent (instructions, feedback)
• Task Executor Agent ← Planner Agent (plan + state machines)
• Task Executor Agent & User-Proxy Agent → Tool Provider(s) → External tools/APIs
• Task Executor Agent/User-Proxy Agent → Logging/DB
• All internal agents call the LLM API to generate text or parse outputs.
Architectural patterns & principles
• Agent-based microservices: each component is a distinct service or module.
• Chain-of-thought / state-machine workflows for reproducibility.
• Adapter/wrapper pattern for external tools.
• Asynchronous calls and callback loops for long-running tasks (e.g., NGS analysis).
Detailed elements
• Notes on user modes and how they alter the Planner Agent’s configuration