Skip to content

feat(orchestrator): Implement real API orchestration and production networking standards#10

Open
ravindraogg wants to merge 2 commits intoreactome:mainfrom
ravindraogg:main
Open

feat(orchestrator): Implement real API orchestration and production networking standards#10
ravindraogg wants to merge 2 commits intoreactome:mainfrom
ravindraogg:main

Conversation

@ravindraogg
Copy link
Copy Markdown

This PR upgrades the experimental orchestration layer from a mock-based prototype to a functional system that executes multi-step biological queries against the live Reactome REST APIs. This enables the orchestration of real-world biological workflows (Search -> Analysis -> Detailed Lookup) using only the Python standard library.

Key Changes

  • New real_adapter.py: Added a production-ready adapter that interfaces with the Reactome Content Service and Analysis Service.
  • Zero-Dependency Networking: Implementation uses urllib.request to ensure the orchestrator remains lightweight and has no external dependencies (like requests), keeping the barrier to entry low for bioinformatics users.
  • Production Standards:
    • User-Agent: Custom identification (reactome-mcp-orchestrator/1.0) for server-side traffic monitoring.
    • Timeouts: 15-second request timeouts for robustness.
    • Robust Error Handling: Clean propagation of API failures back to the user/orchestrator.
  • Execution Wiring: Updated executor.py to use the real adapter as the default, transforming the demo.py from a simulation into a live diagnostic tool.

Verification

I have verified that the orchestrator/demo.py successfully plans and executes the following patterns against live data:

  1. Parallel: Comparative enrichment analysis of multiple genes.
  2. Sequential: 3-step biological chains (Search -> Analyze -> Pathway detail lookup).
  3. Single-step: Direct enrichment analysis and full-text searches.

Testing

Run the diagnostic demo to verify live connectivity:

python orchestrator/demo.py

Replaces the simulated response layer with a functional adapter that
interacts directly with the Reactome Content and Analysis REST APIs.

Key improvements:
- Implemented 
eal_adapter.py using Python's standard urllib.request.
- Added production networking standards: User-Agent headers, 15s timeouts,
  and comprehensive error handling for API request failures.
- Updated executor.py to wire the planning logic into live services.
- Refined demo.py to provide a complete trace of real-world biological
  tasks (search, enrichment, and pathway lookup).
- Maintained a zero-dependency architecture for low-friction setup.

This change moves the orchestration layer from a conceptual prototype
to a functional tool for multi-step biological query execution.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant