Skip to content

Phase 4: Google ADK Integration #5

Description

@rmax

Description

Integrate Google ADK 2.x as the model and workflow layer. Implement the Gemini adapter with structured output, credential validation, context builder for fresh-session reconstruction, and token/usage tracking.

Key Deliverables

  1. Google ADK Adapter — CodingAgent protocol implementation using ADK
  2. Credential Validation — validates API key or Vertex AI credentials at startup
  3. Structured Agent Proposal — Pydantic models for typed model output
  4. Response Validation — retry with validation feedback on invalid output
  5. Context Builder — reconstructs fresh context per iteration
  6. Repository Map — file map for context construction
  7. Token/Usage Tracking — exact usage from Gemini API
  8. ADK Workflow Nodes — PrepareContext, InvokeCodingAgent, ValidateProposal

Acceptance Criteria

  • GoogleAdkCodingAgent correctly implements CodingAgent protocol
  • Structured output returns valid FileEdit and CommandRequest proposals
  • Invalid structured output triggers retry with validation feedback
  • Credential validation fails clearly when model is unavailable
  • Model precedence: CLI > goal contract > env > default
  • Context builder creates compact context with repository map
  • Token usage is tracked from Gemini API response
  • ADK workflow nodes are independent of domain logic
  • Live model smoke test (marked live_model) works with real credentials
  • Ruff, mypy, and unit tests pass

Depends on: #3, #4

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:backlogNot started, awaiting dependenciesstoryIndividual work item under an epic

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions