Skip to content

Conversation

@edenreich
Copy link
Collaborator

This PR implements A2A agent listing functionality for the Inference Gateway SDK.

Changes

  • Add ListAgents() function to list all available A2A agents
  • Add GetAgent() function to fetch specific agent by ID
  • Download latest OpenAPI spec with A2A endpoints
  • Generate updated types with A2AAgentCard and ListAgentsResponse
  • Add comprehensive tests with table-driven scenarios
  • Include error handling for 403, 401, 404, 500 status codes
  • Add timeout and cancellation support
  • Follow existing SDK patterns and conventions
  • Include detailed documentation with usage examples

Testing

All 88 tests pass, including comprehensive A2A test coverage:

  • Happy path scenarios
  • Error handling tests
  • Edge case testing
  • Timeout and cancellation tests

Usage

// List all A2A agents
agents, err := client.ListAgents(ctx)

// Get specific agent by ID
agent, err := client.GetAgent(ctx, "agent-id-123")

Resolves #24

Generated with Claude Code

- Add ListAgents() function to list all available A2A agents
- Add GetAgent() function to fetch specific agent by ID  
- Download latest OpenAPI spec with A2A endpoints
- Generate updated types with A2AAgentCard and ListAgentsResponse
- Add comprehensive tests with table-driven scenarios
- Include error handling for 403, 401, 404, 500 status codes
- Add timeout and cancellation support
- Follow existing SDK patterns and conventions
- Include detailed documentation with usage examples

Resolves #24

Co-authored-by: Eden Reich <edenreich@users.noreply.github.com>
@edenreich edenreich merged commit 7af9c99 into main Aug 28, 2025
1 check passed
@edenreich edenreich deleted the claude/issue-24-20250828-0310 branch August 28, 2025 05:19
github-actions bot pushed a commit that referenced this pull request Aug 28, 2025
## [1.13.0](v1.12.0...v1.13.0) (2025-08-28)

### ✨ Features

* **a2a:** Add functions to list and fetch A2A agents ([#25](#25)) ([7af9c99](7af9c99)), closes [#24](#24)
@github-actions
Copy link

🎉 This PR is included in version 1.13.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Create a function to allow listing A2A agents

2 participants