Repository navigation
feat(harness): declared workers in the contract and a returns reference app - #222
Closed
KarthikAvinashFI wants to merge 3 commits into
Closed
KarthikAvinashFI wants to merge 3 commits into
KarthikAvinashFI wants to merge 3 commits into
Conversation
Member
Author
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.
1. Why
To show which worker of a multi-agent app did what, the platform needs to know which workers the app declares and which tools each holds. This records declared workers in the agent contract during the understand stage, and adds a small reference app (a returns desk with a coordinator and two workers) to test against.
Stacked on #207.
2. What changed
harness/contract.pyDeclaredWorker(id,name,framework_ref,tools,binding: separate or shared) andAgentContract.workers; validation refuses duplicate worker ids and worker tools not in the contract; the brief lists workers and their toolsharness/tools.pyworkersin the contract submission schemaskills/understand-agent/SKILL.mdexamples/harness/multi_agent_compatibility/returns_reference/3. Behavior callouts
ANTHROPIC_API_KEYorOPENAI_API_KEY); the platform does not supply one.4. Tests
tests/harness/test_contract.py)test_declared_workers_name_contract_tools_and_reach_the_brieftest_contract_without_workers_is_unchanged5. Commands to run the tests
Terminal output
<image: 19 passed>
6. Steps to test on local
cd examples/harness/multi_agent_compatibility/returns_reference && pip install -r requirements.txt && OPENAI_API_KEY=... python agent.py.GET http://localhost:8080/healthreturns{"status": "ok"}.order_lookupandrefundworkers with their tools.7. Scope in / scope out
In: declared workers in the contract; the reference app.
Out:
8. Design choices
bindingrecords whether a worker's tools can be told apart at the world, which decides later whether per-worker permissions can be enforced or read as partial.Linear
Fix TH-8886