# Wayfinder: A2A agents and long-term memory

> Explore A2A agent communication and long-term AgentCore memory in Wayfinder, with interactive examples, architecture diagrams and links to the AWS services.

Source: https://krishparekhdev.com/blog/wayfinder
Published: 2026-10-12
Tags: ai, agents, a2a, mcp, memory, aws

---

A useful travel agent needs two abilities.
It must ask other agents for specialist work.
It must also remember a traveller's preferences between trips.

Wayfinder explores both abilities with a road-trip planner.
The orchestrator delegates route, places and food research through [Agent2Agent (A2A)](https://a2a-protocol.org/latest/).
[AgentCore Memory](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/long-term-memory-long-term.html) supplies facts from previous trips.

This article follows the [Wayfinder repository](https://github.com/Krish-Parekh/wayfinder).
The examples illustrate the code. They do not run agents or call AWS.

## A2A gives each agent a communication boundary

A function call works when one process owns all the code.
A distributed system needs an interface that separates the caller from the specialist's implementation.
A2A supplies a protocol for that exchange.

The protocol defines agent discovery, messages, tasks and results.
An Agent Card describes an agent's capabilities and connection details.
Tasks can represent work that continues beyond one immediate response.
The [A2A concepts](https://a2a-protocol.org/latest/topics/key-concepts/) explain these protocol objects.

Wayfinder uses [Strands Agents](https://strandsagents.com/) rather than implementing the protocol transport itself.
The orchestrator creates an `A2AAgent` client for each configured endpoint.
It sends the request through `invoke_async` and collects the returned report.
Each specialist starts a Strands `A2AServer` around an agent factory.

The endpoints come from configuration. This project does not implement a separate discovery directory.
The wrapper handles protocol details. The application code handles the trip workflow.

![Wayfinder orchestrator delegates through A2A to route, places and food agents, which share MCP tools](https://krishparekhdev.com/images/blog/wayfinder-fleet.webp)

Repository diagram: A2A connects the agents. MCP connects each specialist to the shared tools server.

The route agent returns driving legs first.
The orchestrator adds that report to requests for the places and food agents.
Those agents then research towns along the proposed route.
The dependency matters more than the speed comparison: downstream agents need useful route context.

## A2A carries work, while MCP exposes tools

[Model Context Protocol (MCP)](https://modelcontextprotocol.io/) standardizes access to tools and resources.
A2A standardizes communication between agents.
Wayfinder uses both because the system needs both boundaries.

The orchestrator asks the food scout for a report through A2A.
The food scout searches venues through MCP.
The orchestrator does not need to implement the venue search itself.

| Boundary | Caller | Receiver | What crosses it |
| --- | --- | --- | --- |
| A2A | Orchestrator | Specialist agent | Trip request and specialist report |
| MCP | Specialist agent | Tools server | Tool arguments and returned data |
| Memory API | Orchestrator | AgentCore Memory | Saved events and retrieved facts |

The shared server exposes `geocode_place`, `driving_route`, `find_venues_near` and `daily_forecast`.
Its sources include [OpenStreetMap](https://www.openstreetmap.org/), [BRouter](https://brouter.de/) and [Open-Meteo](https://open-meteo.com/).
Those public data tools need no API keys. Bedrock and other AWS services still require credentials.

## Inspect an agent exchange and a remembered preference

Choose a specialist below.
Step through the sequence diagram to follow A2A delegation, the model call and the MCP tool exchange.
Then change the memory stage and traveller.
An event saved for Alex does not become an immediately available fact, or a fact for Sam.

[Interactive example: WayfinderExplorer. See the source page for controls. The surrounding text explains the example.]

These examples simplify the application data. They are not raw A2A messages or a live memory service.

## Long-term memory is more than conversation history

A conversation event records what a user and agent said.
A long-term memory record stores a fact or preference that can help in a later session.
Wayfinder saves an event after each completed plan.
AgentCore extracts reusable information from those events in the background.

The [memory setup script](https://github.com/Krish-Parekh/wayfinder/blob/main/scripts/create_memory.py) configures two strategies:

- `USER_PREFERENCE` extracts preferences, such as dietary choices.
- `SEMANTIC` extracts factual information that can help with later requests.

The script configures a 30-day expiry for events.
That setting does not establish a 30-day expiry for every extracted memory record.
Events and extracted facts are different objects.

![Wayfinder retrieves traveller facts before a run and saves an event after the plan, with asynchronous memory extraction](https://krishparekhdev.com/images/blog/wayfinder-memory.webp)

Repository diagram: retrieval happens before the fleet runs. New facts become available after background extraction.

Before the next trip, `load_profile` searches the traveller's namespace.
It requests up to ten relevant records using the new trip request as the query.
The namespace follows `/traveller/{id}/`.
The `brief` function adds retrieved facts to the specialist request.

After the plan, `save_run` creates a USER and ASSISTANT event with a new session ID.
Later trips use the same traveller ID to retrieve the extracted facts.
The memory path requires both a traveller ID and configured memory.
Without them, the orchestrator skips retrieval and storage.

The namespace scopes retrieval. It does not authenticate the person who supplies a traveller ID.
A production application needs a trusted identity-to-traveller mapping and controls for correcting or deleting memory.
The current flow does not guarantee that a remembered preference remains accurate.

## Where the AWS services fit

![Wayfinder technology stack grouped by agents, protocols, memory, data and infrastructure](https://krishparekhdev.com/images/blog/wayfinder-stack.webp)

Repository diagram: the agent framework, protocols and AWS services have separate roles.

| Service | Its role in Wayfinder |
| --- | --- |
| [Amazon Bedrock](https://aws.amazon.com/bedrock/) | Supplies models for specialist reasoning and final composition. |
| [AgentCore Memory](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/long-term-memory-long-term.html) | Stores events and extracts facts for later trips. |
| [Amazon EKS](https://aws.amazon.com/eks/) | Runs the specialist and tools containers. |
| [Amazon ECR](https://aws.amazon.com/ecr/) | Stores container images for deployment. |
| [Amazon VPC](https://aws.amazon.com/vpc/) | Defines the cluster's AWS network. |
| [AWS IAM](https://aws.amazon.com/iam/) | Grants scoped permissions to workload roles. |
| [Terraform](https://developer.hashicorp.com/terraform) | Defines the cloud infrastructure. |

![Terraform deployment of Wayfinder to EKS with ECR images, VPC networking and Pod Identity](https://krishparekhdev.com/images/blog/wayfinder-eks.webp)

Repository diagram: EKS Pod Identity supplies workload permissions without mounted static AWS credentials.

## Keep the boundaries honest

If a specialist call fails, the orchestrator returns an unavailable note for that report.
The composer receives the note and instructions to identify the missing part.
If the route call fails, the current code still sends that note to downstream agents.

The food scout must cite dietary claims and preserve caveats about incomplete public data.
The composer receives instructions to preserve those caveats.
These prompts describe intended behavior. They do not prove every generated plan follows it.

The key design is a set of explicit boundaries: agent requests, tool calls and memory records.
Each boundary needs separate checks.
Read the [orchestrator](https://github.com/Krish-Parekh/wayfinder/blob/main/src/wayfinder/orchestrator.py),
[A2A server](https://github.com/Krish-Parekh/wayfinder/blob/main/src/wayfinder/specialist.py),
and [memory implementation](https://github.com/Krish-Parekh/wayfinder/blob/main/src/wayfinder/memory.py).
For a regional data boundary, read [Sovereign RAG](/blog/sovereign-rag).
