Skip to content

UnicornXOS/bl1nk-stack-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

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

Repository files navigation

๐Ÿš€ bl1nk-agent-builder

Version License Python TypeScript FastAPI Cloudflare

AI Agent Platform with RAG, Multi-Agent Orchestration & Enterprise-Grade Security

Deploy to Cloudflare Docker Redis

โœจ What is bl1nk?

bl1nk is a next-generation AI agent platform that combines the power of multiple LLM providers with intelligent routing, RAG capabilities, and enterprise-grade security. Built with a modern edge-first architecture, bl1nk delivers low-latency responses while maintaining cost efficiency through smart provider selection.

๐ŸŽฏ Key Features

  • ๐Ÿง  Multi-Agent Orchestration - Coordinate multiple AI agents with intelligent task distribution
  • ๐Ÿ”„ Smart Provider Routing - Automatically route requests to the best-performing LLM provider
  • ๐Ÿ“š RAG Integration - Built-in vector search with pgvector for contextual responses
  • ๐Ÿ›ก๏ธ Enterprise Security - End-to-end encryption, audit logging, and compliance features
  • โšก Edge-First Architecture - Cloudflare Workers + FastAPI + Serverless databases
  • ๐Ÿ“Š Real-time Monitoring - Comprehensive metrics and cost tracking
  • ๐Ÿ”Œ MCP Integration - Model Context Protocol support for extended capabilities

๐Ÿ—๏ธ Architecture Overview

graph TB
    A[๐ŸŒ Edge Layer] --> B[โšก Core Layer]
    B --> C[๐Ÿ’พ Data Layer]
    B --> D[๐Ÿค– AI Providers]
    
    A[๐ŸŒ Edge Layer] 
    A --> A1[Cloudflare Workers]
    A1 --> A2[๐Ÿ” Auth & Rate Limit]
    A1 --> A3[๐Ÿ“ก Request Proxy]
    
    B[โšก Core Layer]
    B --> B1[FastAPI Python]
    B1 --> B2[๐Ÿง  RAG Engine]
    B1 --> B3[๐ŸŽฏ Task Orchestrator]
    B1 --> B4[๐Ÿ”Œ MCP Tools]
    
    C[๐Ÿ’พ Data Layer]
    C --> C1[Neon Postgres + pgvector]
    C --> C2[Upstash Redis]
    
    D[๐Ÿค– AI Providers]
    D --> D1[OpenRouter]
    D --> D2[Cloudflare AI]
    D --> D3[AWS Bedrock]
    D --> D4[Anthropic]
    
    style A fill:#ff6b35
    style B fill:#f7931e
    style C fill:#4ecdc4
    style D fill:#45b7d1
Loading

๐Ÿš€ Quick Start (Under 5 Minutes!)

Prerequisites

  • Python 3.11+ ๐Ÿ
  • Node.js 18+ (with pnpm) ๐Ÿ“ฆ
  • PostgreSQL 15+ (Neon recommended) ๐Ÿ˜
  • Redis (Upstash serverless) โšก
  • Git ๐Ÿ“

1. One-Command Setup โšก

# Clone and bootstrap in one go
git clone https://github.com/your-org/bl1nk-agent-builder.git
cd bl1nk-agent-builder
./scripts/bootstrap.sh development

2. Environment Setup ๐Ÿ”ง

# Quick environment setup
cp config/env.example .env

# Generate API keys automatically
./scripts/generate_api_keys.sh

# Validate your setup
./scripts/validate_secrets.sh

๐Ÿ”‘ Get Your API Keys:

3. Launch Services ๐Ÿš€

# Start everything with one command
make dev

# Or manually:
# Terminal 1: FastAPI Core
cd apps/worker && uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

# Terminal 2: Cloudflare Edge
cd apps/bridge && wrangler dev

# Terminal 3: Next.js UI (optional)
cd ui/nextjs && pnpm dev

4. Test Your Setup โœ…

# Health check
curl http://localhost:8000/health

# Test AI integration
curl -X POST http://localhost:8000/api/v1/chat \
  -H "Content-Type: application/json" \
  -d '{"message": "Hello bl1nk!", "model": "anthropic/claude-3-sonnet"}'

