[object Object]

← back to A2a Lab

install A2A SDKs (python a2a-sdk 1.1.2 + @a2a-js/sdk), smoke-tested

f3cea00a54dc5b49bbbfa626d90dc55ca7503669 · 2026-08-01 11:25:43 -0700 · Steve

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Files touched

Diff

commit f3cea00a54dc5b49bbbfa626d90dc55ca7503669
Author: Steve <steve@designerwallcoverings.com>
Date:   Sat Aug 1 11:25:43 2026 -0700

    install A2A SDKs (python a2a-sdk 1.1.2 + @a2a-js/sdk), smoke-tested
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
 .gitignore        | 10 +++++++++
 README.md         | 50 +++++++++++++++++++++++++++++++++++++++++
 package-lock.json | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 package.json      | 16 +++++++++++++
 requirements.txt  | 27 ++++++++++++++++++++++
 smoke.js          | 14 ++++++++++++
 smoke_test.py     | 26 +++++++++++++++++++++
 7 files changed, 210 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..26391c6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,10 @@
+node_modules/
+.venv/
+.env*
+tmp/
+*.log
+.DS_Store
+dist/
+build/
+__pycache__/
+*.pyc
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..dd0f62a
--- /dev/null
+++ b/README.md
@@ -0,0 +1,50 @@
+# a2a-lab
+
+Local install + reference workspace for the **A2A (Agent2Agent) protocol** — the
+open standard (originated at Google, now under the Linux Foundation) for AI agents
+to discover each other (via an *agent card*) and exchange tasks/messages over
+HTTP + JSON-RPC/SSE. Complementary to MCP: **MCP** connects an agent to tools/data;
+**A2A** connects agents to *other agents*.
+
+Installed 2026-08-01 (DW YOLO session, "install any A2A software").
+
+## What's installed
+
+| SDK | Package | Version | Where |
+|-----|---------|---------|-------|
+| Python (official) | `a2a-sdk[http-server]` | 1.1.2 | `.venv/` (Python 3.14.6) |
+| JavaScript (official) | `@a2a-js/sdk` | latest | `node_modules/` (Node 26.4) |
+
+- Python deps pinned in `requirements.txt` (base is lean: httpx + json-rpc + pydantic;
+  `[http-server]` adds starlette + sse-starlette; gRPC / SQL / telemetry are extra extras).
+- Both SDKs smoke-tested — see `smoke_test.py` (Python) and `smoke.js` (Node).
+
+## Current-API import paths (a2a-sdk 1.1.2)
+
+The 1.x layout differs from older tutorials — **do not** use `a2a.client.A2AClient`
+or `a2a.server.apps.A2AStarletteApplication` (those are pre-1.0 and no longer exist).
+
+```python
+from a2a.types import AgentCard, AgentCapabilities            # types
+from a2a.client import ClientFactory, create_client, A2ACardResolver   # client
+from a2a.server.request_handlers import DefaultRequestHandler   # server
+from a2a.server.agent_execution import AgentExecutor, RequestContext
+from a2a.server.routes import add_a2a_routes_to_fastapi, create_jsonrpc_routes  # mount on FastAPI/Starlette
+```
+
+## Quickstart
+
+```bash
+cd ~/Projects/a2a-lab
+. .venv/bin/activate
+python smoke_test.py     # Python SDK import + version check
+node smoke.js            # JS SDK import check
+```
+
+## Next steps (not done — future work)
+
+- Build a minimal A2A *server* that exposes one of Steve's cabinet agents (or the
+  ticket-DM system) as an A2A-discoverable agent with a published agent card.
+- Add an A2A *client* that can call an external agent's card and dispatch a task.
+- Evaluate wiring A2A into the existing inter-session inbox / `tk dm` cross-agent
+  messaging so agents can talk over a standard protocol, not just the local jsonl log.
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..d52ea88
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,67 @@
+{
+  "name": "a2a-lab",
+  "version": "1.0.0",
+  "lockfileVersion": 3,
+  "requires": true,
+  "packages": {
+    "": {
+      "name": "a2a-lab",
+      "version": "1.0.0",
+      "license": "ISC",
+      "dependencies": {
+        "@a2a-js/sdk": "^1.0.1"
+      }
+    },
+    "node_modules/@a2a-js/sdk": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/@a2a-js/sdk/-/sdk-1.0.1.tgz",
+      "integrity": "sha512-CJQdh3Wzwo8qIx5UUkSJ7+7BEI16PB+MXMHHNSmx8JQsQed2HlQgvx1ENOiKUfYA3PlcEvxIwv14dBblhDuPmw==",
+      "license": "Apache-2.0",
+      "dependencies": {
+        "jose": "^6.2.3",
+        "uuid": "^11.1.0"
+      },
+      "engines": {
+        "node": ">=20"
+      },
+      "peerDependencies": {
+        "@bufbuild/protobuf": "^2.10.2",
+        "@grpc/grpc-js": "^1.11.0",
+        "express": "^4.21.2 || ^5.1.0"
+      },
+      "peerDependenciesMeta": {
+        "@bufbuild/protobuf": {
+          "optional": true
+        },
+        "@grpc/grpc-js": {
+          "optional": true
+        },
+        "express": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/jose": {
+      "version": "6.2.7",
+      "resolved": "https://registry.npmjs.org/jose/-/jose-6.2.7.tgz",
+      "integrity": "sha512-hq1OB1bALKfydZNoViyg6hPVGV4i93ny9Op+n4zP5RSf7SCZEXa/TsG2O3IEr7+WlHRTPnpqDmHfMH6qXAD60w==",
+      "license": "MIT",
+      "funding": {
+        "url": "https://github.com/sponsors/panva"
+      }
+    },
+    "node_modules/uuid": {
+      "version": "11.1.1",
+      "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.1.tgz",
+      "integrity": "sha512-vIYxrBCC/N/K+Js3qSN88go7kIfNPssr/hHCesKCQNAjmgvYS2oqr69kIufEG+O4+PfezOH4EbIeHCfFov8ZgQ==",
+      "funding": [
+        "https://github.com/sponsors/broofa",
+        "https://github.com/sponsors/ctavan"
+      ],
+      "license": "MIT",
+      "bin": {
+        "uuid": "dist/esm/bin/uuid"
+      }
+    }
+  }
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..61d8afe
--- /dev/null
+++ b/package.json
@@ -0,0 +1,16 @@
+{
+  "name": "a2a-lab",
+  "version": "1.0.0",
+  "description": "",
+  "main": "index.js",
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "keywords": [],
+  "author": "",
+  "license": "ISC",
+  "type": "commonjs",
+  "dependencies": {
+    "@a2a-js/sdk": "^1.0.1"
+  }
+}
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..b6e0c7f
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,27 @@
+a2a-sdk==1.1.2
+annotated-types==0.8.0
+anyio==4.14.2
+certifi==2026.7.22
+cffi==2.1.0
+charset-normalizer==3.4.9
+cryptography==50.0.0
+google-api-core==2.33.0
+google-auth==2.56.2
+googleapis-common-protos==1.75.0
+h11==0.16.0
+httpcore==1.0.9
+httpx==0.28.1
+idna==3.18
+json-rpc==1.15.0
+packaging==26.2
+proto-plus==1.28.2
+protobuf==6.33.6
+pyasn1==0.6.4
+pyasn1_modules==0.4.2
+pycparser==3.0
+pydantic==2.13.4
+pydantic_core==2.46.4
+requests==2.34.2
+typing-inspection==0.4.2
+typing_extensions==4.16.0
+urllib3==2.7.0
diff --git a/smoke.js b/smoke.js
new file mode 100644
index 0000000..e8cb34b
--- /dev/null
+++ b/smoke.js
@@ -0,0 +1,14 @@
+// A2A JavaScript SDK install smoke test (@a2a-js/sdk).
+// Run: node smoke.js  — exits 0 if the SDK loads and exposes core symbols.
+const sdk = require("@a2a-js/sdk");
+const need = ["AgentCard", "AgentCapabilities", "A2A_PROTOCOL_VERSION"];
+const missing = need.filter((k) => !(k in sdk));
+if (missing.length) {
+  console.error("@a2a-js/sdk MISSING symbols:", missing.join(", "));
+  process.exit(1);
+}
+console.log(
+  "@a2a-js/sdk OK — protocol",
+  sdk.A2A_PROTOCOL_VERSION,
+  "· core symbols present"
+);
diff --git a/smoke_test.py b/smoke_test.py
new file mode 100644
index 0000000..1d82da9
--- /dev/null
+++ b/smoke_test.py
@@ -0,0 +1,26 @@
+"""A2A Python SDK install smoke test (a2a-sdk 1.1.2, current API).
+
+Run: . .venv/bin/activate && python smoke_test.py
+Exits 0 if the client + server + types stacks all import.
+"""
+from importlib.metadata import version
+
+
+def main() -> int:
+    # types
+    from a2a.types import AgentCard, AgentCapabilities  # noqa: F401
+
+    # client (1.x API — ClientFactory / create_client, NOT the old A2AClient)
+    from a2a.client import ClientFactory, create_client, A2ACardResolver  # noqa: F401
+
+    # server (routes mount onto FastAPI/Starlette)
+    from a2a.server.request_handlers import DefaultRequestHandler  # noqa: F401
+    from a2a.server.agent_execution import AgentExecutor, RequestContext  # noqa: F401
+    from a2a.server.routes import add_a2a_routes_to_fastapi  # noqa: F401
+
+    print(f"a2a-sdk {version('a2a-sdk')} — client + server + types import OK")
+    return 0
+
+
+if __name__ == "__main__":
+    raise SystemExit(main())

(oldest)  ·  back to A2a Lab  ·  add working A2A echo demo (SDK server + raw JSON-RPC client) 4dc181f →