DEV Community

John Afariogun
John Afariogun

Posted on

A2A adventures

Building a GitHub Issues Agent with FastAPI and A2A

This project demonstrates a small agent that receives A2A JSON-RPC messages and returns GitHub issues for a repository. It is intentionally minimal — focusing on clear message schemas, simple HTTP fetch logic, and deterministic behavior.

Motivation

I wanted an agent that can be called by other systems via an A2A JSON-RPC contract and that returns a small, well-formed payload containing issue metadata and a short textual summary.

Architecture

  • FastAPI for the HTTP server and lifecycle management
  • Pydantic models (in models/a2a.py) for the message contract
  • A single agent implementation (agents/github_issues_agent.py) that extracts the repository and calls a tool function utils.fetch_issues to get the data from GitHub

Implementation notes

  • agents/github_issues_agent.py extracts owner/repo strings from the message parts. It builds a TaskResult that includes a textual summary and an artifact containing the full issues payload.
  • utils/fetch_issues uses httpx and handles rate-limit behavior by allowing a GITHUB_TOKEN in the environment.

You can check it out at github.com/johnafariogun/github_app
— End

Top comments (0)