# Test RAG functionality
curl -X POST http://localhost:8000/api/v1/rag/query \
  -H "Content-Type: application/json" \
  -d '{"query": "What is machine learning?"}'

๐ŸŽฎ Interactive Demo

Try bl1nk with our pre-configured examples:

# Run the demo suite
./scripts/demo.sh

# Test different AI providers
./scripts/test_providers.sh

# Generate sample data for RAG
./scripts/generate_sample_data.sh

๐Ÿ“Š Project Health Dashboard

Real-time project metrics:

# View project statistics
./scripts/project_stats.sh

# Check dependencies status
./scripts/check_dependencies.sh

# Generate project report
./scripts/generate_report.sh

๐Ÿ”ง Advanced Configuration

Provider Routing Rules

Edit config/provider_routing.yaml:

routing_rules:
  - model_pattern: "gpt-4*"
    provider: "openrouter"
    priority: 1
    fallback: "claude-3-sonnet"
  
  - model_pattern: "claude-3*"
    provider: "anthropic"
    priority: 1
    fallback: "gpt-4-turbo"
  
  - cost_optimization: true
    max_cost_per_token: 0.0001

Database Schema

-- Enable pgvector for RAG
CREATE EXTENSION IF NOT EXISTS vector;

-- Create vector column for embeddings
ALTER TABLE documents 
ADD COLUMN embedding vector(1536);

-- Create index for similarity search
CREATE INDEX ON documents 
USING ivfflat (embedding vector_cosine_ops)
WITH (lists = 100);

๐Ÿ“ˆ Monitoring & Observability

Built-in Metrics ๐Ÿ“Š

# View real-time metrics
curl http://localhost:8000/metrics

# Check provider health
curl http://localhost:8000/health/providers

# Monitor costs
curl http://localhost:8000/admin/costs

Cost Tracking ๐Ÿ’ฐ

Track spending across all providers:

# Daily cost report
./scripts/cost_report.sh --daily

# Monthly budget alerts
./scripts/budget_alerts.sh --monthly

# Provider cost comparison
./scripts/provider_costs.sh

๐Ÿ› ๏ธ Development Workflow

Code Quality Tools

# Format and lint everything
make format
make lint

# Type checking
make type-check

# Security audit
make security-audit

Testing Strategy

# Run all tests
make test

# Test with coverage
make test-coverage

# Load testing
make load-test

# Integration tests
make integration-test

Git Workflow

# Feature development
git checkout -b feature/amazing-feature
make test && make format
git commit -m "feat: add amazing feature"
git push origin feature/amazing-feature

# Create PR and merge

๐Ÿ” Security & Compliance

Security Features ๐Ÿ›ก๏ธ

  • ๐Ÿ”’ End-to-End Encryption - All data encrypted at rest and in transit
  • ๐Ÿ”‘ JWT Authentication - Secure token-based authentication
  • ๐Ÿ“ Audit Logging - Complete audit trail for compliance
  • ๐Ÿšฆ Rate Limiting - Per-user and per-provider rate limits
  • ๐Ÿ” Webhook Verification - Cryptographic signature verification

Compliance Standards

  • GDPR Ready - Data privacy and right to deletion
  • SOC 2 Compatible - Security controls and monitoring
  • HIPAA Considerations - Healthcare data handling patterns
  • Enterprise SSO - SAML/OIDC integration ready

๐Ÿšข Deployment Options

๐Ÿš€ One-Click Deployments

Deploy to Cloudflare

Deploy to Railway

Deploy to Vercel

Manual Deployment

# Production deployment
./scripts/deploy.sh production

# Staging environment
./scripts/deploy.sh staging

# Custom environment
./scripts/deploy.sh custom --env=myenv

Docker Deployment

# Build and run with Docker
docker build -t bl1nk:latest .
docker run -p 8000:8000 bl1nk:latest

# Or use docker-compose
docker-compose up -d

๐ŸŒ Environment Support

Environment Purpose URL Status
๐Ÿ  Local Development localhost:8000 โœ… Active
๐Ÿงช Staging Testing staging.bl1nk.dev โœ… Ready
๐Ÿš€ Production Live app.bl1nk.ai ๐Ÿ”„ Coming Soon

