Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f9f837c
feat: Add MCP server configuration support
abrookins Dec 10, 2025
c8a5fc9
feat: Implement actual MCP client connection and tool invocation
abrookins Dec 10, 2025
04528f5
feat: Add MCP server to expose agent capabilities to other agents
abrookins Dec 10, 2025
1b6c8a5
fix: Remove stdout output in stdio mode to fix MCP protocol
abrookins Dec 10, 2025
bc0272e
feat: Add get_thread and get_task_status MCP tools
abrookins Dec 10, 2025
84ba36e
docs: Improve MCP tool descriptions with clear workflow instructions
abrookins Dec 10, 2025
164579a
docs: Update API port references for Docker Compose (8080 vs 8000)
abrookins Dec 11, 2025
4d78970
feat: Add HTTP transport for remote MCP connections
abrookins Dec 11, 2025
b5034fd
feat: Add MCP server service to docker-compose
abrookins Dec 11, 2025
ffb3071
feat: Add HTTPS support for MCP server with self-signed certs
abrookins Dec 11, 2025
1b22421
fix: Use Docker DNS resolver for nginx upstream resolution
abrookins Dec 11, 2025
343eca5
fix: Improve Redis healthcheck and remove emojis from worker output
abrookins Dec 11, 2025
fa97a9e
fix: MCP triage now submits tasks to Docket for processing
abrookins Dec 11, 2025
47e3c95
Add MCP server support; also, store redis version alongside docs
abrookins Dec 11, 2025
5e00470
Add MCP server support; also, store redis version alongside docs
abrookins Dec 11, 2025
6b3a999
Allow templating original MCP tool description; fix UI URLs
abrookins Dec 11, 2025
d746906
Refine thread/task data contract
abrookins Dec 11, 2025
739137d
update ref docs
abrookins Dec 11, 2025
6b8bd1d
Add missing CLI command tests
abrookins Dec 12, 2025
608dc97
Latest MCP changes
abrookins Dec 12, 2025
70ead4b
Cleanup
abrookins Dec 12, 2025
8e0eaa2
Add progress notifications to ChatAgent tool execution and cleanup
abrookins Dec 12, 2025
41f0f52
Move imports to module level and expand test coverage
abrookins Dec 12, 2025
2cd2d31
Update CLI reference docs
abrookins Dec 12, 2025
4a85ba2
Fix CLI help text formatting with newlines
abrookins Dec 12, 2025
6c7bb36
Replace --triage flag with --agent option for query command
abrookins Dec 12, 2025
31316f9
Fix CLI query tests to mock Redis and ThreadManager dependencies
abrookins Dec 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,8 @@ artifacts/
ui/node_modules/
ui/ui-kit/node_modules/
ui/test-results/

# SSL certificates (generated locally)
monitoring/nginx/certs/
config.yaml
eval_reports
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ RUN --mount=type=cache,target=/root/.cache/uv \
# This is the final image. It will be much smaller.
FROM python:3.12-slim

# Copy uv from the official image for runtime use (needed by entrypoint)
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv

WORKDIR /app

# Install ONLY runtime system dependencies
Expand Down
107 changes: 107 additions & 0 deletions config.yaml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Redis SRE Agent Configuration
# Copy this file to config.yaml and customize for your environment.
#
# Settings can be loaded from (priority order):
# 1. Environment variables (highest priority)
# 2. .env file
# 3. config.yaml (this file)
# 4. Default values (lowest priority)
#
# Set SRE_AGENT_CONFIG environment variable to use a custom path.

# Application settings
# debug: false
# log_level: INFO

# Server settings
# host: "0.0.0.0"
# port: 8000

# MCP (Model Context Protocol) servers configuration
# This is the primary use case for YAML config - complex nested structures
mcp_servers:
# Memory server for long-term agent memory
redis-memory-server:
command: uv
args:
- tool
- run
- --from
- agent-memory-server
- agent-memory
- mcp
env:
REDIS_URL: redis://localhost:6399
tools:
get_current_datetime:
description: |
Get the current date and time. Use this when you need to
record timestamps for Redis instance events or incidents.

{original}
create_long_term_memories:
description: |
Save long-term memories about Redis instances. Use this to
record: past incidents and their resolutions, configuration
changes, performance baselines, known issues, maintenance
history, and lessons learned. Always include the instance_id
in the memory text for future retrieval.

{original}
search_long_term_memory:
description: |
Search saved memories about Redis instances. ALWAYS use this
before troubleshooting a Redis instance to recall past issues,
solutions, and context. Search by instance_id, error patterns,
or symptoms.

{original}
get_long_term_memory:
description: |
Retrieve a specific memory by ID. Use this to get full details
of a memory found via search.

{original}
edit_long_term_memory:
description: |
Update an existing memory. Use this to add new information to
a past incident record, update resolution status, or correct
outdated information.

{original}
delete_long_term_memories:
description: |
Delete memories that are no longer relevant. Use sparingly -
prefer editing to add context rather than deleting.

{original}

# GitHub MCP server for repository operations
# Option 1: Local Docker (requires Docker to be running)
github:
command: docker
args:
- run
- -i
- --rm
- -e
- GITHUB_PERSONAL_ACCESS_TOKEN
- ghcr.io/github/github-mcp-server
env:
# Set your GitHub Personal Access Token here or via environment variable
GITHUB_PERSONAL_ACCESS_TOKEN: ${GITHUB_PERSONAL_ACCESS_TOKEN}

