cjoyy/ops-agent
Ops Agent
Ops Agent adalah eksperimen multi-agent IT/ops berbasis LangGraph untuk routing ticket, tool calling, RAG runbook, human-in-the-loop approval, dan checkpoint persistence.
Project ini adalah lanjutan dari support-agent: lanjutan dari project sebelumnya, fokus eksplorasi LangGraph untuk orchestration multi-agent yang lebih kompleks.
Architecture
flowchart TD
A[User Ticket] --> B[Supervisor]
B -->|technical| C[Retrieve Runbook]
C --> D[Technical Agent]
B -->|billing| E[Billing Agent]
B -->|security| F[Security Agent]
D --> G{Needs follow-up?}
E --> G
F --> H{Human approval?}
H -->|approve/reject resume| G
G -->|new category| B
G -->|done| I[Final Response]
C -.-> J[(Chroma Runbooks)]
F -. interrupt/resume .-> K[(SQLite Checkpoints)]Konsep LangGraph Yang Ditonjolkan
Setup & Run
python -m venv venv
.\venv\Scripts\Activate.ps1
pip install -r requirements.txtBuat .env dari contoh:
Copy-Item .env.example .envIsi:
GROQ_API_KEY=your_groq_api_keyBuild index runbook satu kali sebelum menjalankan ticket technical:
python rag_setup.pyJalankan aplikasi utama:
python main.py "Service auth-api saya stuck, gimana cara restart yang benar?"Contoh ticket security akan meminta approval manual di terminal:
python main.py "Ada yang coba login ke akun saya dari lokasi asing"Untuk verifikasi SQLite persistence lintas proses:
python test_persistence.py
python test_resume_later.pyUntuk evaluasi routing supervisor:
python eval_routing.pyHugging Face Spaces
Space ini dikonfigurasi memakai Docker SDK. File penting untuk deploy:
Dockerfilemenjalankan web app Gradio di port7860.app.pyadalah UI Hugging Face Spaces.README.mdpunya metadatasdk: dockerdanapp_port: 7860.
Set secret berikut di Hugging Face Space:
GROQ_API_KEY=your_groq_api_keyDeploy target:
https://huggingface.co/spaces/cjoyy/ops-agentUntuk menjalankan container lokal:
docker build -t ops-agent .
docker run --env-file .env -p 7860:7860 ops-agentHasil Eval Routing Accuracy
Golden dataset berisi 30 ticket IT/ops, termasuk beberapa ticket ambigu. Hasil terakhir:
Accuracy: 90% (27/30)Known Limitations
- Ticket password reset internal dan akun terkunci karena login gagal kadang diklasifikasikan sebagai
technical, padahal golden label saat inisecurity. - Ticket billing portal yang mengandung gejala UI seperti refresh/error bisa condong ke
technical, walaupun beberapa kasus bisnis lebih cocokbilling. - Follow-up detection masih memakai LLM judgement langsung, jadi hasil handoff bisa bervariasi antar run.
- RAG index harus dibuat dulu dengan
python rag_setup.py; kalau belum, technical agent tidak punya konteks runbook yang kuat. - Tool yang tersedia masih dummy dan belum mengeksekusi operasi produksi sungguhan.
