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 functionutils.fetch_issuesto get the data from GitHub 
Implementation notes
- 
agents/github_issues_agent.pyextractsowner/repostrings from the message parts. It builds aTaskResultthat includes a textual summary and an artifact containing the full issues payload. - 
utils/fetch_issuesuseshttpxand handles rate-limit behavior by allowing aGITHUB_TOKENin the environment. 
You can check it out at github.com/johnafariogun/github_app
— End
    
Top comments (0)