Repository navigation
A planner and worker example verifies a fenced handoff result - #769
Merged
Merged
Conversation
4 of 5 tasks
Run the task lifecycle with two authenticated principals and read the result with exact writer provenance. Keep memory cleanup in finally and record the bounded authenticated run. Signed-off-by: zlareb1 <[email protected]>
zlareb1
force-pushed
the
example/multi-agent-handoff
branch
from
November 17, 2026 21:54
00f1b9c to
491ca72
Compare
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes: #710
Changelog category (leave one):
Changelog entry
Not required.
Why
The task reference documents each operation separately. The runnable example connects inbox registration, a fenced claim, a heartbeat, a result memory and task completion. A planner reads the worker's result and verifies its value and provenance.
The agents use separate service-account tokens in an existing namespace. The planner needs admin to register the inbox; the worker needs writer. Their authenticated subjects are checked separately from their agent names. The calculation uses Python without an agent LLM or extraction API call; memory writes follow the server's embedding configuration.
Scope and risk
One Python example, its HTTP mock tests, an authenticated CI scenario, setup and expected-output instructions in the examples README, and the multi-agent guide's Start link. The CI scenario runs the example with separate admin and writer principals in the existing authenticated ClickHouse and Postgres jobs. The result includes its task id so another task calculating the same value cannot merge it into a different key. A no-op write refuses completion. The example verifies the returned fence, task outcome, structured result, writer agent, complete actor and source class.
Cleanup cancels unfinished work with the current owner's token and deletes the result memory even if task cancellation fails. Inbox and task history remain. A failed check or API call raises an error; a network failure can prevent cleanup from reaching the server.
Compatibility, rollout and rollback
Tests
AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated (an agent wrote most of the diff): Codex wrote the example, tests and instructions.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist