System Expansion Guide
This guide explains how to extend the Agent Bridge platform with new capabilities.
1. Adding New MCP Servers
To add a new MCP server (e.g., SQLite, Slack, Gmail):
Define Configuration: Add your server to
server/servers.json:json{ "presets": { "My New Server": { "server_url": "http://localhost:8002/sse", "description": "Connects to X service.", "requires_oauth": false, "show_advanced": true } } }Add Auth (If needed): If the server uses OAuth, set
requires_oauth: trueand fill in the fields.json"My Secure Server": { "server_url": "...", "requires_oauth": true, "authorization_url": "https://provider.com/oauth/authorize", "token_url": "https://provider.com/oauth/token", "client_id": "YOUR_CLIENT_ID" }Environment Variables: Add any required Client IDs/Secrets to
server/.env.
2. Adding New LLM Providers
The system uses a factory pattern for LLM instantiation.
Create Provider Implementation: Duplicate
server/app/services/Agent/providers/openai.py(or similar) into a new file, e.g.,my_provider.py. Implement theget_llm(model_name)function.Register Provider: Edit
server/app/services/Agent/llm_factory.py:python# Import your new provider from .providers import my_provider PROVIDER_MAP = { # ... existing ... "my_provider": my_provider.get_llm }Use It: Update your agent configuration or
.envto select the new provider.
3. Extending the Frontend
The frontend is a Vue.js 3 application.
- New Views: Add
.vuefiles inclient/src/view/. - Routes: Register new paths in
client/src/router.js. - API Calls: Use the global
axiosinstance (configured with interceptors) to call backend endpoints.
4. Database Schema Changes
- Modify Models: Edit files in
server/app/models/. - Migrations: We currently use
FastAPIstartup events tocreate_alltables. For production changes, rely onalembic(not currently configured, but recommended for future growth).