Architectural Innovations

Deep deconstruction of production-grade agentic frameworks, post-training optimization pipelines, and custom integration protocols.

LiveKit A2A Relay — Real-Time Audio Bridge

Rust Crate WebRTC Actor Model v0.1.0

An ultra-low latency bridge that seamlessly connects a LiveKit WebRTC room to any Agent-to-Agent (A2A) compliant HTTP/SSE endpoint. This crate abstracts away the complexities of real-time audio synchronization, allowing developers to focus on building intelligent AI agents while LiveKit handles high-performance WebRTC transport.

Package Info

Crate Name livekit-a2a-relay
Version 0.1.0
Edition 2021
MSRV 1.75+
License Apache-2.0

Feature Flags

  • default: Minimal feature set (core actor, jitter buffer, VAD).
  • a2a-client: Enables the OfficialA2aClient backed by the a2a-client crate.
  • a2a-integration: Enables client and experimental SLIM-RPC transport.

Build Requirements

Because webrtc-sys compiles native WebRTC C++ code and relies on code-generation via bindgen, it requires cmake and Clang / LLVM Headers in the path.

# Set environment variable pointing to Clang include dir if crypt/webrtc compilation fails:
export BINDGEN_EXTRA_CLANG_ARGS="-I/usr/lib/llvm-20/lib/clang/20/include"
View upstream LiveKit SDKs Repository

Teach Gemma 3 to Reason — GRPO Optimization

GRPO Unsloth 16-bit Google Tunix Hackathon Winner

Developed for the Google Tunix Hackathon (*Kaggle Bronze* winning entry), this post-training pipeline focuses on teaching the Gemma 3 foundation model to reason autonomously. Using a System 2 cognitive architecture (enforced via a custom Plan-Evaluate-Execute XML markup cycle), it significantly decreases hallucination rates.

To bypass TPU-only constraints in the original Tunix framework, I engineered a GPU-unlock translation layer. Using **Group Relative Policy Optimization (GRPO)**, it creates a set of \(G\) completions per prompt, scores them with a reward verifier, and calculates relative advantages—avoiding the memory overhead of a separate critic model:

\[A_i = \frac{r_i - \text{mean}(r_1, \dots, r_G)}{\text{std}(r_1, \dots, r_G)}\]

The relative advantage \(A_i\) is then applied to policy updates using importance sampling ratios, clipped to prevent excessive updates, and penalized with a Kullback-Leibler (KL) divergence term to prevent model drift from the reference policy. This system was orchestrated on a Ray GPU cluster utilizing Unsloth for high-speed 16-bit quantized base weights.

[RLVR] Programmatic Reward Verifier (Python snippet)

def evaluate_reasoning_reward(completion_text: str, expected_answer: str) -> float:
    """
    RLVR verifier enforcing XML tag structures and mathematical accuracy.
    """
    import re
    reward = 0.0
    
    # 1. Enforce strict formatting tags
    think_match = re.search(r"<think>(.*?)</think>", completion_text, re.DOTALL)
    answer_match = re.search(r"<answer>(.*?)</answer>", completion_text, re.DOTALL)
    
    if think_match and answer_match:
        reward += 0.2  # Formatting compliance reward
        
        # 2. Extract and verify answer
        extracted_ans = answer_match.group(1).strip()
        if extracted_ans == expected_answer:
            reward += 1.0  # Accuracy reward
        else:
            reward -= 0.3  # Incorrect answer penalty
    else:
        reward -= 0.5  # Strict syntax penalty
        
    # 3. Penalize repetition loop anomalies
    if len(re.findall(r"(\b\w+\b)(?=.*\1)", completion_text)) > 20:
        reward -= 0.4
        
    return float(reward)
View Kaggle Notebook

MedSwarm — Edge Multi-Agent Diagnostic Network

LangGraph MedGemma Adversarial Debating

MedSwarm is designed as a localized multi-agent diagnostic framework executing on edge compute in low-connectivity areas. Utilizing cyclical state graphs in LangGraph, the system models diagnostic queries as state transitions over a shared AgentState payload.

[LangGraph Schema] ReAct & Debate Cycles

1. Generator Node: Translates patient symptoms into a differential diagnosis trail using local vector indexes (RAG).
2. Critic Node: Implements persona-based adversarial debating, auditing clinical justifications, checking drug contraindications, and flagging diagnostic hallucinations.
3. Adjudicator Edge: Loops back if arguments fail schema checks, routing to the Generator for iterative path updates, or compiling the final treatment output.

By partitioning complex operations into specialized nodes rather than a single monolithic context prompt, MedSwarm reduces hallucination rates under resource-constrained clinical settings.

View Kaggle Notebook

Standardizing Tool Access via Model Context Protocol

MCP Server JSON-RPC Secure schemas

To replace brittle, ad-hoc API orchestrations, I integrated the Model Context Protocol (MCP). MCP is an open standard that decouples front-facing LLM hosts from back-end utility servers using JSON-RPC transports.

MCP Layer System Responsibility Security Boundaries
MCP Host Client process initiating LLMs (e.g. voice pipeline runner). Manages API tokens, coordinates tool-call approvals, and maintains safety filters.
MCP Client Stateful router matching JSON-RPC schema calls. Validates signatures, serializes parameters, and monitors execution timeouts.
MCP Server Exposes standardized resources and execution tools. Strict schema validation (Pydantic), sandboxed tool execution, and local-only filesystem bounds.

[FastMCP] Declaring Tools and Resources

from mcp.server.fastmcp import FastMCP

# Initialize MCP Server for portfolio data lookup
app = FastMCP("PortfolioMetadataServer")

@app.tool()
def search_innovations(category: str) -> str:
    """
    Exposes query lookup for candidate's architectural achievements.
    """
    data = {
        "alignment": "GRPO implementation on Gemma 3 LLM.",
        "systems": "Go P2P connection channels & C++ ECC mTLS firmware."
    }
    return data.get(category.lower(), "Innovation category not indexed.")

@app.resource("resource://resume/experience")
def get_experience_json() -> str:
    """
    Returns structured JSON data of candidate career history.
    """
    return """
    {
      "candidate": "Jayaprakash M",
      "active_role": "Senior Development Engineer",
      "company": "Truminds Software Systems"
    }
    """

ProdAIve — Real-Time Kiln Optimization & Data Science Agent

Gen AI Exchange Hackathon Vertex AI LangChain

ProdAIve is a transformative AI optimization system designed to bring agentic automation to cement manufacturing kiln operations. It integrates Google's Gemini models for guided troubleshooting and natural language UI orchestration.

The system leverages an autonomous LangChain Data Science Agent to parse kiln sensor parameters, query Google BigQuery logs, and trigger predictive models deployed on Vertex AI endpoints to anticipate temperature anomalies and optimize thermal efficiency.

View GitHub Code Base

MedTrust — Decentralized Healthcare Agent Swarm

AWS Bedrock Serverless Lambda NPM Workspaces

MedTrust was developed for the AWS AI for Bharat Hackathon 2026. It is a production-ready, serverless agentic ecosystem that bridges patients, clinical practitioners, and government bodies (CDSCO, ICMR, NPPA data).

Architected as an Agent-to-Agent (A2A) monorepo, it orchestrates four distinct roles: patient-agent (React Native PWA), doctor-agent (clinical portal), gov-agent (public health analytics), and cloud-agent (an AWS Bedrock-powered Claude 3 Haiku relay executing secure, cryptographic intent schemas).

View GitHub Code Base Live Main Portal Doctor Portal Demo