fix(docs): improve demo a2a agent docs#3853
Conversation
a58bdda to
57e5025
Compare
|
Good fixes for blockers users may run into when trying to run the demo! Here are a few cleanup requests / pieces of feedback from 🤖 What's fixed correctly:
Changes to consider:
|
57e5025 to
a168f17
Compare
|
@a-effort reviewing items have been addressed:
|
vishu-bh
left a comment
There was a problem hiding this comment.
Something I noticed in scripts/demo_a2a_agent.py:167
The new debug print() statements log the full raw request body and extracted query text verbatim. That leaks prompt/request contents into logs and also allows unsanitized user-controlled text into log output.
For local debugging this may be convenient, but it is still a security-quality regression. If logging is needed, it should be reduced, sanitized, and preferably routed through structured debug logging rather than unconditional print() calls.
|
@vishu-bh - reviewed it and removed the print statement with the full raw request body. I replaced the other print statements with the hardcoded strings. |
vishu-bh
left a comment
There was a problem hiding this comment.
Thanks @marekdano LGTM 🚀
- Add Prerequisites section (SSRF_ALLOW_LOCALHOST, PLATFORM_ADMIN_EMAIL) - Fix token generation command and API test examples - Add JSONRPC and nested message parsing to demo agent - Fix Pydantic models to use Optional[str] = None - Make /run handler async with raw body parsing for format flexibility Closes #3709 Signed-off-by: Marek Dano <Marek.Dano@ibm.com>
Review fixes for #3853: - Restore correct MCP tool name prefix (a2a_ not a2a-) - Read PLATFORM_ADMIN_EMAIL from env in demo script - Remove unused Pydantic models (Parameters, A2ARequest) - Add JSON parse error handling in /run endpoint - Simplify docs running instructions - Add 23 unit tests for demo agent parsing logic Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
412d422 to
bc1647c
Compare
|
Thanks for the contribution, @marekdano — the prerequisites section and JSONRPC/nested-message parsing are solid additions. I rebased, squashed the commits, and made a few review fixes on top: Bug fix — MCP tool name prefix: The docs changed
Dead code cleanup: Removed the now-unused Error handling: Added Docs simplification: Consolidated the Option 1/Option 2 pattern into a single clear flow. Tests: Added 23 unit tests ( |
crivetimihai
left a comment
There was a problem hiding this comment.
Looks good — rebased, fixes verified, tests added. Approving.
* fix(docs): improve demo a2a agent docs and request parsing - Add Prerequisites section (SSRF_ALLOW_LOCALHOST, PLATFORM_ADMIN_EMAIL) - Fix token generation command and API test examples - Add JSONRPC and nested message parsing to demo agent - Fix Pydantic models to use Optional[str] = None - Make /run handler async with raw body parsing for format flexibility Closes #3709 Signed-off-by: Marek Dano <Marek.Dano@ibm.com> * fix(review): correct tool name, remove dead code, add tests Review fixes for #3853: - Restore correct MCP tool name prefix (a2a_ not a2a-) - Read PLATFORM_ADMIN_EMAIL from env in demo script - Remove unused Pydantic models (Parameters, A2ARequest) - Add JSON parse error handling in /run endpoint - Simplify docs running instructions - Add 23 unit tests for demo agent parsing logic Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> --------- Signed-off-by: Marek Dano <Marek.Dano@ibm.com> Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> Co-authored-by: Marek Dano <Marek.Dano@ibm.com> Co-authored-by: Mihai Criveti <crivetimihai@gmail.com>
📚 Documentation PR
Closes #3709
Summary
Fixes the demo A2A agent to correctly handle ContextForge's request formats and adds missing prerequisites to the documentation.
Changes
Documentation (
docs/docs/using/agents/a2a.md)Demo Agent (
scripts/demo_a2a_agent.py)typing.Optionalimport for proper type hintsTesting
Tested with:
1. Ran all
curlrequest listed in the docs2. Admin UI test button with queries like
calc: 100/4+25andweather: Dallas3. MCP tool invocation via /rpc endpoint
All three methods now work correctly.
Fixes