# Option 2: Remote GitHub MCP server (recommended, no Docker needed)
# Uncomment the following and comment out the local Docker option above:
# github:
# url: "https://api.githubcopilot.com/mcp/"
# headers:
# Authorization: "Bearer ${GITHUB_PERSONAL_ACCESS_TOKEN}"
# # transport: streamable_http # default, uses Streamable HTTP protocol

# Tool providers configuration (fully qualified class paths)
# tool_providers:
# - redis_sre_agent.tools.metrics.prometheus.provider.PrometheusToolProvider
# - redis_sre_agent.tools.diagnostics.redis_command.provider.RedisCommandToolProvider
# - redis_sre_agent.tools.logs.loki.provider.LokiToolProvider
# - redis_sre_agent.tools.host_telemetry.provider.HostTelemetryToolProvider
2 changes: 1 addition & 1 deletion docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ services:
context: .
dockerfile: Dockerfile
ports:
- "8000:8000"
- "8080:8000"
environment:
- REDIS_URL=redis://redis-demo:6379/0 # Internal container port stays 6379
- PROMETHEUS_URL=http://prometheus:9090
Expand Down
75 changes: 71 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ services:
- ./monitoring/redis.conf:/usr/local/etc/redis/redis.conf
command: redis-server /usr/local/etc/redis/redis.conf
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
# Wait for Redis to finish loading before marking healthy
test: ["CMD-SHELL", "redis-cli ping | grep -q PONG && redis-cli INFO persistence | grep -q 'loading:0'"]
interval: 5s
timeout: 5s
retries: 3
retries: 10
start_period: 10s
networks:
- sre-network

Expand Down Expand Up @@ -273,7 +275,7 @@ services:
context: .
dockerfile: Dockerfile
ports:
- "8000:8000"
- "8080:8000"
environment:
- REDIS_URL=redis://redis:6379/0 # Internal container port stays 6379
- TOOLS_PROMETHEUS_URL=http://prometheus:9090
Expand Down Expand Up @@ -327,6 +329,71 @@ services:
networks:
- sre-network

# GitHub MCP Server - Exposes GitHub tools via MCP
# This runs the GitHub MCP server behind an SSE/HTTP proxy so the sre-worker
# can connect to it without needing Docker-in-Docker permissions.
github-mcp:
image: ghcr.io/sparfenyuk/mcp-proxy:latest
ports:
- "8082:8082"
environment:
- GITHUB_PERSONAL_ACCESS_TOKEN=${GITHUB_PERSONAL_ACCESS_TOKEN}
command: >
--pass-environment
--port=8082
--host=0.0.0.0
docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- sre-network
profiles:
- mcp # Start with: docker compose --profile mcp up

# SRE Agent MCP Server - Exposes agent capabilities via Model Context Protocol
# Connect Claude to this via: Settings > Connectors > Add Custom Connector
# HTTP: http://localhost:8081/mcp
# HTTPS: https://localhost:8450/mcp (requires running scripts/generate-mcp-certs.sh first)
sre-mcp:
build:
context: .
dockerfile: Dockerfile
ports:
- "8081:8081"
environment:
- REDIS_URL=redis://redis:6379/0
- REDIS_SRE_MASTER_KEY=${REDIS_SRE_MASTER_KEY}
- TOOLS_PROMETHEUS_URL=http://prometheus:9090
- TOOLS_LOKI_URL=http://loki:3100
depends_on:
redis:
condition: service_healthy
volumes:
- .env:/app/.env
- ./redis_sre_agent:/app/redis_sre_agent
command: uv run redis-sre-agent mcp serve --transport http --host 0.0.0.0 --port 8081
networks:
- sre-network
profiles:
- mcp # Start with: docker compose --profile mcp up
- ssl # Or with SSL: docker compose --profile ssl up

# MCP SSL Proxy - HTTPS termination for MCP server
# Run scripts/generate-mcp-certs.sh first to generate self-signed certs
sre-mcp-ssl:
image: nginx:alpine
ports:
- "8450:443"
volumes:
- ./monitoring/nginx/mcp-ssl.conf:/etc/nginx/conf.d/default.conf:ro
- ./monitoring/nginx/certs:/etc/nginx/certs:ro
depends_on:
- sre-mcp
networks:
- sre-network
profiles:
- ssl # Only start with: docker compose --profile ssl up

# SRE Agent UI
sre-ui:
build:
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/core.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This section explains the core ideas behind Redis SRE Agent and how pieces fit t
When you create a task, the API creates or reuses a thread to store the execution history. You can:
- Poll the task for status: `GET /api/v1/tasks/{task_id}`
- Read the thread for results: `GET /api/v1/threads/{thread_id}`
- Stream updates via WebSocket: `ws://localhost:8000/api/v1/ws/tasks/{thread_id}`
- Stream updates via WebSocket: `ws://localhost:8080/api/v1/ws/tasks/{thread_id}` (Docker Compose) or port 8000 (local)

- **Jobs**
- Ad-hoc jobs: On-demand via CLI or API. Each run creates a task and streams results to a thread.
Expand Down
Loading
Loading