Skip to content

whisdev/agentops

Repository files navigation

Agent Ops

AI Co-Worker Layer — Turn LLMs into actionable infrastructure, not chat.

Instead of building isolated bots, I’m designing a central agent orchestration system that can expand across trading, voice, and business workflows

A modular multi-agent system that Observes → Thinks → Decides → Acts → Logs → Learns. It acts as a central brain for trading, research, business automation, and voice handling.


Purpose

This is an AI infrastructure system, not a chatbot. It:

  • Trading Assistant — Monitors markets, detects signals, sends alerts, assists execution with safeguards
  • Research Agent — Pulls news, signals, on-chain data; summarizes and ranks importance
  • Business Automation — Automates workflows (CRM, admin, ops), triggers actions across tools
  • Voice / Phone Agent — Handles inbound calls, routes by intent, logs and triggers workflows
  • Workflow Engine — Connects everything and runs multi-step processes automatically

Architecture

                         ┌──────────────────────────────┐
                         │         INTERFACES            │
                         │   API · Slack · Voice · UI    │
                         └──────────────┬───────────────┘
                                        │
                         ┌──────────────▼───────────────┐
                         │      API GATEWAY             │
                         │      (FastAPI Layer)         │
                         └──────────────┬───────────────┘
                                        │
          ┌─────────────────────────────┼─────────────────────────────┐
          │                             │                             │
┌─────────▼─────────┐    ┌──────────────▼──────────────┐    ┌────────▼────────┐
│   ORCHESTRATOR    │    │       EVENT BUS             │    │   TASK QUEUE     │
│   (Brain Layer)   │    │   "When X → do Y"           │    │   (Async Jobs)   │
└─────────┬─────────┘    └──────────────┬──────────────┘    └────────┬────────┘
          │                             │                             │
          └─────────────────────────────┼─────────────────────────────┘
                                        │
                         ┌──────────────▼───────────────┐
                         │       AGENT LAYER           │
                         │  Planner · Executor ·        │
                         │  Verifier · Router           │
                         └──────────────┬───────────────┘
                                        │
                         ┌──────────────▼───────────────┐
                         │       TOOL LAYER            │
                         │  Trading · Browser · CRM ·  │
                         │  Voice · Webhooks            │
                         └──────────────┬───────────────┘
                                        │
                         ┌──────────────▼───────────────┐
                         │    MEMORY + STORAGE          │
                         │  Redis · PostgreSQL · Vector │
                         └──────────────────────────────┘

Core Components

Component Role
API Gateway Entry point for all interfaces; auth, routing
Orchestrator Central brain — decides which agent, manages workflows, tracks state
Planner Agent Breaks goals into executable steps
Executor Agent Runs steps via the tool layer
Verifier Agent Checks correctness and safety
Router Agent Classifies and routes to the right workflow
Event Bus Triggers: "When X happens → do Y"
Task Queue Background jobs, retries, scaling

Data Flow Example: Trading Alert

1. Market data arrives (API/WebSocket)
2. Event Bus triggers signal check
3. Orchestrator receives event
4. Planner → "Check if this is a valid signal"
5. Executor → Calls trading tool, runs analysis
6. Verifier → Checks risk conditions
7. If valid → Send alert (Slack/Telegram)
8. Store everything in DB

Quick Start

cd agentops
pip install -r requirements.txt
uvicorn app.main:app --reload
# Health check
curl http://localhost:8000/health

# Submit a task
curl -X POST http://localhost:8000/api/v1/tasks/ \
  -H "Content-Type: application/json" \
  -d '{"goal": "Check market price and send alert if signal"}'

Project Structure

agentops/
├── app/
│   ├── main.py              # FastAPI entry
│   ├── config/
│   ├── api/                 # Routes
│   └── core/
│       ├── orchestrator/    # Brain layer
│       ├── agents/         # Planner, Executor, Verifier, Router
│       ├── workflows/
│       ├── memory/
│       └── utils/
├── tools/                   # Trading, Browser, CRM, Voice
├── workflows/
├── services/
├── memory/
├── task_queue/
├── events/
├── integrations/
└── models/

Roadmap

Phase Focus
1 API + Orchestrator + Basic agents + Tool system
2 Trading workflow, Alerts
3 Voice + Phone
4 Full automation + Scaling

Phase 2: Trading & Alerts

  • Market data — CoinGecko API (price, 24h change, volume)
  • Trading workflow — check → evaluate signal → send alert
  • Alerts — Slack webhook, Telegram
  • Event busprice_change triggers trading workflow

API Endpoints

Method Endpoint Description
GET /api/v1/market/price?symbol=bitcoin Get price
POST /api/v1/alerts/trading Run trading alert workflow
POST /api/v1/alerts/manual Send manual alert
POST /api/v1/market/price-change Simulate price_change event

Environment

Copy .env.example to .env:

OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
REDIS_URL=redis://localhost:6379/0
DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost:5432/aiops

# Phase 2: Alerts
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/xxx/xxx/xxx
TELEGRAM_BOT_TOKEN=
TELEGRAM_CHAT_ID=

# Phase 2: Market
DEFAULT_MARKET_SYMBOL=bitcoin
SIGNAL_THRESHOLD_PCT=5.0

Get Bitcoin price

curl "http://localhost:8000/api/v1/market/price?symbol=bitcoin"

Run trading alert (alerts only if 24h change >= 5%)

curl -X POST "http://localhost:8000/api/v1/alerts/trading"
-H "Content-Type: application/json"
-d '{"symbol": "ethereum", "threshold_pct": 5}'

Send manual alert (requires Slack/Telegram configured)

curl -X POST "http://localhost:8000/api/v1/alerts/manual"
-H "Content-Type: application/json"
-d '{"message": "Test alert"}'

About

Production-grade AI agent infrastructure for automating trading, research, business workflows, and voice operations.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors