Skip to main content

ResponseIQ

CI GitHub Release PyPI License Coverage Python OpenSSF Scorecard OpenSSF Best Practices

Turn an incident log into a reviewable remediation decision.

ResponseIQ is a trust-first incident remediation copilot. It analyzes crash logs with Ollama or OpenAI, applies policy and safety checks, records rollback and proof evidence, and can validate an explicit patch in an isolated Git worktree before opening a GitHub draft PR.

Zero config. Try it now:

pip install responseiq && responseiq demo

Support ResponseIQ

If ResponseIQ is useful to you, you can support the project with any amount you choose. Every contribution is appreciated and helps keep the project moving.

Sponsor ResponseIQ


How it works

# Pipe Kubernetes logs straight in — no plugin, no config
kubectl logs payment-svc --since=1h | responseiq --mode fix --target - --explain

# Or Docker
docker logs --tail 200 my-api | responseiq --mode fix --target - --explain

ResponseIQ can:

  1. Filter out noise lines automatically
  2. Analyze high-severity incidents with a local or hosted LLM, or use the rule-engine fallback
  3. Apply Trust Gate checks before recommending or submitting remediation
  4. Validate an explicit patch in a temporary isolated Git worktree
  5. Open a GitHub draft PR after validation when repository, token, patch, and test commands are supplied
  6. Write a REASONING.md audit log you can paste straight into your post-mortem

Without an explicit patch and validation workflow, fix produces a remediation recommendation for review; it does not claim to autonomously modify production.


What makes it different

Most log analysis tools pattern-match on error strings. ResponseIQ does something different: it reads your code.

When source mappings are configured and a stack trace identifies /app/services/auth_service.py:120, ResponseIQ can resolve that path and load relevant source context via Tree-sitter. This improves the remediation recommendation; every proposed change still requires validation and human review.


Benchmark (project-reported)

Evaluated against SWE-bench Verified — the same dataset used to rank SWE-agent, Devin, and OpenHands.

Model Samples Pass@1 Latency p50 API key needed
llama3.2 (local Ollama) 20 20% 29s No

The reported result is an internal evaluation, not an independent benchmark or production success guarantee. See reports/swe_bench_eval.md for methodology and per-repo results.


Architecture

flowchart TD
    A([Log Input]) --> B[Noise Filter]
    B --> C[Concurrent Scan — asyncio.gather]
    C --> D{AI Classifier}
    D -->|HIGH / CRITICAL| E[Tree-sitter AST Source Loader]
    D -->|LOW| Z([Skip])
    E --> F[LLM Reasoning — Ollama / OpenAI]
    F --> G{Trust Gate — 7 guardrails}
    G -->|Approved| H[ProofBundle — SHA-256 sealed]
    G -->|Blocked| I([Human Review])
    H --> J[GitHub PR — githubkit]
    J --> K[PR Bot — /responseiq approve]

Features

Core pipeline

What How
Reads your actual source code Tree-sitter AST loads the exact crashing functions, not just file paths
Multi-repo path resolution Maps container paths like /app/services/auth.py to your real source — local or remote
Trust Gate — 7 guardrails No bare except, no secrets, syntax valid, blast radius assessed, and more — every patch must pass all 7
SHA-256 proof chain Every decision is sealed into a ProofBundle — SOC2-ready audit trail
GitHub PR workflow Opens a draft PR after an explicit patch passes isolated validation
Rollback script Generates an executable rollback_<id>.py alongside every patch
Works without any API key Full rule-engine fallback is always available

Optional integrations and extensions

Feature What it does
--mode watch daemon Continuous async tail of any log file; bursts are debounced and sent for AI analysis automatically
SSE streaming endpoint POST /api/v1/incidents/analyze/stream emits live events (started → scrubbing → analyzing → critic → trust_gate → complete) so UIs update in real time
Critic / reviewer agent A second fast-model pass reviews every proposed fix for logic errors and hidden regressions before the Trust Gate runs
LiteLLM multi-provider Set RESPONSEIQ_USE_LITELLM=true to route calls through LiteLLM — supports 100+ providers with a single env-var switch
OTel GenAI conventions All LLM calls emit gen_ai.* OpenTelemetry spans — plug any OTLP-compatible backend for cost and latency tracking
DSPy prompt optimiser Scaffold for automatic prompt optimisation via DSPy; activate with responseiq[dspy] + RESPONSEIQ_DSPY_ENABLED=true
MCP server responseiq-mcp exposes four tools (analyze_incident, get_remediation, run_trust_gate, open_pr) via the Model Context Protocol for agent integrations

Language-specific parsers

Dedicated parsers extract rich structured context — goroutine IDs, stack frames, exception chains, and framework signals — before the AI even sees the log.

