You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This example shows a healthcare-domain multi-agent workflow where agents do not role-play clinicians or provide diagnosis. Instead, each agent audits one clearly flagged MOCK evidence source, and a downstream arbiter resolves evidence conflicts and safety boundaries.
The seeded conflict is intentional:
Web/commercial content maps symptom similarity directly to one rare disease and promotes a commercial test.
The official guideline / expert-consensus source keeps the differential broad and requires specialist evaluation.
The gene-phenotype evidence is weak or uncertain for the claimed disease.
The safety policy forbids diagnosis, treatment advice, dosing, or commercial recommendation.
The arbiter should return conflicting_evidence, misleading_or_commercial, or needs_specialist_review, not a diagnosis.
What it demonstrates
Source-isolated audits over different MOCK evidence sources
Patient-reported symptom summary audit
Nonprofit / patient-advocacy education audit
Official guideline / expert-consensus style audit
Gene-phenotype evidence audit
Web/forum/commercial claim audit
Medical safety policy audit
Downstream arbiter that receives only structured audit outputs
Runtime conflict detection between simplified patient-facing content, broad guideline differential, weak genetics evidence, and over-specific commercial web claims
Safety-boundary enforcement that prevents diagnosis, treatment advice, dosing, or commercial recommendation
Mock source policy
All fixtures are clearly flagged as MOCK sources. They are shaped like realistic source types but do not contain real patient data and do not provide medical diagnosis or treatment advice.
npm run lint
npx tsx examples/cookbook/rare-disease-information-triage.ts
Runtime assertions passed:
PASS: decision should reflect conflict/safety concern
PASS: patient-facing diagnosis should not be allowed
PASS: diagnosis should not be provided
PASS: conflicts should be surfaced
PASS: unsafe elements should be surfaced
Checklist
npm run lint passes
npm test passes
Added/updated tests for changed behavior — N/A, cookbook example only
Main blocker is source isolation: the shared buildAgent() helper currently calls registerBuiltInTools(registry), which gives each audit agent file and shell tools, so isolation is prompt-only. Since the host already reads each fixture into the prompt, these agents can use an empty registry or tools: [] to make the example match #210.
Also add the cookbook row to examples/README.md so the new example is discoverable.
Note: I did not mark npm test as passing locally. The full test suite fails in this Windows/WSL environment on existing bash built-in tool tests because /bin/bash is unavailable, which appears unrelated to this cookbook/README-only change.
Got it. I verified npm test passes on my side before merging, so the WSL /bin/bash failure sounds environment-specific. Merged with the source isolation and README fixes included. @oooooowoooooo
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
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.
What
Adds a rare disease information triage cookbook example demonstrating source-isolated evidence audits and downstream conflict/safety arbitration.
Closes #210.
Why
This example shows a healthcare-domain multi-agent workflow where agents do not role-play clinicians or provide diagnosis. Instead, each agent audits one clearly flagged MOCK evidence source, and a downstream arbiter resolves evidence conflicts and safety boundaries.
The seeded conflict is intentional:
The arbiter should return
conflicting_evidence,misleading_or_commercial, orneeds_specialist_review, not a diagnosis.What it demonstrates
Mock source policy
All fixtures are clearly flagged as MOCK sources. They are shaped like realistic source types but do not contain real patient data and do not provide medical diagnosis or treatment advice.
Files added
Validation
Local validation passed:
Runtime assertions passed:
Checklist
npm run lintpassesnpm testpasses