How harshada-javeri/multiagent-ops-orchestrator works
Purpose and Entry Points
Python 3.10+ multi-agent QAOps system for CI/CD failure triage, remediation planning, ticket creation, and optionally approved execution. Primary programmatic pipeline is main_orchestrator.py; alternate interfaces are CLI (predict.py), Flask API (serve.py), and observability-integrated execution (integrated_orchestrator.py). Training artifacts are produced/used through train.py, models/agent_config.json, and models/agents.pkl.
Event Intake and Routing
The event boundary normalizes CI failure inputs before analysis. events/event_ingestion.py accepts supplied logs or fetch-oriented source events; events/event_schema.py defines event representation; events/event_router.py dispatches the event into the workflow. GitHub Actions is the fallback/demo source, while Jenkins is the primary CI integration.
Paths: events/event_ingestion.py, events/event_router.py, tools/github_tool.py.
Workflow Orchestration and State
Two orchestration styles coexist: direct sequential orchestration and a graph/state-driven workflow. The graph runner coordinates stages and state transitions; persisted state supports workflow continuity. This is the main control boundary between ingress and agent execution.
Paths: main_orchestrator.py, orchestration/workflow_graph.py, orchestration/workflow_runner.py, orchestration/state_manager.py.
Diagnostic and Reasoning Agents
Agents communicate through a shared base abstraction and structured message-like outputs. Diagnostics extracts failed tests, error patterns, and metadata from raw logs. Root-cause analysis combines diagnostic output, persisted historical memory, and an LLM to form hypotheses and confidence. Model/provider selection is centralized rather than embedded in individual integrations.
Paths: agents/base_agent.py, agents/test_diagnostics_agent.py, agents/root_cause_agent.py, utils/llm_factory.py, utils/memory_handler.py.
Planning, Ticketing, and Execution Gate
The planner turns root-cause output into prioritized remediation actions and creates an issue. Execution is explicitly downstream of planning: high-confidence approved actions may execute, while lower-confidence actions remain pending_approval. Ticket backend selection favors Jira and falls back to GitHub Issues when Jira is unavailable.
Paths: agents/action_planner_agent.py, agents/execution_agent.py, tools/jira_tool.py, tools/github_tool.py.
External Systems and Tool Boundary
Tool adapters isolate external API access from agents: Jenkins supplies CI logs, Grafana can contribute metrics, Jira manages tickets, and GitHub supports Actions log retrieval and issue fallback. Credentials and endpoint configuration are environment-driven. LLM support includes Google Gemini and OpenAI models according to the documented deployment/runtime configuration.
Paths: tools/tool_registry.py, tools/jenkins_tool.py, tools/grafana_tool.py, .env.example.
Observability and Deployment
Tracing spans orchestration, agent calls, LLM calls, and tool invocations, using Monocle telemetry with traces sent to Okahu. The service can run directly, in Docker/Compose, or through AWS AgentCore-oriented infrastructure provisioning.
Paths: observability.py, integrations/okahu_integration.py, DockerFile, docker-compose.yml, deployment/agentcore.tf.
Main entry points: action_planner_agent.py Action planner · tool_registry.py Tool registry · root_cause_agent.py Root-cause analysis · base_agent.py Shared agent base
Components 20
Entry & Intake
- Pipeline & interfaces · Programmatic orchestrator plus CLI, API, and integrated execution.
main_orchestrator.py - Event ingestion · Normalizes supplied logs and source events.
events/event_ingestion.py - Event router
events/event_router.py
Workflow Control
- Workflow graph · Defines graph-driven stages and transitions.
orchestration/workflow_graph.py - Workflow runner · Runs the state-driven workflow.
orchestration/workflow_runner.py - Persisted workflow state · Maintains continuity across workflow stages.
orchestration/state_manager.py
Agent Reasoning
- Shared agent base · Provides common structured agent communication.
agents/base_agent.py - Test diagnostics · Extracts failed tests, error patterns, and metadata.
agents/test_diagnostics_agent.py - Root-cause analysis · Builds hypotheses and confidence from diagnostics and history.
agents/root_cause_agent.py - Historical memory
utils/memory_handler.py - LLM provider factory · Centralizes Gemini and OpenAI selection.
utils/llm_factory.py - Action planner · Prioritizes remediation actions and initiates ticket creation.
agents/action_planner_agent.py - Approved execution · Executes only high-confidence approved actions; others await approval.
agents/execution_agent.py
Tool Adapters
- Tool registry · Isolates external API adapters from agents.
tools/tool_registry.py - Jenkins · Primary source of CI logs.
tools/jenkins_tool.py - GitHub Actions & Issues · Demo log source and fallback issue backend.
tools/github_tool.py - Grafana
tools/grafana_tool.py - Jira · Preferred issue backend.
tools/jira_tool.py
Observability & Deployment
- Monocle to Okahu · Captures orchestration, agent, LLM, and tool spans.
observability.py - Runtime deployment · Supports direct, Compose, and AgentCore-oriented deployment.
deployment/agentcore.tf
Connections 27
- Pipeline & interfaces → Event ingestion: submits CI failure
- Event ingestion → Event router: normalized event
- Jenkins → Event ingestion: primary logs
- GitHub Actions & Issues → Event ingestion: fallback/demo logs
- Event router → Workflow graph: dispatches
- Workflow graph → Workflow runner: defines stages
- Workflow runner → Persisted workflow state: reads and persists
- Workflow runner → Test diagnostics: runs diagnostic stage
- Shared agent base → Test diagnostics: base abstraction
- Shared agent base → Root-cause analysis: base abstraction
- Shared agent base → Action planner: base abstraction
- Test diagnostics → Root-cause analysis: findings
- Historical memory → Root-cause analysis: historical context
- LLM provider factory → Root-cause analysis: LLM access
- Root-cause analysis → Action planner: hypotheses and confidence
- Action planner → Jira: creates preferred ticket
- Action planner → GitHub Actions & Issues: issue fallback
- Action planner → Approved execution: approved high-confidence actions
- Action planner → Persisted workflow state: pending approval status
- Tool registry → Jenkins: adapter
- Tool registry → GitHub Actions & Issues: adapter
- Tool registry → Grafana: adapter
- Tool registry → Jira: adapter
- Workflow runner → Monocle to Okahu: workflow spans
- Shared agent base → Monocle to Okahu: agent spans
- Tool registry → Monocle to Okahu: tool spans
- Runtime deployment → Pipeline & interfaces: hosts runtime