Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,37 @@
AAgent
ACMRTUXB
ACard
AClient
ACMRTUXB
aconnect
adk
AError
AFast
agentic
AGrpc
aio
aiomysql
amannn
aproject
ARequest
ARun
AServer
AServers
AService
AStarlette
AUser
DSNs
EUR
GBP
GVsb
INR
JPY
JSONRPCt
JWS
Llm
POSTGRES
RUF
SLF
Tful
aconnect
adk
agentic
aio
aiomysql
amannn
aproject
autouse
backticks
cla
Expand All @@ -29,32 +42,23 @@ coro
datamodel
deepwiki
drivername
DSNs
dunders
euo
EUR
excinfo
fernet
fetchrow
fetchval
GBP
genai
getkwargs
gle
GVsb
ietf
initdb
inmemory
INR
isready
JPY
JSONRPCt
JWS
kwarg
langgraph
lifecycles
linting
Llm
lstrips
mikeas
mockurl
Expand All @@ -64,7 +68,6 @@ oidc
opensource
otherurl
postgres
POSTGRES
postgresql
protoc
pyi
Expand All @@ -74,14 +77,11 @@ pyversions
redef
respx
resub
RUF
SLF
socio
sse
tagwords
taskupdate
testuuid
Tful
tiangolo
typeerror
vulnz
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ Install the core SDK and any desired extras using your preferred package manager
| ------------------------ | ------------------------------------------ | -------------------------------------------- |
| **Core SDK** | `uv add a2a-sdk` | `pip install a2a-sdk` |
| **All Extras** | `uv add "a2a-sdk[all]"` | `pip install "a2a-sdk[all]"` |
| **HTTP Server** | `uv add "a2a-sdk[http-server]"` | `pip install "a2a-sdk[http-server]"` |
| **protobuf** | `uv add "a2a-sdk[proto]"` | `pip install "a2a-sdk[proto]"` |
| **JSON-RPC Server** | `uv add "a2a-sdk[jsonrpc-server]"` | `pip install "a2a-sdk[jsonrpc-server]"` |
| **HTTP (REST) Server** | `uv add "a2a-sdk[http-server]"` | `pip install "a2a-sdk[http-server]"` |
| **gRPC Support** | `uv add "a2a-sdk[grpc]"` | `pip install "a2a-sdk[grpc]"` |
| **OpenTelemetry Tracing**| `uv add "a2a-sdk[telemetry]"` | `pip install "a2a-sdk[telemetry]"` |
| **Encryption** | `uv add "a2a-sdk[encryption]"` | `pip install "a2a-sdk[encryption]"` |
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ dependencies = [
"httpx>=0.28.1",
"httpx-sse>=0.4.0",
"pydantic>=2.11.3",
"protobuf>=5.29.5",
"google-api-core>=1.26.0",
]

classifiers = [
Expand All @@ -29,9 +27,11 @@ classifiers = [
]

[project.optional-dependencies]
http-server = ["fastapi>=0.115.2", "sse-starlette", "starlette"]
proto = ["protobuf>=5.29.5"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure protobuf really needs to be a separate dependency group from grpc

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can remove the extra altogether if you want to be explicit for the REST and gRPC servers. My goal was removing protobuf dependencies especially for JSON-RPC servers + clients.

If you prefer can do:

jsonrpc-server = ["fastapi>=0.115.2", "sse-starlette", "starlette"]
http-server = ["a2a-sdk[jsonrpc-server]", "protobuf>=5.29.5"]
grpc = ["grpcio>=1.60", "grpcio-tools>=1.60", "grpcio_reflection>=1.7.0", "google-api-core>=1.26.0", "protobuf>=5.29.5"]

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

http-server is a bit confusing naming of the extra now that JSON-RPC is split out but needed for backward compatibility

jsonrpc-server = ["fastapi>=0.115.2", "sse-starlette", "starlette"]
http-server = ["a2a-sdk[jsonrpc-server]", "a2a-sdk[proto]"]
encryption = ["cryptography>=43.0.0"]
grpc = ["grpcio>=1.60", "grpcio-tools>=1.60", "grpcio_reflection>=1.7.0"]
grpc = ["grpcio>=1.60", "grpcio-tools>=1.60", "grpcio_reflection>=1.7.0", "google-api-core>=1.26.0", "a2a-sdk[proto]"]
telemetry = ["opentelemetry-api>=1.33.0", "opentelemetry-sdk>=1.33.0"]
postgresql = ["sqlalchemy[asyncio,postgresql-asyncpg]>=2.0.0"]
mysql = ["sqlalchemy[asyncio,aiomysql]>=2.0.0"]
Expand Down
8 changes: 7 additions & 1 deletion src/a2a/utils/proto_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@

from typing import Any

from google.protobuf import json_format, struct_pb2

try:
from google.protobuf import json_format, struct_pb2
except ImportError as e:
raise ImportError(
'proto-utils requires protobuf. Install with "pip install a2a-sdk[proto]"'
) from e

from a2a import types
from a2a.grpc import a2a_pb2
Expand Down
Loading