Decouple A2A into standalone a2a-elixir package#6
Merged
zeroasterisk merged 2 commits intomainfrom Mar 9, 2026
Merged
Conversation
## Context Compression (#80) - ADK.Context.Compressor behaviour with configurable strategies - Truncate strategy: keeps system + last N messages - Summarize strategy: uses LLM to condense older messages - Wired into LlmAgent via context_compressor option - Configurable threshold before compression kicks in ## Integration Tests (#92) - test/integration/gemini_api_test.exs with real Gemini API tests - Single-turn Q&A, multi-turn conversation, tool use round-trip - Agent transfer, error handling (bad model, invalid request) - Tagged @tag :integration, excluded by default - Run with: GEMINI_API_KEY=key mix test --include integration ## MCP Client (#77) - Already implemented in prior PRs with full test coverage - Client connects via stdio, performs JSON-RPC initialization - ToolAdapter converts MCP tools to ADK FunctionTools - Mock MCP server for testing ## Housekeeping - Added examples build artifacts to .gitignore
- Add {:a2a, github: "zeroasterisk/a2a-elixir"} dependency
- ADK.A2A.AgentCard now bridges ADK agents to A2A.AgentCard structs
- ADK.A2A.Client delegates to A2A.Client (backward compatible)
- ADK.A2A.Server implements A2A.Handler behaviour, uses A2A.Server
- ADK.A2A.Message adds to_a2a_message/1 bridge function
- ADK.A2A.RemoteAgentTool unchanged (ADK-specific)
- All 226 tests + 14 doctests pass
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Decouples the A2A protocol implementation into a standalone package at zeroasterisk/a2a-elixir, following the pattern of other language SDKs (Python has
google-a2a, Go has its own module).New package: a2a-elixir
The standalone
a2apackage provides:A2A.AgentCard,A2A.Task,A2A.TaskStatus,A2A.Message,A2A.Part,A2A.ArtifactA2A.Client— fetch agent cards, send/get/cancel tasksA2A.Server— Plug-based JSON-RPC 2.0 server withA2A.Handlercallback behaviourChanges to ADK Elixir
{:a2a, github: "zeroasterisk/a2a-elixir"}dependencyADK.A2A.AgentCard— bridges ADK agents toA2A.AgentCardstructsADK.A2A.Client— delegates toA2A.Client(backward compatible API)ADK.A2A.Server— implementsA2A.Handlerbehaviour, delegates toA2A.ServerADK.A2A.Message— addsto_a2a_message/1bridge, keeps existing functionsADK.A2A.RemoteAgentTool— unchanged (ADK-specific)Key design decisions
A2A.Handlerbehaviour instead of being tied toADK.Runner