Prerequisites
Before you begin, make sure you have:- Bun installed (required package manager)
- Node.js v23.3.0 or later
- A PostgreSQL database (we recommend Supabase for easy setup)
- An OpenAI API key (or another LLM provider)
Installation
Install dependencies
- Elysia (web framework)
- Anthropic, OpenAI, Google AI SDKs
- Supabase client
- Vector database dependencies
Configure environment variables
Create your environment file:Edit
.env and configure the following required settings:.env
Get your Supabase credentials from the Supabase Dashboard:
- SUPABASE_URL: Settings > API > Project URL
- SUPABASE_ANON_KEY: Settings > API > anon/public key
- SUPABASE_SERVICE_KEY: Settings > API > service_role key (keep this secret!)
Set up the database
Run database migrations to create all required tables:This will apply migrations for:
- Core tables (users, conversations, messages, states)
- Vector database setup (pgvector extension)
- Indexes, functions, and triggers
Build the frontend
Build the Preact-based UI:The built files will be placed in
client/dist/ and served by the backend.Verify Your Setup
Once the server is running, you should see:http://localhost:3000 and you should see the BioAgents chat interface.
Basic Usage
Chat Mode
Try asking a research question:- Search available literature (if configured)
- Synthesize findings with citations
- Provide a comprehensive answer
Adding Custom Knowledge
To search your own documents:Add documents to the docs folder
Place your documents in the Supported formats: PDF, Markdown (.md), DOCX, TXT
docs/ directory:Common Commands
Next Steps
You now have a basic BioAgents instance running! Here’s what to explore next:Complete Setup
Configure advanced features like analysis agents, job queues, and payment protocols
Literature Agents
Set up OpenScholar, Edison, or BioLiterature for enhanced literature search
Analysis Agents
Configure Edison or BIO analysis agents for dataset processing
Authentication
Enable JWT authentication or x402 payments for production deployments
Troubleshooting
Database connection errors
Database connection errors
Make sure your Supabase credentials are correct:You should receive a valid response. If not, double-check your
SUPABASE_URL and SUPABASE_ANON_KEY.Migration errors
Migration errors
If migrations fail:
- Verify
SUPABASE_SERVICE_KEYis set correctly - Check that your database user has permission to create tables
- Try running migrations manually via Supabase SQL Editor
LLM API errors
LLM API errors
If you get API key errors:
- Verify your
OPENAI_API_KEYis valid - Check you have sufficient credits/quota
- Try using a different model (e.g.,
gpt-3.5-turbofor testing)
Vector search not working
Vector search not working
If custom documents aren’t being searched:
- Check that documents are in the
docs/folder - Look for processing logs on startup
- Verify
EMBEDDING_PROVIDERandTEXT_EMBEDDING_MODELare set - Check that pgvector extension is installed in your database
For more detailed troubleshooting and advanced configuration, see the complete Setup Guide.