agentspaces-example-apps

How the agents are written

Written for: Java developers who want to know what the binder does for every agent in the teaching fleets.

Every agent in the teaching fleets is a plain object with @SpaceNotify, @SpaceTake, @BidFunction, @Ballot, or @OnDecision methods, bound through the AgentSpaces facade exactly as the Spring starter binds beans. None of them subscribes, polls, dedups, or spawns threads by hand: the binder delivers each entry once, runs the reaction off the fabric’s delivery thread, writes a returned value back as the next entry, and — for @SpaceTake — completes the leased take or lets the lease lapse when the action throws. The intake, audit, and code fleets bind their agents with identity::subordinate, so each signs with a certified key of its own and its @SpaceRef handles are per-agent views of the shared replica.