๐Ÿ“š Documentation Hub

๐Ÿค Community & Support

Getting Help ๐Ÿ†˜

Contributing ๐Ÿค

We welcome contributions! Here's how:

  1. ๐Ÿด Fork the repository
  2. ๐ŸŒฑ Create your feature branch: git checkout -b feature/amazing-feature
  3. โœ… Test your changes: make test
  4. ๐ŸŽจ Format your code: make format
  5. ๐Ÿ“ Commit your changes: git commit -m 'feat: add amazing feature'
  6. ๐Ÿš€ Push to the branch: git push origin feature/amazing-feature
  7. ๐Ÿ” Open a Pull Request

Contribution Guidelines ๐Ÿ“‹

  • Code Style: Follow PEP 8 for Python, ESLint for TypeScript
  • Testing: Write tests for new features (80%+ coverage)
  • Documentation: Update docs for new features
  • Commits: Use conventional commits format

๐Ÿ“Š Project Statistics

# View comprehensive project stats
./scripts/project_stats.sh

Current Status:

  • ๐Ÿ“ 64 Files in the repository
  • ๐Ÿ“ 16,988+ Lines of code
  • ๐Ÿงช Comprehensive test suite
  • ๐Ÿ“š Complete documentation
  • ๐Ÿ”’ Enterprise security features
  • ๐Ÿš€ Production-ready deployment

๐Ÿ† Features Roadmap

โœ… Completed (v1.0)

  • Multi-provider LLM integration
  • Edge-first architecture
  • RAG capabilities with pgvector
  • Real-time task orchestration
  • Comprehensive security features
  • Monitoring and observability
  • Docker deployment support

๐Ÿšง In Progress (v1.1)

  • Advanced caching strategies
  • Multi-tenant support
  • Advanced analytics dashboard
  • Custom model fine-tuning pipeline

๐Ÿ”ฎ Planned (v1.2+)

  • GraphQL API support
  • Kubernetes deployment manifests
  • Advanced ML model training
  • Enterprise SSO integration
  • Mobile SDK support

๐Ÿ’ก Use Cases

๐Ÿข Enterprise

  • Customer Support Automation - Intelligent chatbots with RAG
  • Content Generation - Automated documentation and marketing content
  • Code Review - AI-powered code analysis and suggestions
  • Data Analysis - Natural language queries on business data

๐Ÿญ Developer Tools

  • API Documentation - Auto-generated from code comments
  • Testing Automation - AI-generated test cases
  • Code Generation - Template-based code creation
  • Performance Optimization - AI-driven optimization suggestions

๐Ÿ”ฌ Research & Academia

  • Literature Review - Automated paper summarization
  • Data Mining - Pattern recognition in large datasets
  • Collaborative Research - Multi-agent research coordination
  • Grant Writing - AI-assisted proposal generation

๐Ÿ“„ License & Credits

License ๐Ÿ“œ

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

Powered by amazing technologies:

  • ๐Ÿค– OpenRouter - LLM API aggregation with 100+ models
  • ๐ŸŒ Cloudflare - Lightning-fast edge computing platform
  • ๐Ÿ˜ Neon - Serverless PostgreSQL with zero-config scaling
  • โšก Upstash - Serverless Redis with global distribution
  • ๐Ÿ FastAPI - The modern Python web framework
  • ๐Ÿ” pgvector - Vector similarity search for PostgreSQL
  • ๐Ÿ“ฑ Next.js - The React framework for production

โญ Show Your Support

If bl1nk helps you build amazing AI applications, please:

  • โญ Star this repository
  • ๐Ÿ› Report issues and bugs
  • ๐Ÿ’ก Suggest new features
  • ๐Ÿค Contribute to the project
  • ๐Ÿ“ข Share with your network

Built with โค๏ธ by the bl1nk team

Follow us on Twitter Join our Discord

Website โ€ข Documentation โ€ข API Reference โ€ข Support

# bl1nk-agent-builder # bl1nk-agent-builder

About

No description, website, or topics provided.

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors