Skip to content

sayuru-akash/bioswarm-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ† BioSwarm Engine v3.5

Production-ready multi-source intelligence swarm for AI-powered research

Rust License: MIT Version Status

Overview โ€ข Features โ€ข Installation โ€ข Usage โ€ข Configuration โ€ข API โ€ข Roadmap


๐Ÿ“ธ Preview

$ bioswarm run --query "latest AI technology trends 2026" --depth 3

๐Ÿ† BioSwarm v3.5 - Starting intelligence swarm...
โœ… SQLite database initialized
โœ… Search clients ready
๐Ÿค– Spawning specialist agents...
โœ… Swarm execution complete!
๐Ÿ“Š Execution summary ready
๐Ÿ“ Exports written: Markdown, JSON, HTML, CSV

๐Ÿ“‹ Overview

BioSwarm Engine is a production-ready, multi-source intelligence CLI built in Rust. It orchestrates specialist AI research flows to gather fresh intelligence, persist execution history, and export usable reports.

Current strengths:

  • โšก Production CLI flows for run, resume, export, history, and status
  • ๐Ÿ”„ Resumable runs with SQLite-backed checkpoints
  • ๐Ÿ“Š Multi-format exports in Markdown, JSON, HTML, and CSV
  • ๐ŸŽฏ Confidence scoring and executive summary generation
  • ๐Ÿ—„๏ธ Persistent history with searchable run records and trend deltas
  • ๐Ÿงช Tested baseline with integration and snapshot coverage

โœจ Features

Feature Description Status
๐Ÿค– Swarm Research Execution Multi-agent business intelligence orchestration โœ…
๐Ÿ—„๏ธ SQLite Persistence Schema migrations, checkpoint/resume, run history โœ…
๐Ÿ“ค Multi-Format Exports Markdown, JSON, HTML, CSV with report templates โœ…
๐Ÿ”„ Resume Flow Recover and continue from stored checkpoints โœ…
๐Ÿ“ˆ Trend Analysis Delta summaries across multiple runs โœ…
๐ŸŽฏ Confidence Scoring Per-run and aggregated confidence signals โœ…
๐Ÿงน Deduplication Duplicate insight cleanup in output generation โœ…
๐Ÿ” Fresh Research Support Fireworks generation with optional Exa freshness layer โœ…
๐Ÿ›ก๏ธ Schema Migrations Automatic database upgrades on startup โœ…
๐Ÿงช Testing Integration tests + snapshot tests โœ…
๐ŸŒ REST API Server HTTP entrypoint for automation โœ…
๐Ÿš€ Provider-flexible model backends Fireworks, Ollama, OpenAI-compatible runtime switching โœ…

๐Ÿš€ Installation

Build from Source

git clone https://github.com/sayuru-akash/bioswarm-engine.git
cd bioswarm-engine
cargo build --release
cargo test

Prerequisites


๐ŸŽฎ Usage

Basic Run

export FIREWORKS_API_KEY="your_key_here"
bioswarm run --query "AI market trends 2026"

Advanced Usage

bioswarm run \
  --query "sri lanka fintech opportunities" \
  --depth 3 \
  --formats markdown,json,html,csv \
  --output-dir ./reports \
  --database-path ./bioswarm.db

bioswarm history --limit 20
bioswarm status
bioswarm export --execution-id "<id>" --formats markdown,json
bioswarm resume --execution-id "<id>"

Backend-flexible runtime examples

# Fireworks
export FIREWORKS_API_KEY="fw_..."
bioswarm run --query "AI market trends" --backend fireworks --model accounts/fireworks/models/kimi-k2-instruct

# Ollama
export OLLAMA_API_KEY="local-or-placeholder"
bioswarm run --query "AI market trends" \
  --backend ollama \
  --model kimi-k2.5:cloud \
  --api-base-url http://127.0.0.1:11434/v1 \
  --api-key-env OLLAMA_API_KEY

# OpenAI-compatible
export OPENAI_API_KEY="sk-..."
bioswarm run --query "AI market trends" \
  --backend openai-compatible \
  --model gpt-4.1-mini \
  --api-base-url https://api.openai.com/v1 \
  --api-key-env OPENAI_API_KEY

CLI Commands

Command Description
run Execute a new swarm
resume Resume from a saved checkpoint
export Export an existing run
history List past runs
status Show current status and checkpoints

โš™๏ธ Configuration

Environment Variables

# Required
export FIREWORKS_API_KEY="fw_..."

# Optional
export EXA_API_KEY="exa_..."
export DATABASE_PATH="./bioswarm.db"
export OUTPUT_DIR="./outputs"
export RATE_LIMIT_RPM=60
export BIOSWARM_DEPTH=2
export RUST_LOG=info

Config File (bioswarm.toml)

fireworks_api_key = "fw_..."
exa_api_key = "exa_..."
rate_limit_rpm = 60
database_path = "bioswarm.db"
output_dir = "outputs"
depth = 2
formats = ["markdown", "json", "html", "csv"]
backend = "fireworks"
model = "accounts/fireworks/models/kimi-k2-instruct"
api_base_url = "https://api.fireworks.ai/inference/v1"
api_key_env = "FIREWORKS_API_KEY"

๐ŸŒ API

BioSwarm includes an HTTP API server for automation:

./target/release/bioswarm-server

Endpoints

Endpoint Method Description
/health GET Health check
/api/v1/swarm/run POST Execute swarm
/api/v1/swarm/status GET Get current status/checkpoints

๐Ÿ—๏ธ Architecture

CLI / API
   โ†“
Orchestrator
   โ†“
Agent execution + checkpointing
   โ†“
Search + generation clients
   โ†“
SQLite persistence + export pipeline

Core files:

  • src/main.rs CLI entry
  • src/server.rs API server
  • src/database.rs persistence + migrations
  • src/orchestrator.rs swarm execution + checkpointing
  • src/exports.rs export writers
  • tests/ integration and snapshot coverage

๐Ÿ›ฃ๏ธ Roadmap

Planned next improvements:

  • richer provider-specific capability negotiation
  • stronger retry/backoff behavior for live provider calls
  • richer report presentation and executive dashboards
  • stronger CI/release polish
  • deeper structured extraction from model outputs

Important: roadmap items above are next-step improvements beyond the currently shipped backend-flexible runtime support.


๐Ÿ“œ License

MIT

About

A multi-source intelligence CLI built in Rust. It orchestrates 14 specialist AI research flows to gather fresh intelligence, persist execution history, and export usable reports.

Topics

Resources

License

Stars

Watchers

Forks

Contributors