Spaces:
Sleeping
Sleeping
Commit History
-
feat: SPEC_15 Advanced Mode Performance Optimization (#101)β
Unverified signatureSPEC_15 Advanced Mode Performance Optimization + CodeRabbit fixes3cb2e43 -
fix(SPEC_11): address CodeRabbit review feedback (#92)β
Unverified signature* fix(SPEC_11): address CodeRabbit review feedback - Update run_full.py docstring to reference sexual health pipeline (not drug repurposing) - Update run_full.py help text to use sexual health query example - Fix app.py domain display to show "Sexual Health" (not "Sexual_Health") - Update test_nodes.py mock data to use sexual health terms (Testosterone, Androgen Receptor) - Add @pytest.mark.unit markers to test_judges.py test classes - Add specific assertion for next_search_queries in test_judges.py - Add missing @pytest.mark.asyncio marker to test_mcp_tools.py - Update test_mcp_tools.py and test_clinicaltrials.py to use sexual health queries - Fix SPEC_12 markdown bare code fence (MD040) * fix(SPEC_11): comprehensive domain alignment audit Second pass of CodeRabbit review fixes - found additional domain mismatches: - examples/search_demo/run_search.py: Update docstring from "drug repurposing" to "sexual health" - examples/orchestrator_demo/run_agent.py: Update help text from "metfβ¦89f1173 -
feat(SPEC_11): finalize transition to Sexual Health Research Specialistβ
This commit completes the transition of DeepBoner to a dedicated Sexual Health Research Agent by removing all references to "general" and "drug repurposing" domains. Key changes include: - Updated domain defaults to exclusively use "sexual_health". - Replaced all example queries and documentation to reflect a focus on sexual health topics. - Removed any lingering references to non-sexual health concepts in code and tests. - Ensured all tests are aligned with the new domain focus, passing successfully. This change reinforces the project's identity and simplifies the codebase, enhancing clarity and usability for users focused on sexual health research. Closes #89.fa696e8 -
feat: SPEC_10 - Domain-Agnostic Refactor + License Fix (#87)β
Unverified signature* feat: implement SPEC_10 domain-agnostic refactor * fix: complete SPEC_10 audit - license + HierarchicalOrchestrator domain License Fixes: - LICENSE: Fix copyright "Antibody Training Pipeline ESM" β "DeepBoner Contributors" - pyproject.toml: Add missing license = "Apache-2.0" field - README.md: Fix frontmatter license: mit β apache-2.0 Domain Threading Fixes: - hierarchical.py: Add domain param to __init__ and pass to ResearchTeam - factory.py: Pass domain to HierarchicalOrchestrator All 237 tests pass. Domain now properly threaded through all orchestrators. * test: enhance domain handling in orchestrators and judges - Updated unit tests for `configure_orchestrator` to include mock mode and free tier scenarios, ensuring the domain is correctly passed to handlers. - Refactored tests for `JudgeHandler` to mock model retrieval, allowing for domain acceptance without API key requirements. - Improved `AdvancedOrchestrator` tests to mock API key validation and ensure domain handling iβ¦fd1472e -
feat: Wire LlamaIndex RAG into Simple Mode (Tiered Embedding) (#83)β
Unverified signature* feat: wire LlamaIndex RAG service into embedding infrastructure This PR implements tiered embedding service selection per NEXT_TASK.md: ## Changes - Add EmbeddingServiceProtocol (embedding_protocol.py) for unified interface - Add async wrappers to LlamaIndexRAGService (add_evidence, search_similar, deduplicate) - Update service_loader.py with get_embedding_service() factory method - Update ResearchMemory to use service_loader instead of direct EmbeddingService - Update orchestrators to use EmbeddingServiceProtocol type hints ## Design Patterns Applied - Strategy Pattern: Tiered service selection (LlamaIndex or local) - Factory Method: get_embedding_service() creates appropriate service - Protocol Pattern: Structural typing for service interface - Dependency Injection: ResearchMemory accepts any protocol-compatible service ## Tiered Selection - Premium tier (OPENAI_API_KEY present): LlamaIndexRAGService with: - OpenAI embeddings (text-embedding-3-small) - Persistent ChromaDB sβ¦7baf8ba
-
fix: add future annotations to workflow.py for runtime type compatibilityβ
The string annotation "BaseCheckpointSaver[Any]" | None failed at runtime because Python can't use | with string literals. Adding `from __future__ import annotations` makes all annotations strings evaluated lazily, fixing the TypeError. Also removed now-unnecessary quotes per ruff UP037.586a3f1 -
feat(SPEC-08): Integrate shared memory layer + CodeRabbit fixes (#74)β
Unverified signature## Summary - SPEC-08: Shared memory layer integration - CodeRabbit critical fix: async add_evidence() with proper deduplication - Security: Fixed CVEs in langgraph-checkpoint and urllib3 - CI: Hardened to fail on security vulnerabilities - Docstrings: 80%+ coverage All 178 tests pass. No known vulnerabilities.e0c585c -
fix: implement proper hypothesis conversion in synthesize_nodeβ
The previous implementation left hypotheses=[] in synthesize_node with a comment "Relies on evidence for now as state mapping is complex". This fix: - Adds _convert_hypothesis_to_mechanism() helper function - Properly converts state Hypothesis β MechanismHypothesis - Parses "drug -> target -> pathway -> effect" format back to fields - Enables report generation to use generated hypotheses The conversion is actually straightforward - parse the statement format and map supporting/contradicting evidence IDs.7719726 -
feat: Enhance research workflow with embedding service integrationβ
- Updated graph nodes to accept an optional EmbeddingService for improved evidence handling and deduplication. - Refactored search, judge, resolve, and synthesize nodes to utilize the embedding service for enhanced functionality. - Modified the research graph creation to bind the embedding service to worker nodes, ensuring seamless integration. - Added logging for better traceability during node execution. - Expanded unit and integration tests to cover new embedding service interactions and ensure robust functionality.f160233 -
feat: Integrate LangGraph for enhanced research orchestrationβ
- Added LangGraph dependencies to pyproject.toml and uv.lock for improved state management and orchestration capabilities. - Implemented LangGraph-based orchestrator in src/orchestrators/langgraph_orchestrator.py, enabling structured research workflows. - Developed graph nodes and state management in src/agents/graph, including search, judge, and synthesis functionalities. - Updated app.py to support new "god" mode for advanced orchestration. - Enhanced documentation for active bugs and architectural gaps related to LangGraph integration. - Added unit and integration tests to ensure functionality and reliability of the new features.a820b5b -
refactor: Organize orchestrators into dedicated packageβ
Claude- Create src/orchestrators/ package with proper module structure - base.py: Shared protocols (SearchHandlerProtocol, JudgeHandlerProtocol) - simple.py: Basic search-judge loop orchestrator (was orchestrator.py) - advanced.py: Multi-agent MS Agent Framework orchestrator (was orchestrator_magentic.py) - hierarchical.py: Sub-iteration middleware orchestrator - factory.py: Factory pattern for orchestrator creation - __init__.py: Clean public API with facade pattern Design principles applied: - Single Responsibility (SRP): Each file has one clear job - Interface Segregation (ISP): Protocols in base.py - Factory Pattern (GoF): Centralized creation logic - Facade Pattern: Clean public imports via __init__.py All imports updated across: - src/app.py, src/agents/ - tests/unit/, tests/e2e/, tests/integration/ - examples/orchestrator_demo/ All 147 tests pass, linting and typecheck clean.e82d9c9 -
fix: P0/P1/P2 - Gradio crash, UX improvements, thinking state (#61)β
Unverified signature* fix: handle None parameters from Gradio example caching (P0) Root cause: Gradio passes None for missing example columns during startup caching, overriding Python default values. Line 131 called .strip() on None, crashing the HuggingFace Space. Fix: Add defensive None handling before .strip(): api_key_str = api_key or "" api_key_state_str = api_key_state or "" Added tests to prevent regression. * fix: multiple UX improvements (P1 bugs) 1. HSDD acronym spelled out (Hypoactive Sexual Desire Disorder) 2. Added loading indicator ("Processing...") for immediate feedback 3. Removed temperature settings from magentic agents for reasoning model compatibility (o3, o1 only support temperature=1) 4. Bug report documenting remaining issues (API key persistence) 140 tests passing. * fix: enhance UX with "thinking" state and API key persistence 1. Added a "thinking" state yield before blocking calls in Magentic orchestrator to improve user feedback during long processing times. 2. Upβ¦6b5e05b
-
feat: add hierarchical orchestration with web search (integrates PR #44) (#46)β
Unverified signature* feat: add hierarchical orchestration with web search (from PR #44) Based on contribution by @EmployeeNo427 with fixes: New features: - WebSearchTool using DuckDuckGo for web searches - SubIterationMiddleware for research loop pattern - HierarchicalOrchestrator with judge-based refinement - RetrievalAgent for web-based evidence gathering - CodeExecutorAgent for Modal sandbox execution - LLMSubIterationJudge for LLM-based assessment - src/state/ package for state management Fixes applied: - Added chroma_db/ to .gitignore (was committed as binaries) - Added structlog logging per coding guidelines - Added pytest markers to new tests - Fixed silent exception swallowing in orchestrator - Preserved dual-mode architecture from PR #45 - Added "web" to SourceName type - Fixed mypy type errors Co-authored-by: EmployeeNo427 <45109567+EmployeeNo427@users.noreply.github.com> * fix: resolve mypy type errors in middleware and agents * fix: remove type argument from SubIterationTeam --------- β¦20f762e -
fix(magentic): defensive text extraction & cleanup biorxiv refsβ
Add _extract_text to fix ChatMessage object output bug. Update bioRxiv strings to Europe PMC. Add regression test.3bfd42c -
refactor(tools): replace BioRxiv with Europe PMC (Phase 01)β
Replaced broken BioRxivTool with EuropePMCTool which supports keyword search. Updated all agents, MCP tools, and examples to use the new tool. Deleted legacy BioRxiv implementation.2f8ae1f -
docs: add P0 blockers documentation for Magentic mode implementationβ
- Introduced a new markdown document outlining critical blockers in the Magentic mode implementation. - Highlighted issues such as hardcoded OpenAI models, dependency source ambiguity, and the lack of a "Free Tier" for users. - Provided detailed impacts and required fixes for each identified issue to ensure a stable deployment. This documentation aims to facilitate resolution of critical issues and improve the overall user experience in Magentic mode.c2f7da2 -
feat: implement Magentic ChatAgent pattern with semantic state managementβ
- Add src/agents/state.py: Thread-safe MagenticState with contextvars - Evidence store for structured citation access - EmbeddingService integration for semantic deduplication - Add src/agents/tools.py: AIFunction tools that update shared state - search_pubmed, search_clinical_trials, search_preprints - get_bibliography for ReportAgent citations - Tools return strings to LLM AND update state - Add src/agents/magentic_agents.py: ChatAgent factories - SearchAgent with search tools - JudgeAgent, HypothesisAgent, ReportAgent - Each agent has internal OpenAIChatClient - Update src/orchestrator_magentic.py: Use ChatAgent pattern - Initialize MagenticState at workflow start - Properly stream events from MagenticBuilder - Fix type errors for pre-commit mypy compatibility Implements Phase 5 spec for correct Microsoft Agent Framework integration.645a051
-
feat: implement phase 13 modal pipeline integration
7cc8b69 -
refactor: address final CodeRabbit feedbackβ
- Fix Windows path escaping in verify_sandbox.py using .as_posix() - Improve verdict detection with robust regex matching (avoid false positives) - Wire allow_network parameter to Modal sandbox block_network - Add finally block for sandbox resource cleanup - Use lru_cache for thread-safe singleton pattern - Add OpenAI-only note to LlamaIndexRAGService docstringb50fffd -
refactor: address CodeRabbit review feedback for Mario integrationβ
CRITICAL fix: - Centralize sandbox library versions (SANDBOX_LIBRARIES constant) - Use shared config for both Modal image and LLM prompts - Prevent version mismatch between generated code and execution MAJOR fixes: - Use run_in_executor() for blocking Modal calls in async context - Lazy initialize code executor to avoid failing on import - Remove redundant hypothesis check (unreachable code) - Simplify semantic search placeholder (dead code paths) Minor fixes: - Update docs: Docker β Modal Sandbox terminology - Fix docstring claiming ConfigurationError (only warns)cbd94a4 -
feat: Integrate Mario's Modal code execution + LlamaIndex RAGβ
Cherry-picked from mario-dev branch: - src/tools/code_execution.py: Modal sandbox for LLM-generated code - src/services/llamaindex_rag.py: LlamaIndex + ChromaDB RAG service - src/agents/analysis_agent.py: Statistical analysis agent - examples/modal_demo/: Demo scripts for code execution - docs/workflow-diagrams.md: Architecture documentation Dependencies added as optional [modal] group: - modal>=0.63.0, llama-index, chromadb Config additions: - MODAL_TOKEN_ID, MODAL_TOKEN_SECRET, CHROMA_DB_PATH Co-authored-by: Mario <mario@contributor>3aa91e9 -
feat: Complete Phase 9 Source Cleanup (Remove WebTool) (#14)β
* feat: complete Phase 9 source cleanup - Removed WebTool (src/tools/websearch.py) and related tests - Updated SearchHandler and models to support only PubMed - Refactored all examples and tests to remove web search dependencies - Added verification tests to ensure no WebTool references remain - Fixed all unit tests to align with strict 'pubmed' source typing * fix: address CodeRabbit review feedback - Deduplicate tenacity dependency in pyproject.toml - Remove 'and web' from search agent description - Normalize Citation source to 'pubmed' in search agent - Update app.py markdown to remove web search references - Update embeddings demo with realistic PubMed URL/author - Enhance SearchHandler tests to verify multi-tool aggregation * refactor: replace mock data with real PubMed data in embeddings demo * fix: address CodeRabbit review feedback - Fix nested test_search_handler_pubmed_only (was inside another test, never ran) - Improve test_no_webtool_references to catch `from src.toolβ¦cd004e1
-
fix: address all CodeRabbit Phase 8 review feedbackβ
Actionable issue: - Forward additional_properties in run_stream for consistent metadata Nitpicks addressed: - Report event now uses actual agent message instead of hardcoded text - Citation validator: documented in-place mutation, use exact title match - Log truncation uses constant _MAX_URL_DISPLAY_LENGTH - Test asserts final_report is stored - Handle empty lists in markdown (hypotheses, drugs, limitations, refs) - Edge case: show "Untested" when supported==contradicted==0 - Document citations field in ReportSection as reserved for future usef1e4e5b -
fix: apply lazy init pattern and pydantic-ai fixes to ReportAgent (#12)β
Applies the same fixes as Phase 7 HypothesisAgent: - Lazy initialization via _get_agent() to avoid API key requirement at import - Use output_type instead of result_type (pydantic-ai API) - Use result.output instead of result.data - Fix line length issues in tests - Proper mocking of get_model in tests3139749 -
fix: address CodeRabbit Phase 7 review feedbackβ
- Lazy initialize HypothesisAgent's pydantic-ai Agent to avoid requiring API keys at import time (fixes CI failure) - Add explicit default=None to primary_hypothesis field for Pydantic v2 compliancebc74531 -
feat(phase7): implement Hypothesis Agent for mechanistic reasoningβ
Add HypothesisAgent that generates Drug β Target β Pathway β Effect hypotheses based on collected evidence. Key features: Models: - MechanismHypothesis: structured hypothesis with confidence scoring - HypothesisAssessment: container for hypotheses with knowledge gaps Utilities: - MMR (Maximal Marginal Relevance) for diverse evidence selection - Sentence-aware truncation for clean text processing Agent: - HypothesisAgent generates 2-4 testable hypotheses per query - Integrated with EmbeddingService for semantic evidence selection Orchestrator: - Refactored MagenticOrchestrator into smaller methods - Added "hypothesizing" event type for UI feedback - Workflow: Search β Hypothesize β Targeted Search β Judge Tests: 53/53 passing, mypy clean, ruff cleanc690006 -
fix(phase6): critical fixes from senior auditβ
- Fix Dockerfile cache ownership (run model download as appuser) - Store full citation metadata in vector DB (title, date, authors) - Remove fragile locals() hack in search_agent.py - Add try/except in deduplicate loop for resilience - Document threshold semantics (cosine distance math) - Clean up redundant list() calls59afc84 -
feat(phase6): Embeddings & Semantic Search implementationβ
- Added EmbeddingService with ChromaDB and SentenceTransformers - Updated SearchAgent to support semantic deduplication and search - Updated MagenticOrchestrator to use embeddings if available - Added 100% async-safe implementation with run_in_executor - Added comprehensive unit tests3bacbf8 -
fix(phase5): align configs and add agent testsβ
- Add PLR0912, PLC0415 to ruff ignore list for complex orchestrator logic - Disable warn_unused_ignores in mypy (vendored lib needs type: ignore) - Fix single ChatMessage input handling in SearchAgent/JudgeAgent - Add comprehensive unit tests for SearchAgent and JudgeAgent wrappers - All 38 tests pass, lint and mypy clean, pre-commit aligned15459e9 -
fix: linting and types for phase 5
1922dbd