Jira A2A Proof of Concept

Build Statusarrow-up-rightGoDocarrow-up-rightCoverage Statusarrow-up-right

Overview

The Jira A2A system is a DevOps workflow automation platform using the tRPC-A2A-Go frameworkarrow-up-right. It consists of independent Go agents that communicate via A2A messages, each implementing the standard TaskProcessor interface.

Agent-to-Agent (A2A) Communication

Agent-to-Agent (A2A) is a decentralized messaging pattern where independent services (agents) exchange strongly-typed tasks and results over a transport layer—in this case, gRPC—without tight coupling or shared state. Each agent publishes and subscribes to tasks using the trpc-a2a-goarrow-up-right library, which:

  • Defines a common TaskProcessor interface for sending and handling tasks.

  • Serializes tasks as protobuf messages and transports them over gRPC.

  • Handles routing, retry, and backoff transparently between agents.

For more details, see the official trpc-a2a-go GitHub repoarrow-up-right and its pkg.go.dev documentationarrow-up-right.

System Architecture

spinner

System Sequence Diagram

The following Mermaid sequence diagram illustrates the step-by-step message flow between major system components:

spinner

Key Components

  • JiraRetrievalAgent: Handles Jira webhook events, extracts ticket information, coordinates with other agents, and posts analysis results back to Jira.

  • InformationGatheringAgent: Analyzes ticket information, integrates with LLM for intelligent analysis, generates insights and recommendations, and returns structured analysis results.

  • CopilotAgent (Planned): Receives implementation requirements, integrates with GitHub Copilot API, generates code, and creates pull requests.

  • LLM Integration: Provides AI-powered analysis, generates summaries and insights, identifies missing information, and recommends next actions.

  • tRPC-A2A-Go Library: Underlying agent-to-agent communication framework used by this system; see the upstream repoarrow-up-right for details.

System Workflow

  1. Webhook Reception: JiraRetrievalAgent receives a webhook from Jira

  2. Data Extraction: JiraRetrievalAgent extracts ticket details

  3. Task Creation: JiraRetrievalAgent creates a "ticket-available" task

  4. Analysis Request: JiraRetrievalAgent sends the task to InformationGatheringAgent

  5. Information Analysis: InformationGatheringAgent processes the task with LLM assistance

  6. Results Return: InformationGatheringAgent returns structured insights to JiraRetrievalAgent

  7. Jira Update: JiraRetrievalAgent posts a comment to the Jira ticket

  8. Code Implementation: (Future) JiraRetrievalAgent triggers CopilotAgent for code generation

  9. Pull Request Creation: (Future) CopilotAgent creates a GitHub pull request

Current Implementation Status

  • JiraRetrievalAgent: Fully implemented (webhook handling, Jira API integration, task coordination)

  • InformationGatheringAgent: Fully implemented (task processing, LLM integration, analysis generation)

  • CopilotAgent: Planned, not implemented

Component Details

JiraRetrievalAgent

Purpose: Handles Jira webhooks, coordinates agents, and updates Jira tickets.

Key Functions:

  • Processes incoming Jira webhook events

  • Retrieves ticket information from Jira API

  • Transforms Jira data into structured tasks

  • Sends tasks to the InformationGatheringAgent

  • Posts analysis results back to Jira tickets

Webhook Example:

InformationGatheringAgent

Purpose: Analyzes ticket information to provide structured insights and recommendations.

Key Functions:

  • Receives "ticket-available" tasks from JiraRetrievalAgent

  • Processes ticket data using LLM for analysis

  • Generates structured insights and recommendations

  • Returns analysis results to JiraRetrievalAgent

Analysis Example:

LLM Integration

  • Integrates with OpenAI API (or alternative LLM providers)

  • Implements prompt engineering for consistent analysis

  • Handles API communication, rate limiting, and error handling

  • Extracts structured data from LLM responses

Configuration Example:

Running the Application

Using Make

Using Docker Compose

Manually

Testing

Simulating a Jira Webhook

Setup

Prerequisites

  • Go 1.16 or higher

  • Access to a Jira instance

Configuration

The application uses environment variables for configuration:

Running the Application

  1. Build and run the InformationGatheringAgent:

  1. The agent will start on the configured port (default: 8080) and listen for "ticket-available" tasks.

Testing

Simulating a Jira Webhook

You can simulate a Jira webhook by sending a POST request to the agent:

Using the Client Example

The client_example.go file contains examples of how to use the A2A client to send a "ticket-available" task and how to simulate a Jira webhook.

Future Work

  1. JiraRetrievalAgent

    • Listen for new Jira ticket webhooks

    • Emit a "ticket-available" A2A task with ticket information

Known Limitations and Future Improvements

  • Components are tightly coupled; refactoring for modularity is planned

  • Limited context in error messages; structured logging should be improved

  • Insufficient unit and integration tests; coverage will be expanded

  • Configuration validation and security enhancements are planned

  • CopilotAgent and code generation are planned for future releases

Contributing

  1. Fork the repository

  2. Create a feature branch

  3. Make your changes

  4. Write tests for your changes

  5. Submit a pull request

License

MITarrow-up-right

Last updated

Was this helpful?