-
Notifications
You must be signed in to change notification settings - Fork 798
Add A2A server #1537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add A2A server #1537
Conversation
from .applications import FastA2A | ||
from .schema import Skill | ||
|
||
__all__ = ['FastA2A', 'Skill'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to add the other classes here.
Docs Preview
|
main.py
Outdated
from pydantic_ai.a2a import FastA2A | ||
|
||
agent = Agent(name='Potato Agent') | ||
app = FastA2A(agent) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
app = FastA2A(agent) | |
app = FastA2A.from_agent(agent) | |
app = FastA2A.from_graph(graph, get_first_node: Callable[[list[Message], BaseNode]) |
PR Change SummaryImplemented the FastA2A library to facilitate the development of A2A servers, enhancing interoperability between AI agents.
Added Files
How can I customize these reviews?Check out the Hyperlint AI Reviewer docs for more information on how to customize the review. If you just want to ignore it on this PR, you can add the Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add |
This PR implements the
FastA2A
- an easy way to serve an agent using the A2A protocol.We need to make some decisions here.
High level decisions
inspector
client which makes life easier. This protocol still doesn't have such a thing. It makes the experience of developing A2A servers poor.Low level decisions
Checklist
Opinions A2A
Honestly, after developing this, I'm not sure if the protocol will thrive. It seems the specification was written in a hurry, it misses a lot of examples, and it doesn't specify how the workflows should be.
To be more concrete, let's say we want to send a task. It's (supposedly) the simplest workflow. When you send a task, you have some options:
How do we choose? Thinking about the best HTTP practices, ideally, we should send back an id, and run the task in the background... And that's what I did. That's more complicated tho, and also, is it really necessary? I can't make a simple developer-facing code without making this decision, because it implies in infrastructure changes.
In any case, I've developed this incomplete PR, which I hope we can discuss and refine in the next days.