Implementing AWS SigV4 via AgentExtension? #801
-
|
I'm looking to host A2A servers on AWS and wanted to use IAM to scope caller permissions. Previously, this wasn't possible, but with Unfortunately, there doesn't yet appear to be any clear language describing what extensions are allowed to do at a low level, so it's hard to see if I would be able to implement SigV4 on them right now. I'd like to know three things about extensions in particular:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Hey, sorry for missing this question. I think this is a great use case for extensions. Let me try to answer your questions:
Technically, anywhere. The Python SDK support I plan to add will be based on lifecycle hooks, and adding a hook that alters the HTTP content of an outgoing request is a good fit. This even seems like a reasonable fit for a standard
Since A2A doesn't strictly dictate HTTP headers, this is allowed. The primary restriction for extensions is that they cannot modify the core types in the specification (by adding new fields or removing required fields).
At the moment, yes. Extensions are not currently setup to be loaded on-demand -- you must directly configure the set of extensions your agent or client supports. This means it's the responsibility of the developer to identify the language-specific packages that implement the extension, then configure those in whatever way the package defines. Extensions are still very new, so I expect some of this to change, and hopefully get easier. My goal is that the SDK-level support for extensions becomes as straightforward as: handler = DefaultRequestHandler(
# ...
extensions=[AWSSigV4Extension(aws_credential)],
) |
Beta Was this translation helpful? Give feedback.
Hey, sorry for missing this question. I think this is a great use case for extensions.
Let me try to answer your questions:
Technically, anywhere. The Python SDK support I plan to add will be based on lifecycle hooks, and adding a hook that alters the HTTP content of an outgoing request is a good fit. This even seems like a reasonable fit for a standard
Authhandler for an httpx client, if you're using Python. Looks like there are even existing libraries for it: https://github.com/Colin-b/httpx_a…