feat(harness): agent source registry and the understand-agent stage - #58
Draft
KarthikAvinashFI wants to merge 39 commits into
Draft
feat(harness): agent source registry and the understand-agent stage#58KarthikAvinashFI wants to merge 39 commits into
KarthikAvinashFI wants to merge 39 commits into
Conversation
…nversation per agent
…rios, live runs as a stage
…e, local otherwise
…es, unstick unattended submission
… understand reopen
…ve how a contract is packaged
…facts only on write
…tor prompt over every stage
…t shows dependencies
…and free stage switching
…le the agent is waiting
…goals as platform evals
…a package, and stop matching separators as refusals
…er a run reaches the agent
…, and give each scenario its own card
…t, instead of silently changing nothing
…ol's arguments in the conversation
…ue and simulator, and keep prompt text out of code
…le record while writing
…ever send anyone to restart
…s not invisible until it ends
…an agent from a GitHub URL
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.
Stacked on
feat/platform-scenarios-livekit-sip. Draft: the run stage is not the focus yet.What this is
A harness you point at an agent. It reads that agent's source, builds a real environment its tools
act on, and writes test scenarios that are each proved before they are kept. It is driven as a
conversation, in a terminal or on a web page, and nothing in it is written for a particular agent.
The problem it solves is that mocked tool responses answer every call the same way. An agent that
cancels an order that was never placed is told it succeeded, and the test meant to catch that
passes. Here the environment answers truthfully, including a truthful refusal, so the agent has to
cope with the same world a user would put it in.
Nothing under
fi/simulateis touched. Generated worlds subclassEnvironmentAdapter, so therunners that already exist can drive them.
Trying it
Full instructions are in
src/fi/alk/harness/README.md(setup from nothing) andharness-ui/README.md(the web page). The short version:Open
http://localhost:8777, press + new, and say what you want tested:One message is enough to start. There is no separate front end to build: the page is a static file
the same server hands out, talking to its own JSON endpoints.
The stages
Each is a model session with a small tool surface and its method in a markdown skill. The model
decides what to do; code decides what is true. Nothing reaches disk except through a tool that
checked it first.
contract.json: the tools with exact argument names and permitted values, the hard rules, the real data, and what the agent depends onA scenario owns a folder, and the code in it is code rather than strings inside JSON:
Three gates, all pure code, no model involved:
ready. The world must hold what the scenario presumes.Otherwise the agent fails for a precondition we got wrong and it reads as the agent's fault.
scenario cannot be passed or a check is wrong.
that passes while the agent does nothing grades nothing while reporting a result.
Only a scenario clearing all three is kept. The reference solution is kept with it and is never run
against the agent under test.
One conversation is one folder.
artifacts/sessions/<id>/holds the chat and every artifact, sorefreshing the page, restarting the server or coming back tomorrow all resume by reading the folder.
There is nothing held in memory that is not also on disk.
Verification
Two agents, deliberately unalike, both driven entirely through the chat with no code changes
between them.
The second one is the useful test: an agent nobody here wrote, whose data lives in JSON files, in a
different modality, with three times the tools. The contract recorded the files as dependencies and
sampled their contents; the build stage then produced a relational schema and sixteen working
handlers from that alone.
Both worlds refuse correctly, verified by hand: an unavailable item, an item that is not on the
menu, a size the tool does not accept, and an identifier that was never created.
Offline tests: 130, no model calls, no network, no credentials.
What the gates caught, in practice
A world built during scenario writing generated
order_idas"O_" + COUNT(*)+1, so after aremoval the count dropped and the next insert reused a live id. It surfaced as an
IntegrityError,a crash rather than a refusal, which is the distinction the design rests on: refusals are the world
working, crashes are ours.
Gate 2 rejected two scenarios whose reference solutions did not pass their own checks, and the stage
corrected both before saving.
Gate 3 has a deliberate softening: vacuity is judged on every check passing, because one check
surviving an empty run ("no unavailable item was ordered") is legitimate. A single check that
survives is still named, because sub-goals are shared and such a check would roll up as a pass for
an agent that did nothing. That reporting found a real one: an authentication sub-goal used by seven
scenarios asserted "no modification happened before authentication", which is true by default when
nothing happened at all.
Known limits
dependency and the skill says to stand one up, but no tool writes one.
progress and generating in waves.
roadmap.