Language / Framework What it extracts
Go panic message, goroutine states, stack frames with file + line, signal crashes (SIGSEGV, SIGABRT)
Node.js TypeError/ReferenceError, V8 stack frames with column numbers, unhandled promise rejections
Spring Boot Exception chain, root cause, Log4j/Logback lines with thread and logger
Django Exception type, traceback frames, request path
FastAPI Uvicorn/Starlette exception context
Python (built-in) All Python tracebacks via KeywordParser

Infrastructure features

Feature What it does
Post-apply watchdog Optional component for monitoring error-rate signals and triggering rollback after guarded application; configure and test it before production use.
K8s YAML patcher Edits Kubernetes Deployment manifests using ruamel.yaml — comments, quotes, and indentation survive the diff.
Stateful conversations Each incident gets a persistent multi-turn AI session. Redis-backed in production; transparent in-memory fallback in dev/test.
PII scrubbing Regex email redaction is always on. Set RESPONSEIQ_NER_SCRUB=true and install spaCy to add NER-level PERSON/ORG/location scrubbing.

Quick start

CLI — local dev or CI

# 1. Install
pip install responseiq

# 2. Configure — 3 questions, writes .env, done
responseiq init

# 3. Scan
responseiq --mode scan --target ./logs/error.log

# 4. Fix with full explanation
responseiq --mode fix --target ./logs/error.log --explain

# 5. Shadow mode — read-only triage, nothing is changed
responseiq --mode shadow --target ./logs/ --shadow-report

# 6. Watch mode — continuous tail daemon
responseiq --mode watch --target ./logs/app.log

# 7. Validate an explicit patch and open a draft PR
export RESPONSEIQ_POLICY_MODE=pr_only
responseiq --mode fix --target ./logs/error.log \
  --repo your-org/your-repo \
  --patch-file ./responseiq-fix.patch \
  --validate "pytest -q" \
  --validate "ruff check src"

When --patch-file, --repo, and at least one --validate command are provided, an approved pr_only remediation is applied in a temporary Git worktree. The original checkout is never modified. The branch is committed, validated, pushed, and opened as a draft PR. Without those options, fix remains analysis-only and returns the recommendation for review.

No LLM key? The rule-engine fallback activates automatically. responseiq init is optional.

LLM options:

# Local Ollama (free, no data leaves your machine — recommended)
LLM_BASE_URL=http://localhost:11434/v1 LLM_ANALYSIS_MODEL=llama3.2 responseiq --mode scan --target ./logs/

# OpenAI
OPENAI_API_KEY=sk-... responseiq --mode scan --target ./logs/

Pipe from anywhere:

kubectl logs -l app=api --since=1h        | responseiq --mode fix  --target - --explain
docker logs --tail 200 my-container       | responseiq --mode scan --target -
cat ./logs/app.log                        | responseiq --mode scan --target -

# Structured JSON / NDJSON
echo '{"level":"ERROR","message":"KeyError: email","service":"api"}' \
  | responseiq --mode scan --target -

Self-hosted API server

# Start server + Postgres
docker-compose up -d
curl http://localhost:8000/health

# Local dev with hot-reload
uv sync
uv run uvicorn responseiq.app:app --reload

Point your existing alert tools at POST /api/v1/incidents/ingest:

Platform Integration
Datadog Webhook → POST /api/v1/incidents/ingest
PagerDuty Event Orchestration webhook
Sentry Internal Integrations → Webhook URL
Alertmanager Webhook receiver in alertmanager.yml
GitHub Actions curl step in your workflow

SSE streaming — get live progress events while an incident is being analysed:

curl -N -X POST http://localhost:8000/api/v1/incidents/analyze/stream \
  -H 'Content-Type: application/json' \
  -d '{"log_text": "ERROR: NullPointerException at UserService.java:42"}'
# event: started
# event: scrubbing
# event: analyzing
# event: critic
# event: trust_gate
# event: complete

MCP server — expose ResponseIQ as an AI agent tool:

pip install 'responseiq[mcp]'
responseiq-mcp          # starts stdio MCP server
# Tools: analyze_incident · get_remediation · run_trust_gate · open_pr

Try the built-in demo

git clone https://github.com/infoyouth/responseiq.git && cd responseiq
pip install responseiq

responseiq --mode scan   --target ./samples/crash.log
responseiq --mode fix    --target ./samples/crash.log --explain
responseiq --mode shadow --target ./samples/ --shadow-report

samples/ contains three real injected bugs with a pre-recorded crash log. No API key, no database, nothing to set up.

Expected scan output:

------------------------------------------------------------
  ResponseIQ Scan Report
  Target : samples/crash.log
  Status : SUCCESS
------------------------------------------------------------
  Scanned  : 3 message(s)
  Incidents: 3 found
