New integration proposal: a2a-haystack (A2ATool / A2AToolset)

Open
#4,222 11 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
ai, backend

Research direction

Start with scripts/create_new_integration.py --type tools and the mcp-haystack layout, then review the a2a-sdk 1.x client API for create_client and send_message. The issue describes wrapping Agent Card skills as Haystack tools and accepting card URLs through A2AToolset; done means the new integration supports those flows and has coverage for them.

Written by the indexing model from the issue text.

Description

new integration P2

Summary

Add an a2a-haystack integration, built on a2a-sdk 1.x and modeled on mcp-haystack: A2ATool wraps a remote A2A agent as a Haystack Tool, and A2AToolset turns Agent Card URLs into tools. Hayhooks already serves pipelines over A2A (inbound); this adds the outbound side.

from haystack_integrations.tools.a2a import A2AToolset

tools = A2AToolset(card_urls=["https://travel.example.com/.well-known/agent-card.json"])
agent = Agent(chat_generator=OpenAIChatGenerator(model="..."), tools=tools)

Benefits

  • A Haystack Agent can delegate to agents on other frameworks or run by other teams, by card URL, without a custom tool per agent.
  • Tools are described from the card's skills, so the LLM knows when to delegate.
  • Together with Hayhooks, Haystack covers A2A in both directions, the same pattern it has for MCP.

Proposed design

  • Scaffold with scripts/create_new_integration.py --type tools, following mcp-haystack's layout.
  • A2ATool(Tool) resolves the card with create_client, describes itself from the card's skills and calls send_message.

Checklist

If the request is accepted, ensure the following checklist is complete before closing this issue.
Follow the instructions in https://github.com/deepset-ai/haystack-core-integrations/blob/main/CONTRIBUTING.md#create-a-new-integration and use our scaffolding script for the implementation.

Tasks
  • The code is documented with docstrings and was merged in the main branch
  • Docs are published at https://docs.haystack.deepset.ai/
  • There is a Github workflow running the tests for the integration nightly and at every PR
  • A new label named like integration:<your integration name> has been added to the list of labels for this repository
  • The labeler.yml file has been updated
  • The package has been released on PyPI
  • An integration tile with a usage example has been added to https://github.com/deepset-ai/haystack-integrations
  • The integration has been listed in the Inventory section of this repo README
  • The feature was announced through social media
Dominant language
Python
Stars
212
Forks
396
Avg merge
2d 9h
Merged PRs (30d)
95

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from deepset-ai/haystack-core-integrations

All issues in deepset-ai/haystack-core-integrations

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.