{"id":47337819,"url":"https://github.com/wilsonsilva/a2a","last_synced_at":"2026-03-17T22:08:15.313Z","repository":{"id":287042645,"uuid":"963437200","full_name":"wilsonsilva/a2a","owner":"wilsonsilva","description":"Agent2Agent (A2A) protocol implementation in Ruby. Under development. It will be integrated with web frameworks SOON.","archived":false,"fork":false,"pushed_at":"2025-11-24T21:13:43.000Z","size":231,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-22T19:44:05.455Z","etag":null,"topics":["a2a","mcp","ruby"],"latest_commit_sha":null,"homepage":"https://a2a-ruby.com","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wilsonsilva.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-09T17:20:48.000Z","updated_at":"2025-11-24T21:13:49.000Z","dependencies_parsed_at":"2025-10-05T20:26:09.347Z","dependency_job_id":null,"html_url":"https://github.com/wilsonsilva/a2a","commit_stats":null,"previous_names":["wilsonsilva/a2a"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/wilsonsilva/a2a","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilsonsilva%2Fa2a","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilsonsilva%2Fa2a/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilsonsilva%2Fa2a/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilsonsilva%2Fa2a/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wilsonsilva","download_url":"https://codeload.github.com/wilsonsilva/a2a/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilsonsilva%2Fa2a/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30633240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T17:32:55.572Z","status":"ssl_error","status_checked_at":"2026-03-17T17:32:38.732Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["a2a","mcp","ruby"],"created_at":"2026-03-17T22:08:14.795Z","updated_at":"2026-03-17T22:08:15.257Z","avatar_url":"https://github.com/wilsonsilva.png","language":"Ruby","readme":"# Agent2Agent (A2A) protocol\n\n[![Gem Version](https://badge.fury.io/rb/a2a.svg)](https://badge.fury.io/rb/a2a)\n![Build](https://github.com/wilsonsilva/a2a/actions/workflows/main.yml/badge.svg)\n[![Maintainability](https://qlty.sh/badges/73ebc4bb-d1db-4b5b-9a7c-a4acd59dfe69/maintainability.svg)](https://qlty.sh/gh/wilsonsilva/projects/a2a)\n[![Code Coverage](https://qlty.sh/badges/73ebc4bb-d1db-4b5b-9a7c-a4acd59dfe69/test_coverage.svg)](https://qlty.sh/gh/wilsonsilva/projects/a2a)\n\nAn open protocol enabling communication and interoperability between opaque agentic applications.\n\n## Table of contents\n\n- [Key features](#-key-features)\n- [Installation](#-installation)\n- [Quickstart](#-quickstart)\n- [Documentation](#-documentation)\n- [Development](#-development)\n  * [Type checking](#type-checking)\n- [Contributing](#-contributing)\n- [License](#-license)\n- [Code of Conduct](#-code-of-conduct)\n\n## 🔑 Key features\n\n- Protocol data structures defined according to the Agent2Agent specification\n- Serialization and deserialization of protocol messages\n- Typed data structures with validation\n- Case transformation support (snake_case ↔ camelCase) during instantiation and serialization\n- Flexible schema with support for additional properties beyond defined attributes\n\n## 📦 Installation\n\nInstall the gem by executing:\n\n    $ gem install a2a\n\n## ⚡️ Quickstart\n\n```ruby\nrequire 'a2a'\n\n# Create message parts\ntext_part = A2A::TextPart.new(text: 'Plan a trip to Paris')\n\n# Create a message\nmessage = A2A::Message.new(\n  role: 'user',\n  parts: [text_part],\n  message_id: 'msg-123',\n  kind: 'message'\n)\n\n# Create message send parameters object\nmessage_params = A2A::MessageSendParams.new(\n  message: message\n)\n\n# Build a JSON-RPC request object (no actual network request is made)\nrequest = A2A::SendMessageRequest.new(\n  id: 1,\n  params: message_params\n)\n\n# Convert to JSON with camelCase formatting (as per protocol spec)\njson_request = request.to_json\nputs json_request\n# =\u003e {\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"message/send\",\"params\":{\"message\":{\"role\":\"user\",\"parts\":[{\"kind\":\"text\",\"text\":\"Plan a trip to Paris\"}],\"messageId\":\"msg-123\",\"kind\":\"message\"}}}\n\n# Parse a JSON response string\nagent_response = '{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":{\"id\":\"task-123\",\"contextId\":\"ctx-456\",\"status\":{\"state\":\"completed\"},\"kind\":\"task\"}}'\n\n# Method 1: Parse the JSON first, then create the object\nresponse_data = JSON.parse(agent_response)\nresponse = A2A::SendMessageResponse.new(response_data)\n\n# Method 2: Directly create the object from JSON (using the new from_json method)\nresponse = A2A::SendMessageResponse.from_json(agent_response)\n\n# Access the task information\nif response.result\n  puts \"Task status: #{response.result.status}\"\n  puts \"Messages: #{response.result.history\u0026.length || 0}\"\nelse\n  puts \"Error: #{response.error\u0026.message}\"\nend\n```\n\n## 📚 Documentation\n\n- [YARD documentation](https://rubydoc.info/gems/a2a)\n\n## 🔨 Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies.\n\nTo install this gem onto your local machine, run `bundle exec rake install`.\n\nYou can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`,\nwhich will create a git tag for the version, push git commits and the created tag, and push the `.gem` file\nto [rubygems.org](https://rubygems.org).\n\nThe health and maintainability of the codebase is ensured through a set of\nRake tasks to test, lint and audit the gem for security vulnerabilities and documentation:\n\n```\nrake build                    # Build a2a.gem into the pkg directory\nrake build:checksum           # Generate SHA512 checksum if a2a.gem into the checksums directory\nrake bundle:audit:check       # Checks the Gemfile.lock for insecure dependencies\nrake bundle:audit:update      # Updates the bundler-audit vulnerability database\nrake clean                    # Remove any temporary products\nrake clobber                  # Remove any generated files\nrake coverage                 # Run spec with coverage\nrake install                  # Build and install a2a.gem into system gems\nrake install:local            # Build and install a2a.gem into system gems without network access\nrake qa                       # Test, lint and perform security and documentation audits\nrake release[remote]          # Create a tag, build and push a2a.gem to rubygems.org\nrake rubocop                  # Run RuboCop\nrake rubocop:autocorrect      # Autocorrect RuboCop offenses (only when it's safe)\nrake rubocop:autocorrect_all  # Autocorrect RuboCop offenses (safe and unsafe)\nrake spec                     # Run RSpec code examples\nrake verify_measurements      # Verify that yardstick coverage is at least 100%\nrake yard                     # Generate YARD Documentation\nrake yard:junk                # Check the junk in your YARD Documentation\nrake yardstick_measure        # Measure docs in lib/**/*.rb with yardstick\n```\n\n### Type checking\n\nThis gem leverages [RBS](https://github.com/ruby/rbs), a language to describe the structure of Ruby programs. It is\nused to provide type checking and autocompletion in your editor. Run `bundle exec typeprof FILENAME` to generate\nan RBS definition for the given Ruby file. And validate all definitions using [Steep](https://github.com/soutaro/steep)\nwith the command `bundle exec steep check`.\n\n## 🐞 Issues \u0026 Bugs\n\nIf you find any issues or bugs, please report them [here](https://github.com/wilsonsilva/a2a/issues), I will be happy\nto have a look at them and fix them as soon as possible.\n\n## 🤝 Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/wilsonsilva/a2a.\nThis project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere\nto the [code of conduct](https://github.com/wilsonsilva/a2a/blob/main/CODE_OF_CONDUCT.md).\n\n## 📜 License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## 👔 Code of Conduct\n\nEveryone interacting in the A2A Ruby project's codebases, issue trackers, chat rooms and mailing lists is expected\nto follow the [code of conduct](https://github.com/wilsonsilva/a2a/blob/main/CODE_OF_CONDUCT.md).\n","funding_links":[],"categories":["⚙️ Implementations \u0026 Libraries"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilsonsilva%2Fa2a","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwilsonsilva%2Fa2a","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilsonsilva%2Fa2a/lists"}