------------------------------------------------------------
  1. [HIGH]     KeyError: 'email' in process_user_request
  2. [CRITICAL] Memory leak — _request_log unbounded growth
  3. [HIGH]     ZeroDivisionError: division by zero (reset race)
------------------------------------------------------------
  Tip: run with --mode fix to review remediation recommendations.
------------------------------------------------------------

SWE-bench

# Smoke run — 5 samples, no LLM key
uv run python scripts/swe_bench_eval.py --samples 5 --dry-run

# Full run (500 samples)
uv run python scripts/swe_bench_eval.py --samples 500

# Filter by repo
uv run python scripts/swe_bench_eval.py --repo sympy/sympy --samples 50

Outputs reports/swe_bench_eval.md and reports/predictions.jsonl (compatible with the official swebench Docker harness).


Development

uv sync
make lint    # ruff format --check + ruff check + mypy
make test    # pytest -n auto --dist=loadscope
make all     # lint + type-check + test + build + security audit

Project layout

src/responseiq/
  cli.py                        # CLI entry point (--mode scan|fix|shadow|watch)
  app.py                        # FastAPI server (webhooks + SSE streaming)
  mcp_server.py                 # MCP server — 4 agent tools (responseiq-mcp)
  ai/
    llm_service.py              # LLM calls with OTel GenAI spans + LiteLLM support
    dspy_optimizer.py           # DSPy prompt optimisation scaffold (opt-in)
  services/
    remediation_service.py      # Core LLM reasoning brain
    critic_service.py           # Second-pass critic/reviewer agent
    github_pr_service.py        # GitHub PR bot (githubkit)
    watchdog_service.py         # Post-apply error-rate monitor + auto-rollback
    conversation_service.py     # Stateful AI conversations (Redis + in-memory fallback)
  routers/
    streaming.py                # SSE streaming endpoint
  plugins/
    scan.py / fix.py / shadow.py / watch.py
    go_parser.py / nodejs_parser.py / spring_parser.py / django_parser.py / fastapi_parser.py
  utils/
    context_extractor.py        # Tree-sitter AST source loader
    multi_repo_resolver.py      # Maps container paths to local source files
    k8s_patcher.py              # Kubernetes YAML patcher (comment-preserving)
    log_scrubber.py             # PII redaction (email regex + optional spaCy NER)

Disclaimer

ResponseIQ uses generative AI to suggest infrastructure and code fixes. AI can hallucinate — syntactically correct but functionally wrong patches are possible. Review every PR or patch before merging. The Trust Gate reduces risk but is not a substitute for human review. See the MIT License — no warranty implied.

For security issues see docs/SECURITY.md.

Metadata

Release files for responseiq 2.34.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for responseiq 2.34.0
File Size Uploaded
responseiq-2.34.0.tar.gz 196.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for responseiq 2.34.0
File Interpreter ABI Platform
responseiq-2.34.0-py3-none-any.whl Python 3 none any Details

Total release size: 429.3 kB

Release files / responseiq-2.34.0.tar.gz

Download URL responseiq-2.34.0.tar.gz
Size 196.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2ef6fa0811b560782a38595166946a84a9c35cdf04da1775134672c0275f67c0
BLAKE2b-256 checksum
How to use checksums
ba9fa125fc0ffebf2c39136deae15390a03865eb0ef6ad4b457046557ee0bb13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / responseiq-2.34.0-py3-none-any.whl

Download URL responseiq-2.34.0-py3-none-any.whl
Size 232.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cef9ddc971e7f798ab8d2b43f71b2fd65fefd2a55b744ef4618294324e44f468
BLAKE2b-256 checksum
How to use checksums
16a2d51c5af79ff2c984f839092ffd4b3b55e379924290f57277739e65390103
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release history Release notifications | RSS feed

2.41.1

2 release files

2.41.0

2 release files

2.40.1

2 release files

2.40.0

2 release files

2.39.0

2 release files

2.38.0

2 release files

2.37.0

2 release files

This release

2.34.0 This release

2 release files

2.33.0

2 release files

2.32.0

2 release files

2.31.0

2 release files

2.30.2

2 release files

2.30.1

2 release files

2.30.0

2 release files

2.29.1

2 release files

2.29.0

2 release files

2.28.0

2 release files

2.27.0

2 release files

2.26.5

2 release files

2.26.4

2 release files

2.26.1

2 release files

2.26.0

2 release files

2.25.0

2 release files

2.9.0

2 release files

2.8.0

2 release files

2.7.0

2 release files

2.6.0

2 release files

2.5.0

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.4.0

2 release files

1.3.8

2 release files

1.3.7

2 release files

1.3.6

2 release files

1.3.5

2 release files

1.3.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page