Contributions are very welcome — OpsAgent is a young project and there is a lot of room to grow. Please open an issue first for anything beyond a small bug fix so we can align on direction before you invest time in a PR.
- Tests are mandatory. Every change to behaviour must include tests. PRs without tests covering the new or changed code will not be merged.
- All existing tests must continue to pass (
pytest tests/ -v). - Keep new dependencies minimal — ask in an issue if you're unsure.
git clone https://github.com/ChengaDev/opsagent.git
cd opsagent
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[all-providers]"
pytest tests/ -vThis is the highest-impact area right now. OpsAgent currently supports Slack, generic webhooks, and GitHub PR comments. We'd love to add:
| Channel | Notes |
|---|---|
| PagerDuty | Create an incident via the Events API v2 |
| Microsoft Teams | Adaptive Card payload via Incoming Webhook |
| Discord | Embed payload via Discord webhook |
| Opsgenie | Create alert via Opsgenie REST API |
| Datadog | Post event to Datadog Events API |
| SMTP or SendGrid for direct email delivery | |
| Telegram | Bot API message to a chat or channel |
Each channel lives in mcp_tools/notification_server.py as a new MCP tool. Follow the pattern of send_slack_notification — accept a webhook URL or token via env var, build the payload, send it, return a success/error string.
Add to _PATTERNS in mcp_tools/log_analyzer.py with a matching fixture log and test. Common gaps:
- Ruby / Bundler errors
- Gradle / Maven build failures
- Go module errors
- Rust / Cargo compilation errors
- Jira — create or update a ticket from the RCA
- Datadog — fetch recent logs or metrics for a service
kubectl— live pod state, describe, events
- Add a new
@mcp.tool()function inmcp_tools/notification_server.py - Accept the target URL / token as a parameter (callers pass it from env)
- Build the channel-specific payload and POST it with
httpx - Return a plain string:
"✓ Sent"or"✗ Error: <message>" - Add a test in
tests/test_notification_server.pyusingrespxto mock the HTTP call - Document the new env var in the README CLI reference table
- Add a
(regex, IssueKind, group_index)entry to_PATTERNSinmcp_tools/log_analyzer.py - Add a realistic fixture log to
tests/fixtures/ - Add a test class in the appropriate test file following the existing pattern
- Run
pytest tests/ -vto confirm