Adapters ​
The README lists the adapters. This page adds how to write one and the other extension points.
An adapter is the one piece of code between driftbench and your agent: it opens a session, sends a block, and returns what the agent did. Thirteen ship today in @agent-nexus/driftbench-adapters, and every one passes the same contract suite.
| Reach your agent as | Adapter |
|---|---|
| A function in your process | function |
| An HTTP endpoint | http |
| A command, in a sandbox with a workspace | process |
| An SDK agent | OpenAI Agents · Anthropic · Google · LangGraph · CrewAI · Vercel AI SDK · Pydantic AI · LiteLLM |
| A code agent, replayed or live | Claude Code |
| A hosted agent platform | Nexus |
A minimal complete adapter is the functionAdapter of Evaluate your own agent: a dozen lines around your function. To write one from scratch, implement the contract: open, send and close.
The other extension points ​
| You want to add | How | Where |
|---|---|---|
| A check | registerCheck(name, fn): a function from the observed block to verdicts, switched on per spec under rules.custom | custom checks |
| A judge | A client with one method that answers a judge request; clients for OpenAI, Anthropic, Google and HTTP ship | judge clients |
| A criterion | One YAML file: a rubric, a pass transcript, a fail transcript | criteria folders |
| A similarity model | denseEmbedder({ id, embed }): one call from texts to vectors | similarity |
| A file reader for artifacts | A reader per file kind; spreadsheets, documents, decks and PDF ship | artifacts |
| A map of situations | A YAML file of dimensions, values and constraints, proposed by extract or written by hand | the map |
| A store or a report | Runs live in one SQLite file with a versioned JSON export; reports are HTML, JUnit XML and JSON | the store · scorecards |