DEV Community

David Nduonofit
David Nduonofit

Posted on

HNG Stage 3 Task

Building an AI Agent that conforms to A2A Standards

During Stage 3 of the HNG Internship, I built something that combined my faith and my love for code — an Agent-to-Agent (A2A) Christian Therapy API.

This API, powered by FastAPI and the JSON-RPC 2.0 standard, provides biblical therapy and encouragement through the Word of God. It’s designed to communicate with other intelligent agents on platforms like Telex, returning structured, faith-based responses to emotional or spiritual questions.


The Vision

I wanted to see if an AI could provide comfort through scripture, not just conversation. Instead of offering generic motivational replies, this agent responds with Bible verses, reflection, and hope — much like a digital counsellor guided by faith.

Here’s the response format from the /a2a/therapist endpoint:

{
  "jsonrpc": "2.0",
  "id": "request-001",
  "result": {
    "status": {
      "state": "completed",
      "message": {
        "role": "agent",
        "parts": [
          {
            "kind": "text",
            "text": "A detailed response stuff..."
          }
        ]
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Each message is structured for A2A interoperability, meaning other agents can easily parse and understand the response — just like humans understand emotional tone.


The Journey

This project wasn’t without challenges.
I ran into several issues — from malformed JSON-RPC structures to strict Pydantic model validation errors. Ensuring that every response matched the A2A standard took patience, but it taught me how AI agents communicate cleanly and predictably across systems.


Why It Matters

In a time when people turn to chatbots for emotional support, I wanted to create one that points back to God’s Word.

It’s not meant to replace real counseling, but to be a gentle companion — offering reminders of peace, comfort, and faith in difficult times.

The Future

I plan to enhance it with:

  • Emotional tone detection
  • Multi-turn conversation memory
  • Verse retrieval from different Bible translations

You can check out the full source code and setup details here:
👉 GitHub – Forsaken324/ndus-hng-stage-three


Top comments (0)