Eight apps, one pattern
Every example app is a group of peers whose agents are ordinary annotated objects. The agents never call one another. They write typed, signed, leased entries into shared spaces, and each agent reacts to the entries it understands. That one pattern carries a clinic, an auction, a vote, a regulator-readable filing, an operations center, a model fleet, a research desk and a council that sits partly in a browser.
The apps divide into four teaching fleets, which add one coordination idea each, and four showcase apps, which combine many ideas with real model frameworks and with runtimes beyond the JVM. Party Bus, in its own repository, shows every coordination type in one trip. Each guide follows the same arc: what the app shows, who the agents are, how the peers join and find each other, what the spaces hold, one run end to end, a chapter for each mechanism, what happens when a peer dies, and how to run it.
agentspaces-example-apps. Every AgentSpaces library they use, including the Spring AI, LangChain4j and Micronaut bridges, resolves from Maven Central at 0.5.0, so each app builds on its own, with no checkout of the core.Where to start
Start with Pet Clinic if the quick start in the developer guide is fresh, and read the four teaching fleets in order: each one adds exactly one idea to the one before. After that, pick the showcase app closest to your problem. Ops Center fits a human-in-the-loop operations workflow, Spring AI and Jev fits a model fleet that holds one key in one place, Superfriends fits a mixed-framework team that shares data and files, and Browser Council fits anything that reaches into a browser.
| App | What it shows | Peers | Guide | Source |
|---|---|---|---|---|
| Pet Clinic | A triage nurse, a scheduler and two vets who never call one another. Each reacts to the entry it understands and writes the entry the next is waiting for. | 5 | Pet Clinic guide | agentspaces-petclinic-fleet |
| Code Fleet | Coding agents bid for issues through the auction strategy. A worker that dies lets its lease lapse, and the work comes back to someone else. | 6 | Code Fleet guide | agentspaces-code-fleet |
| Audit Fleet | A panel of specialists adjudicates every finding by a signed quorum vote, and any member can recount the ballots. | 4 | Audit Fleet guide | agentspaces-audit-fleet |
| Intake Fleet | Content-addressed scans, parallel extractors, signed extractions counted as ballots, and a provenance chain a regulator can walk. | 6 | Intake Fleet guide | agentspaces-intake-fleet |
| Ops Center | One incident worked end to end: claimed parts, a killed worker, a judges' quorum, a human approval and an action that runs exactly once. | 12 | Ops Center guide | opscenter |
| Spring AI and Jev | Typed judgment on a fleet: drafts through a model-server peer, verdicts from TypeSafe Jev, retry tickets, an ordered billing desk and a council vote. | 9 | Spring AI and Jev guide | agentspaces-springai-jev-eg |
| Superfriends | Grok, GPT and Claude on three frameworks run a research desk, vote on a position and share their files over the content swarm. | 6 | Superfriends guide | superfriends |
| Browser Council | A committee that votes across two JVMs, a Node process, a Durable Object and browser pages, with a WebRTC caucus. | 8 | Browser Council guide | browser-council |
| Party Bus | The Embabel travel planner as thirty-four agents on twenty-one peers, using every coordination type on the job it fits. | 21 | Party Bus guide | agentspaces-partybus |
What each app uses
The matrix reads from the apps' own main sources. A column is one mechanism, and each mechanism has a section in the developer guide:
- notify is
@SpaceNotify: react to an entry, once, off the delivery thread (annotation). - take is
@SpaceTake: claim an entry under a lease, so a dead worker's task reappears (annotation). - auction is
@BidFunctionon an AUCTION space: every peer prices a task and the best bid keeps it (annotation; the workflow guide). - vote is
@Propose,@Ballotand@OnDecisionoveraspace:cap/vote: signed ballots and a recountable decision (annotation, capability). - ordered is
@OrderedTakeover the Raft ordered log: exactly one winner, fleet-wide (annotation, capability). - reduce, join are
@SpaceReduceand@SpaceJoin: a running fold of entries, and one reaction when all the parts are in (reduce, join). - blocks is the block exchange: payloads addressed by their content hash (Space API).
- swarm is the 0.5.0 content swarm: files published once and served by every holder (capability).
- model wire is
FleetChatModelandModelServer: any peer calls a model it holds no key for (capability). - console is the fleet console: panels, commands and an audit trail (console chapter).
How big and how mixed
Most of the apps start every peer inside one JVM and still talk over real TCP on loopback, with a port per peer and the same wire as a deployed fleet, so a demo is one command and a flow test runs in seconds. Superfriends starts a JVM per peer on three frameworks and adds a Clojure peer. Browser Council adds a Node process, a Durable Object on workerd and browser pages that join with one import and one call, which makes it the app to read for the JavaScript client.
Closing a peer's context is the event the fleet sees when a process dies, which is why the kill stories in the guides (a worker dropped mid-task, a leader killed mid-session, a publisher that leaves) behave the same in one JVM as across machines.
Run them
| App | Demo | Test | Needs |
|---|---|---|---|
| Pet Clinic | ./run-demo.sh | mvn test | JDK 21, Maven |
| Code Fleet | ./run-demo.sh | mvn test | JDK 21, Maven |
| Audit Fleet | ./run-demo.sh | mvn test | JDK 21, Maven |
| Intake Fleet | ./run-demo.sh | mvn test | JDK 21, Maven |
| Ops Center | ./run-demo.sh (--watch keeps the console up) | mvn test | JDK 21, Maven; -Pembabel adds the Embabel planner |
| Spring AI and Jev | mvn -q compile exec:java | mvn -q verify | JDK 21, Maven; optional ANTHROPIC_API_KEY and TYPESAFE_API_KEY |
| Superfriends | ./run-demo.sh | mvn -q verify, then the six-JVM scenario | JDK 25, Maven, the Clojure CLI; any subset of three vendor keys |
| Browser Council | mvn -q -o compile exec:java | mvn -o test -Dcouncil.required=true | JDK 21, Maven, Node 22, the built agentspaces-typescript workspace beside it |
| Party Bus | ./run-demo.sh | mvn test | JDK 21, Maven; a live run wants OPENAI_API_KEY and BRAVE_API_KEY |
Every app runs offline: scripted or fixture models stand in for the real ones and keep each run deterministic. Setting a vendor's key switches that peer to the live model and changes nothing else. Each guide's running chapter states what its test asserts and how long it takes.
Where to go next
- The developer guide: the annotations, the Space API, discovery, the capabilities, the console and the testing chapter these apps lean on.
- The workflow guide: every coordination pattern with its options and trade-offs.
- The architecture guide: where a fleet like these sits on the ladder from a single desk to a federated deployment, and how its peers are discovered and bootstrapped.
- The numbered core examples in the AgentSpaces repository, which teach one primitive each, and the 0.5.0 release notes for the content swarm that Superfriends uses.