Modular Β· Event-Driven Β· AI-Powered
The cognitive bridge between your world and Omi.
Agent Mate is a highly modular, async-powered backend framework designed for seamless integration with Omi. It enables AI agents to ingest, process, and relay structured information from multiple data sources like Gmail, Notion, and more β delivering it back to Omi in the form of conversations or memories.
- π Real-Time & Scheduled Data Collection
- π§ AI-Based Summarization & Classification
- βοΈ Dynamic Plugin-based Agent/Subscriber System
- π Seamless Omi Memory & Conversation API Integration
- π¦ Async Architecture + Redis Event Bus
- π Automatic Retry & Rate Limit Management
- π OAuth-Based Auth
AgentMate/
βββ Agents/ # Data source agents like Gmail and LLM
βββ Connectors/ # External system connectors (e.g., Omi)
βββ Core/ # Core logic: EventBus, config, DI, logging, retry
βββ DB/ # Database structure: models, schemas, repos, services
βββ Engines/ # AI processing engines (Classifier, Summarizer, Queue, Token tools)
βββ Plugins/ # Plugin system interfaces and implementations
βββ Routers/ # FastAPI endpoint routers
βββ Subscribers/ # Event subscribers / consumers
βββ main.py # Entry point of the application
Agent | Status | Functionality |
---|---|---|
GmailAgent |
β | Periodically fetches and classifies emails |
NotionAgent |
π | Extracts content blocks and page metadata |
CalendarAgent |
π | Pulls upcoming events |
FacebookAgent |
π | Reads user feed and messages |
InstagramAgent |
π | Captures post insights and messages |
YouTubeAgent |
π | Gathers video metadata and notifications |
WhatsAppAgent |
π | Parses chat messages for intent and memory |
DiscordAgent |
π | Listens to server channels and DMs |
LinkedInAgent |
π | Extracts professional interactions and alerts |
All agents implement the shared IAgent
interface, and are registered via AgentFactory
.
The NLP processing pipeline supports:
- π Summarization (OpenAI, GPT)
- ποΈ Classification
- π§ Memory & Conversation Mapping
- π§Ύ Intent/NLU & Entity Extraction (NER)
All processors are pluggable and can be run in parallel using asyncio.
We utilize Redis Pub/Sub to:
- Trigger agents dynamically
- Communicate between micro-modules
- Schedule async background jobs
- Broadcast processed data to WebSocket endpoints
Pattern | Purpose |
---|---|
Factory | Create agents dynamically |
Observer | Manage event subscriptions |
Strategy | NLP engine logic |
Adapter | Normalize 3rd-party APIs |
Builder | Format memory/conversation payloads |
DI | Plugin/subscriber/service injection |
Column | Type | Description |
---|---|---|
uid | TEXT | Omi user ID |
service_name | TEXT | Agent name (gmail, etc.) |
service_id | TEXT | OAuth/session token key |
config | JSONB | Agent config JSON |
is_logged_in | BOOLEAN | Service login status |
Column | Type | Description |
---|---|---|
uid | TEXT | User ID |
service | TEXT | Agent name |
data_type | TEXT | summary , classify |
content | TEXT | Final processed result |
- β Uses Omi Conversation API
- β Uses Omi Memory API
- Python 3.9+
- PostgreSQL
- Redis
- Docker (optional)
git clone https://github.com/ibrahimAlbyrk/AgentMate.git
cd AgentMate
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.template .env
# Update .env with your values
python main.py
class MyAgent(IAgent):
VERSION = AgentVersion(1, 0, 0)
async def _initialize_impl(self): ...
async def _run_impl(self): ...
async def _stop_impl(self): ...
class MySubscriber(BaseSubscriber):
async def setup(self, event_bus, **services): ...
async def handle_event(self, data): ...
async def stop(self): ...
Method | Endpoint | Description |
---|---|---|
POST |
/settings/ |
Create or update user settings |
GET |
/settings/{uid}/{service_name} |
Fetch user settings for specific service |
Method | Endpoint | Description |
---|---|---|
GET |
/{service}/get-settings |
Retrieve merged config (user + default) |
POST |
/{service}/update-settings |
Update user config and restart agent |
Method | Endpoint | Description |
---|---|---|
GET |
/{service}/login |
Begin OAuth login |
GET |
/{service}/callback |
OAuth callback |
GET |
/{service}/is-logged-in |
Check login state |
POST |
/{service}/login-directly |
Login using known service ID |
POST |
/{service}/logout |
Logout and revoke token |
Method | Endpoint | Description |
---|---|---|
GET |
/agent/status |
Show currently active agents for user |
Method | Endpoint | Description |
---|---|---|
GET |
/gmail/get-email-subjects |
Fetch recent email subjects |
POST |
/gmail/convert-to-memory |
Convert selected/last emails to memory |
Method | Endpoint | Description |
---|---|---|
GET |
/admin/user-count |
Return total unique user count |
GET |
/admin/users-info |
Return total unique user count and users' services status, logged-in status |
Info: To use the users-info API, you need to send the x_admin_token info as a query. You can assign from the .env
Method | Endpoint | Description |
---|---|---|
POST |
/composio/webhook |
Webhook listener for composio actions |
Method | Endpoint | Description |
---|---|---|
GET |
/setup-complete |
Check if user's setup is complete |
Method | Endpoint | Description |
---|---|---|
WS |
/ws/{uid} |
WebSocket endpoint for real-time events |
MIT License β see LICENSE
file.
Build AI agents that truly think, act, and integrate β with Agent Mate.