aspace://guide/examples

Example apps

Eight example apps show AgentSpaces at work, from a veterinary clinic that coordinates through one space to a committee whose senators sit in a browser tab, a Node process and a Durable Object. Each app has a guide that draws its peers, its agents, its spaces and the way a run unfolds, with the code sliced from the app so the guide stays current.

AgentSpaces 0.5.08 apps and Party Busevery library from Maven Centralall run with no API keys
Where to startWhat each app usesRun them
aspace://guide/examples/idea

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.

Where the apps liveAll eight are standalone Maven projects in 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.
aspace://guide/examples/order

Where to start

THE TEACHING FLEETS: each adds one coordination idea to the one beforePet Clinicreact to the spaceCode Fleetauction, kill toleranceAudit Fleeta signed quorumIntake Fleetevidence, provenancestart here: the first app coordinates through one space with @SpaceNotify methods; the fourth carries a regulator-readable chainevery one is a self-contained Maven project with a live demo and a flow test over real TCPTHE SHOWCASE APPS: many mechanisms at once, with real frameworks and runtimesOps Centerhuman gate, exactly onceSpring AI and Jeva model server, typed judgmentSuperfriendsthree vendors, filesBrowser Councilbrowsers, Node, workerdParty Busbeside these: every typeread them in any order after the teaching fleets; each stands on its own
The reading order. The four teaching fleets build on one another, and the showcase apps combine what they teach with real model frameworks and with runtimes beyond the JVM. Party Bus lives in its own repository and shows every coordination type on one trip.

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 ClinicA 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.5Pet Clinic guideagentspaces-petclinic-fleet
Code FleetCoding agents bid for issues through the auction strategy. A worker that dies lets its lease lapse, and the work comes back to someone else.6Code Fleet guideagentspaces-code-fleet
Audit FleetA panel of specialists adjudicates every finding by a signed quorum vote, and any member can recount the ballots.4Audit Fleet guideagentspaces-audit-fleet
Intake FleetContent-addressed scans, parallel extractors, signed extractions counted as ballots, and a provenance chain a regulator can walk.6Intake Fleet guideagentspaces-intake-fleet
Ops CenterOne incident worked end to end: claimed parts, a killed worker, a judges' quorum, a human approval and an action that runs exactly once.12Ops Center guideopscenter
Spring AI and JevTyped judgment on a fleet: drafts through a model-server peer, verdicts from TypeSafe Jev, retry tickets, an ordered billing desk and a council vote.9Spring AI and Jev guideagentspaces-springai-jev-eg
SuperfriendsGrok, GPT and Claude on three frameworks run a research desk, vote on a position and share their files over the content swarm.6Superfriends guidesuperfriends
Browser CouncilA committee that votes across two JVMs, a Node process, a Durable Object and browser pages, with a WebRTC caucus.8Browser Council guidebrowser-council
Party BusThe Embabel travel planner as thirty-four agents on twenty-one peers, using every coordination type on the job it fits.21Party Bus guideagentspaces-partybus
aspace://guide/examples/uses

What each app uses

WHAT EACH APP USES: annotations and APIs counted in its main sources, comments removednotifytakeauctionvoteorderedreduce,joinblocksswarmmodelwireconsoleTEACHING FLEETSPet Clinic21JavaCode Fleet21JavaAudit Fleet1112JavaIntake Fleet43JavaSHOWCASE APPSOps Center6112213JavaSpring AI and Jev116212JavaSuperfriends1113568421728Java + ClojureBrowser Council11322Java + TypeScriptBESIDE THEMParty Bus6194232121Javaa dot is the number of uses in code; a dash is none. blocks: BlockExchange, content-addressed payloads. swarm: the 0.5.0 content swarm.
What each app uses. Each row is the app's own main sources, scanned for the annotation or API of the mechanism with comments removed. Intake Fleet counts the signed extractions with an adjudicator of its own, so its quorum does not show under vote. Read a column to find the apps that show a mechanism, then open that app's guide.

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 @BidFunction on an AUCTION space: every peer prices a task and the best bid keeps it (annotation; the workflow guide).
  • vote is @Propose, @Ballot and @OnDecision over aspace:cap/vote: signed ballots and a recountable decision (annotation, capability).
  • ordered is @OrderedTake over the Raft ordered log: exactly one winner, fleet-wide (annotation, capability).
  • reduce, join are @SpaceReduce and @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 FleetChatModel and ModelServer: any peer calls a model it holds no key for (capability).
  • console is the fleet console: panels, commands and an audit trail (console chapter).
Reading the matrixA dash means the mechanism does not appear in that app's code, which is a statement about the example, never about the library. Intake Fleet counts signed extractions with an adjudicator of its own, so its quorum is a custom tally rather than the vote capability. Pet Clinic and Code Fleet publish no agent cards, because they register their agents with no discovery service; the guides say how their peers find each other without them.
aspace://guide/examples/shape

How big and how mixed

HOW MANY PEERS, AND WHAT THEY RUN INPet Clinic5Code Fleet6Audit Fleet4Intake Fleet6Ops Center12Spring AI and Jev9Superfriends6Browser Council8Party Bus21one JVM, real TCP on loopbackone process per peer, three frameworks and ClojureJVMs, Node, workerd and browsers
How many peers. Peer counts come from each guide's facts line. The teaching fleets and the Spring AI apps run every peer in one JVM, which keeps a demo to one command. Superfriends starts a process per peer, and Browser Council reaches into a browser tab, a Node process and a Durable Object on workerd.

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.

aspace://guide/examples/run

Run them

App Demo Test Needs
Pet Clinic./run-demo.shmvn testJDK 21, Maven
Code Fleet./run-demo.shmvn testJDK 21, Maven
Audit Fleet./run-demo.shmvn testJDK 21, Maven
Intake Fleet./run-demo.shmvn testJDK 21, Maven
Ops Center./run-demo.sh (--watch keeps the console up)mvn testJDK 21, Maven; -Pembabel adds the Embabel planner
Spring AI and Jevmvn -q compile exec:javamvn -q verifyJDK 21, Maven; optional ANTHROPIC_API_KEY and TYPESAFE_API_KEY
Superfriends./run-demo.shmvn -q verify, then the six-JVM scenarioJDK 25, Maven, the Clojure CLI; any subset of three vendor keys
Browser Councilmvn -q -o compile exec:javamvn -o test -Dcouncil.required=trueJDK 21, Maven, Node 22, the built agentspaces-typescript workspace beside it
Party Bus./run-demo.shmvn testJDK 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.

aspace://guide/examples/next

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.