--- title: Compost emoji: πŸš€ colorFrom: blue colorTo: purple sdk: docker pinned: false --- # Platform - AI Tool Integration Platform A self-hosted AI tool integration platform that dynamically fetches **1000+ tools** from the Composio API. No hardcoded tool definitions - everything is fetched live and cached locally. ## How It Works Instead of hardcoding tools, this platform: 1. **Fetches toolkits and tools from Composio's public API** (`https://backend.composio.dev/api/v3.1`) 2. **Caches them locally** in SQLite with configurable TTL (default: 1 hour) 3. **Executes tools via Composio API** with proper credential management 4. **Supports on-demand sync** via API endpoints or UI ## Features - **1000+ Tools** - Dynamically fetched from Composio API (GitHub, Gmail, Slack, Notion, Stripe, etc.) - **Dynamic Sync** - Tools are automatically synced at startup and can be refreshed on-demand - **Local Cache** - Tools are cached locally with configurable TTL for offline access - **MCP Server** - Full Model Context Protocol implementation - **Tool Execution Engine** - Execute tools with proper credential injection via Composio API - **OAuth + API Key Vault** - Secure credential storage with AES-256-GCM encryption - **Analytics** - Usage metrics and performance insights - **Professional UI** - Clean dark theme (not the typical purple AI theme) ## Quick Start ### 1. Get a Composio API Key Sign up at [app.composio.dev](https://app.composio.dev/dashboard) and create an API key. ### 2. Configure Environment ```bash cp .env.example .env # Edit .env and add your COMPOSIO_API_KEY ``` ### 3. Build and Run ```bash # Using Docker docker build -t platform . docker run -p 7860:7860 -v /path/to/data:/data --env-file .env platform # Or directly cd backend && pip install -r requirements.txt export COMPOSIO_API_KEY=sk_your_key_here python -c "from database import init_db; init_db()" python integrations/registry.py # Syncs from Composio API uvicorn main:app --reload ``` ## API Endpoints ### Sync Tools On-Demand ```bash # Sync integrations curl -X POST http://localhost:7860/api/apps/sync \ -H "Authorization: Bearer YOUR_JWT_TOKEN" # Sync tools curl -X POST http://localhost:7860/api/tools/sync \ -H "Authorization: Bearer YOUR_JWT_TOKEN" ``` ### Execute Tools ```bash curl -X POST http://localhost:7860/api/tools/github_create_issue/execute \ -H "Authorization: Bearer YOUR_JWT_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "params": { "owner": "myorg", "repo": "myrepo", "title": "Bug report" } }' ``` ## Composio API Endpoints Used | Endpoint | Purpose | |----------|---------| | `GET /api/v3.1/toolkits` | List all available toolkits (integrations) | | `GET /api/v3.1/tools` | List all available tools | | `POST /api/v3.1/tools/execute/{slug}` | Execute a tool | ## Architecture ``` β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Platform Platform β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ React UI │◄──►│ FastAPI │◄──►│ SQLite β”‚ β”‚ β”‚ β”‚ (Vite) β”‚ β”‚ Backend β”‚ β”‚ Database β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β–Ό β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ Composio API β”‚ β”‚ β”‚ β”‚ backend.composio.dev β”‚ β”‚ β”‚ β”‚ /api/v3.1/toolkits β”‚ β”‚ β”‚ β”‚ /api/v3.1/tools β”‚ β”‚ β”‚ β”‚ /api/v3.1/tools/executeβ”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ``` ## Default Credentials - Email: `admin@platform.local` - Password: `admin123` ## Tech Stack - **Frontend**: React, TypeScript, Vite, Tailwind CSS, Zustand, Recharts - **Backend**: Python, FastAPI, SQLAlchemy, httpx, Pydantic - **Database**: SQLite with local caching - **Auth**: JWT with bcrypt password hashing - **Encryption**: AES-256-GCM for credential vault ## License MIT