Inspiration

The AI revolution has a hidden cost crisis. According to Cast AI's 2024 Kubernetes report, enterprise GPU utilization averages just 30% — meaning 70% of expensive GPU capacity sits idle. Companies are paying millions for GPUs that finish training jobs at 3 AM and sit dormant until morning.

We asked ourselves: What if AI agents could negotiate for GPU resources, just like they negotiate everything else?

The rise of agentic AI — autonomous agents that can plan, reason, and take actions — presented a unique opportunity. These agents need compute on-demand, but traditional infrastructure doesn't speak their language. We envisioned a world where agents could autonomously request GPUs, gracefully handle preemption, and checkpoint their state — all without human intervention.

That's how Xid-R was born: The Agentic GPU Broker.

What it does

Xid-R creates a real-time infrastructure where:

  1. GPU Owners register idle capacity that can be harvested
  2. AI Agents request GPUs via MCP (Model Context Protocol) tools
  3. The Control Plane matches requests to available capacity using intelligent scheduling
  4. A2A Protocol enables graceful preemption negotiation between the broker and tenant agents

The Magic Moment: When a GPU needs to be reclaimed (e.g., Spot VM preemption), Xid-R doesn't just kill the workload. Instead, it initiates an Agent-to-Agent negotiation:

[Control Plane] → "I need this GPU back in 120 seconds"
[Tenant Agent]  → "Let me checkpoint my state first"
[Control Plane] → "Acknowledged, proceed"
[Tenant Agent]  → "Checkpoint saved to gs://..., releasing GPU"
[Control Plane] → "Capacity reclaimed, resume queued"

Result: Zero crashed jobs. Zero lost progress. Seamless resume on new capacity.

How we built it

Architecture:

architecture

A2A Protocol - Agent Negotiation Flow a2a-flow

Tech Stack:

Layer Technology
Frontend React + Vite + TailwindCSS (Vercel)
Backend API Node.js + Hono (Cloud Run)
Database Firestore (real-time state sync)
Checkpoint Storage Google Cloud Storage
AI Model Gemini 3.5 (chatbot assistant)
Agent Protocol A2A (Agent-to-Agent) for negotiation
Tool Protocol MCP (Model Context Protocol) for GPU requests
GPU Capacity GKE + Spot VMs with VM Agents

Key Implementation Details:

  1. MCP Tools Interface: Agents request GPUs using xidr_request_gpu, acknowledge checkpoints with xidr_checkpoint_ack, and release with xidr_release

  2. A2A Negotiation Flow: When preemption occurs, the Negotiator sends a reclaim_request task to the tenant agent's A2A endpoint. The agent responds with its chosen action (checkpoint/migrate/accept_loss)

  3. Cooperative Checkpointing: Agents serialize their own state (task queue, scratchpad, conversation history) to GCS — no kernel-level intrusion required

  4. Real-time Dashboard: WebSocket-powered UI shows live GPU utilization, active leases, and cost savings

Challenges we ran into

  1. A2A Protocol Implementation: Getting bidirectional agent communication working reliably required careful handling of timeouts, retries, and state machine transitions. The lease lifecycle (pending → active → negotiating → checkpointed → resuming) had many edge cases.

  2. Spot VM Preemption Timing: Google Cloud gives 30-120 seconds notice before terminating Spot VMs. We had to ensure our negotiation + checkpoint flow completes within this window.

  3. Cross-Origin Complexity: The frontend (Vercel) and backend (Cloud Run) are on different domains, requiring careful CORS configuration and credential handling.

  4. Type System Boundaries: Ensuring consistent enum values (spot_vm vs gce_spot) across Python VM agents and TypeScript backend caught several subtle bugs.

  5. Graceful Degradation: What happens when an agent can't checkpoint in time? We implemented fallback paths (accept loss, force eviction) while maintaining audit trail integrity.

Accomplishments that we're proud of

  • First A2A-native GPU broker: No existing solution uses Agent-to-Agent protocol for resource negotiation
  • Zero crashed jobs in demo: Every preemption resulted in successful checkpoint
  • $14.83 saved in demo environment: Real cost savings from harvested idle capacity
  • 7 successful checkpoints: Proving the cooperative checkpoint model works
  • Sub-second grant latency: Agents get GPU access instantly when capacity is available
  • Production deployed: Live on Google Cloud Run + Vercel, not just localhost

What we learned

  1. Agents negotiating with agents is powerful: The A2A protocol enables coordination patterns impossible with traditional APIs

  2. Cooperative > Invasive: Letting agents checkpoint their own state is simpler and more reliable than kernel-level memory snapshots

  3. Real-time matters: WebSocket-powered dashboards make infrastructure observable in ways batch APIs can't

  4. The broker layer is the value: Raw Spot VMs and GKE exist; the innovation is orchestrating them for autonomous agents

  5. MCP + A2A complement each other: MCP for request/response tools, A2A for peer-to-peer negotiation — together they enable true agent autonomy

What's next for Xid-R

Phase 1: Multi-Cloud (Q1)

  • AWS GPU support (EC2 Spot Instances)
  • Azure GPU support (Spot VMs)
  • Cross-cloud orchestration

Phase 2: Advanced Features (Q2)

  • Predictive preemption (ML-based)
  • Cost-aware scheduling
  • SLA guarantees with credits

Phase 3: Marketplace (Q3)

  • Public GPU marketplace
  • Reputation system for providers
  • Automated dynamic pricing

Vision: The "Airbnb for GPUs" — powered by agents, for agents.

Built With

Share this project:

Updates

Submission history