Production-ready platform that connects AI agents to external services and communication channels. Provides a unified API gateway, real-time WebSocket communication, and seamless integration with Slack, Discord, Email, Webhooks, and custom APIs. Built with FastAPI, LangChain, and Redis for scalable, event-driven agent orchestration.
- Unified API Gateway: Single endpoint for all agent interactions
- Multi-Channel Integration: Slack, Discord, Email, SMS, Webhooks
- Real-Time Communication: WebSocket support for live updates
- Event-Driven Architecture: Webhook handling and event streaming
- Message Queue: Redis-based queuing for reliable message delivery
- Agent Orchestration: LangChain-based agent integration
- Rate Limiting & Security: Production-ready API security
- Integration Marketplace: Pre-built connectors and templates
- Slack: Bot integration, slash commands, interactive components
- Discord: Bot commands, message handling, reactions
- Email: SMTP integration, email parsing, automated responses
- Webhooks: Incoming/outgoing webhooks, event subscriptions
- Custom APIs: REST API integration, custom connectors
- WebSocket: Real-time bidirectional communication
┌─────────────────┐
│ Frontend UI │
│ (Streamlit) │
└────────┬────────┘
│
┌────────▼─────────────────────────────────────┐
│ API Gateway (FastAPI) │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ REST │ │ WebSocket│ │ Webhooks │ │
│ └──────────┘ └──────────┘ └──────────┘ │
└────────┬─────────────────────────────────────┘
│
┌────────▼─────────────────────────────────────┐
│ Integration Adapters Layer │
│ ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ │
│ │Slack │ │Discord│ │Email │ │Custom│ │
│ └──────┘ └──────┘ └──────┘ └──────┘ │
└────────┬─────────────────────────────────────┘
│
┌────────▼─────────────────────────────────────┐
│ Agent Integration Layer │
│ ┌──────────────────────────────────────┐ │
│ │ LangChain Agent Orchestrator │ │
│ └──────────────────────────────────────┘ │
└────────┬─────────────────────────────────────┘
│
┌────────▼─────────────────────────────────────┐
│ Infrastructure Layer │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Redis │ │PostgreSQL│ │ Queue │ │
│ └──────────┘ └──────────┘ └──────────┘ │
└──────────────────────────────────────────────┘
- Python 3.10+
- Redis (for message queuing)
- PostgreSQL (optional, SQLite by default)
- Clone and navigate to the project:
cd agent_integration_hub- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
cp env.example .env
# Edit .env with your API keys and configuration- Initialize database:
python -m backend.core.database init- Start Redis (if not running):
# macOS/Linux
redis-server
# Windows (using Docker)
docker run -d -p 6379:6379 redis:alpine- Run the API server:
uvicorn backend.api.main:app --reload --port 8000- Run the frontend (in another terminal):
streamlit run frontend/app.pyThe API gateway provides a unified interface for all agent interactions:
import requests
# Send message to agent via API
response = requests.post(
"http://localhost:8000/api/v1/agents/chat",
json={
"message": "What's the weather today?",
"channel": "slack",
"user_id": "user123"
},
headers={"Authorization": "Bearer your-api-key"}
)Connect for real-time updates:
const ws = new WebSocket('ws://localhost:8001/ws');
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
console.log('Received:', data);
};- Create a Slack app at https://api.slack.com/apps
- Add bot token and signing secret to
.env - Configure event subscriptions and slash commands
- Install app to your workspace
- Create a Discord application at https://discord.com/developers/applications
- Add bot token to
.env - Invite bot to your server with appropriate permissions
- Configure SMTP settings in
.env - For Gmail, use an App Password
- Test connection via the admin dashboard
agent_integration_hub/
├── backend/
│ ├── api/ # FastAPI routes and endpoints
│ ├── core/ # Core functionality (database, config)
│ ├── integrations/ # Integration adapters
│ ├── agents/ # Agent integration layer
│ ├── services/ # Business logic services
│ ├── models/ # Data models
│ └── utils/ # Utility functions
├── frontend/ # Streamlit dashboard
├── tests/ # Test suite
├── data/ # Database and data files
├── docs/ # Documentation
└── requirements.txt # Python dependencies
Once the server is running, visit:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
- Single endpoint for all agent interactions
- Request routing and load balancing
- Authentication and authorization
- Rate limiting and throttling
- Request/response logging
- Slack: Full bot integration with events, commands, and interactions
- Discord: Bot commands, message handling, and reactions
- Email: SMTP integration with parsing and automated responses
- Webhooks: Bidirectional webhook support
- Custom APIs: Extensible connector framework
- WebSocket server for live updates
- Event streaming
- Real-time notifications
- Bidirectional communication
- Redis-based queuing
- Reliable message delivery
- Retry logic
- Dead letter queue
- LangChain agent integration
- Multi-agent coordination
- Context management
- Tool integration
See env.example for all configuration options. Key settings:
DATABASE_URL: Database connection stringREDIS_URL: Redis connection stringAPI_SECRET_KEY: Secret key for API authentication- Integration-specific credentials (Slack, Discord, Email)
pytest tests/ -vblack backend/ frontend/
isort backend/ frontend/- Framework: FastAPI (async Python web framework)
- Agent Framework: LangChain (agent orchestration)
- Message Queue: Redis (reliable message delivery)
- Database: PostgreSQL/SQLite (persistence)
- Real-time: WebSockets (bidirectional communication)
- Integrations: Slack SDK, Discord.py, SMTP
- Frontend: Streamlit (admin dashboard)
- Multi-Channel Customer Support: Deploy AI agents across Slack, Discord, Email
- Internal Team Bots: Productivity bots for Slack/Discord workspaces
- Email Automation: Automated email responses and processing
- Webhook Processing: Connect AI agents to any webhook-based service
- Integration Platform: Build custom connectors for any API
- Real-Time Chat: Live chat applications with WebSocket support
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.