Skip to content

palmedicoai/hacklab-bio

Β 
Β 

Repository files navigation

πŸ§ͺπŸ§¬πŸ’» HackLab-Bio

hacklabBio

This repository contains the development of an agentic AI system designed to accelerate research workflows in cellular longevity. This work is the implementation for a Master's Thesis and is built upon the GenAI-AgentOS framework (forked from genai-works-org/genai-agentos).

Objective

The main objective of this fork is to create and adapt intelligent agents that automate and optimize tasks in cellular longevity research, supporting faster experimentation, data analysis, and scientific discovery.

Features

  • Modular agent architecture for research automation
  • Integration with scientific data sources and tools
  • Customizable workflows for cellular longevity studies
  • Extensible framework for new agent development

Repository Structure

  • backend/: Core API and agent logic
  • frontend/: User interface for interacting with agents
  • master-agent/, router/, genai_agents_example/: Specialized agents and orchestration modules
  • crewai-a2a-server/: HackLab-bio Agents A2A

Overwall Architecture

HacklabBio

Example uses

image image image

Configured HackLab-Bio A2A Agents

image

Getting Started

Refer to the original GenAI-AgentOS documentation for setup instructions. This README provides details specific to the cellular longevity research implementation.

🐍 GenAI Agents Infrastructure

This repository provides the complete infrastructure for running GenAI agents, including:

  • Backend
  • Router
  • Master Agents
  • PostgreSQL Database
  • Frontend
  • CLI
  • Redis
  • Celery

πŸ“Ž Repository Link

πŸ‘‰ GitHub Repository

πŸ› οΈ Readme Files

πŸ“„οΈ License

🧠 Supported Agent Types

The system supports multiple kinds of Agents:

Agent Type Description
GenAI Agents Connected via genai-protocol library interface.
MCP Servers MCP (Model Context Protocol) servers can be added by pasting their URL in the UI.
A2A Servers A2A (Agent to Agent Protocol) servers can be added by pasting their URL in the UI.

πŸ“¦ Prerequisites

Make sure you have the following installed:

πŸš€ Local Setup

  1. Clone the repository:

    git clone https://github.com/palmedicoai/hacklab-bio.git
    cd hacklab-bio/
  2. Create a .env file by copying the example (can be empty and customized later):

    cp .env-example .env
    • A .env file should be present for configuration.
    • All variables in .env-example are commented. Platform starts with an empty .env file. You can customize any environment setting by uncommenting the relevant line and providing a new value.
  3. Start Docker desktop and ensure it is running.

  4. Start the infrastructure:

    make up
    # or alternatively
    docker compose up
  5. After startup:

πŸ‘Ύ Supported Providers and Models

  • OpenAI: gpt-4o

🌐 Ngrok Setup (Optional)

Ngrok can be used to expose the local WebSocket endpoint.

  1. Install Ngrok:

    • macOS (Homebrew): brew install ngrok/ngrok/ngrok
    • Linux: sudo snap install ngrok
  2. Authenticate Ngrok:

    • Sign up or log in at ngrok dashboard.

    • Go to the "Your Authtoken" section and copy the token.

    • Run the command:

      ngrok config add-authtoken <YOUR_AUTH_TOKEN>
  3. Start a tunnel to local port 8080:

    ngrok http 8080
  4. Copy the generated WebSocket URL and update the ws_url field in:

    genai_session.session.GenAISession
    

πŸ€–GenAI Agent registration quick start (For more data check CLI)

cd cli/

python cli.py signup -u <username> # Register a new user, also available in [UI](http://localhost:3000/)

python cli.py login -u <username> -p <password> # Login to the system, get JWT user token

python cli.py register_agent --name <agent_name> --description <agent_description>

cd agents/

# Run the agent
uv run python <agent_name>.py # or alternatively 
python <agent_name>.py 

πŸ’Ž Environment Variables

Variable Description Example / Default
FRONTEND_PORT Port to start a frontend 3000 - default. Can be changed by run in terminal source FRONTEND_PORT=<your_port>
ROUTER_WS_URL WebSocket URL for the router container ws://genai-router:8080/ws - host is either localhost or router container name
SECRET_KEY Secret key for cryptographic operations - JWT/ LLM config encryption $(openssl rand -hex 32)
POSTGRES_HOST PostgreSQL Host genai-postgres
POSTGRES_USER PostgreSQL Username postgres
POSTGRES_PASSWORD PostgreSQL Password postgres
POSTGRES_DB PostgreSQL Database Name postgres
POSTGRES_PORT PostgreSQL Port 5432
DEBUG Enable/disable debug mode - Server/ ORM logging True / False
MASTER_AGENT_API_KEY API key for the Master Agent - internal identifier e1adc3d8-fca1-40b2-b90a-7b48290f2d6a::master_server_ml
MASTER_BE_API_KEY API key for the Master Backend - internal identifier 7a3fd399-3e48-46a0-ab7c-0eaf38020283::master_server_be
BACKEND_CORS_ORIGINS Allowed CORS origins for the backend ["*"], ["http://localhost"]
DEFAULT_FILES_FOLDER_NAME Default folder for file storage - Docker file volume path /files
CLI_BACKEND_ORIGIN_URL backend URL for CLI access http://localhost:8000

πŸ› οΈ Troubleshooting

❓ MCP server or A2A card URL could not be accessed by the genai-backend

βœ… If your MCP server or A2A card is hosted on your local machine, make sure to change the host name from http://localhost:<your_port> to http://host.docker.internal:<your_port> and try again.

πŸ”Ž Also make sure to pass the full url of your MCP server or A2A card, such as - http://host.docker.internal:8000/mcp for MCP or http://host.docker.internal:10002 for A2A

⚠️ No need to specify /.well-known/agent.json for your A2A card as genai-backend will do it for you!

❓ My MCP server with valid host cannot be accessed by the genai-backend

βœ… Make sure your MCP server supports streamable-http protocol and is remotely accessible.Also make sure that you're specifiying full URL of your server, like - http://host.docker.internal:8000/mcp

⚠️ Side note: sse protocol is officially deprecated by MCP protocol devs, stdio protocol is not supported yet, but stay tuned for future announcements!

⚠️ If you encounter Docker issues, follow these steps: Clean Up Docker Assets: Stop and remove all containers. Remove all images. Remove all volumes (caution: this action deletes data). Prune all unused Docker objects, including containers, images, volumes, and networks. These steps typically resolve common issues by providing a clean and refreshed Docker environment.

About

This repository contains the development of an agentic AI system designed to accelerate research workflows in cellular longevity. This work is the implementation for a Master's Thesis and is built upon the GenAI-AgentOS framework (forked from genai-works-org/genai-agentos).

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 71.0%
  • TypeScript 27.4%
  • Shell 0.4%
  • Dockerfile 0.4%
  • CSS 0.2%
  • PowerShell 0.2%
  • Other 0.4%