Find what broke in your AI workflow
Compare a change against the previous version, replay a failing case, and check your fix. You choose whether to publish a project.
Evaluate an AI workflow
Catch an agent scheduling the same tool call twice. Run an editable test in your repo with Node 20.19+ or Python 3.10+. No account or API key required.
First local check
Run in your repository
npx --yes https://tokensand.com/packages/tokensand-workflow-check-0.1.1.tgzRun without a package manager
Download the Node.js test as tokensand-first.test.mjs, then run node tokensand-first.test.mjs.
Download the Python test as test_tokensand_first.py, then run python3 test_tokensand_first.py.
Run my existing workflow cases
From your repo, run one command for your trusted offline adapter. It tests your candidate once per case.
npx --yes https://tokensand.com/packages/tokensand-workflow-check-0.1.1.tgz --offline-workflow ./observe.workflow.mjspython3 -m pip install https://tokensand.com/packages/tokensand_workflow_check-0.1.0-py3-none-any.whl && python3 -m tokensand_check --offline-workflow ./my_workflow.pyUse a Node default export or Python workflow dictionary with cases, checks, candidate and evaluate. The starter includes a working definition.
Already have the Node SDK and repo test? Run node test/tokensand-workflow.test.mjs to see failing cases, even before your first commit.
Connect your app for private run history and scored checks. Downloading the private SDK requires a Build account.
Check a Lovable project
- Open the synced branch in Claude Code or Codex. Need a checkout? In Lovable, go to Project settings → Git → GitHub to connect and clone your project.
- For a new setup, install the Node SDK. Then ask your agent in the repo:
Use Tokens& to check this change. Test the app function that handles a model reply or tool result. Use synthetic inputs and expected outcomes, compare the previous and current behavior offline, and show me which cases failed. Keep the results local.
This checks your application logic with saved examples. It works without a gateway key or a change to your hosted app.
Check a change in GitHub, Claude Code or Codex
Set up a Node workflow
Use Node 20.19 or later. For a new setup, install the private SDK through Build → Connect app. Before npm ci on a fresh checkout, download the private SDK version pinned in package-lock.json from Build → Connect app and save it at the lockfile’s file: path.
For a new workflow, save this example as observe.workflow.mjs and run the local checker below. The candidate keeps a leading space. Add .trim() to the candidate and rerun to see the case pass.
export default {
id: "label-trim",
title: "Trim a label",
scope: "synthetic",
cases: [{ id: "leading-space", input: { label: " ready" } }],
checks: [{ id: "trimmed", label: "Removes leading space" }],
checksVersion: "1",
repetitions: 3,
timeoutMs: 1000,
maxCallsPerRun: { baseline: 0, candidate: 0 },
sourceFiles: [],
evaluatorSourceFiles: [],
baseline: ({ label }) => label.trim(),
candidate: ({ label }) => label,
evaluate: ({ output }) => ({ trimmed: output === "ready" }),
};checker_dir=$(mktemp -d)
curl -fsS https://tokensand.com/agent-pack/observe-check-v8.mjs -o "$checker_dir/observe-check.mjs"
node "$checker_dir/observe-check.mjs" checkUse your own cases and callbacks, list their files in sourceFiles or evaluatorSourceFiles, and keep both provider budgets at zero. The checker exits 0 on pass, 100 on a failed or incomplete check, and 2 for missing setup.
GitHub pull requests
Install these public files once. Commit them with your code, workflow and case files. Keep the SDK archive private.
mkdir -p .github/workflows .tokensand/bin
curl -fsS https://tokensand.com/agent-pack/observe-pr-v8.yml -o .github/workflows/tokensand-check.yml
curl -fsS https://tokensand.com/agent-pack/observe-check-v8.mjs -o .tokensand/bin/observe-check.mjs
curl -fsS https://tokensand.com/agent-pack/repo-workflow-test-v7.mjs -o .tokensand/bin/repo-workflow-test-v7.mjsBy default, the PR checks the root observe.workflow.mjs and its saved regression cases.
Require multiple services on a PR
Commit the directories you want checked in .tokensand/services.json. Each needs an offline observe.workflow.mjs. Include "." for the root workflow.
[".", "services/citation", "services/invoice"]Generate one receipt with the command below. Reviewers see each required service’s result. The PR summary names services added or removed since the target revision.
Check that your scorer catches a wrong answer
Save the scorer test as scorer-controls/observe.workflow.mjs under your app. Put a synthetic good output and bad output with independently reviewed labels in scorer-controls/regressions.json. This example fits the label-trimming workflow above.
[
{"id":"untrimmed","input":{"sample":{"label":" ready"},"output":" ready","check":"trimmed","expected":false}},
{"id":"trimmed","input":{"sample":{"label":" ready"},"output":"ready","check":"trimmed","expected":true}}
]Include the app and its scorer test in .tokensand/services.json. For the root example use [".", "scorer-controls"]. Keep any other required services. The PR shows both results. Changing or dropping the reference scorer test flags its verdict for review.
To check the scorer while editing, run these commands from the repository root after installing the PR files above.
mkdir -p scorer-controls/test
cp .tokensand/bin/repo-workflow-test-v7.mjs scorer-controls/test/tokensand-workflow.test.mjs
node scorer-controls/test/tokensand-workflow.test.mjsnode .tokensand/bin/observe-check.mjs check --suite-receiptReview and commit only .tokensand/observe-check.json next. The PR shows the evaluated revision and which checks newly failed, stayed broken or recovered. Forks need no secrets.
Review a teammate’s result locally
Check out the PR head and its parent (clone depth 2 or more). Verify the recorded checks with Git and Node. To compare coverage, fetch the PR target and set EXPECTED_PR_BASE to its full commit SHA.
printf '%s\n' '5751a7cbc97c28f8b8b77e90a26ec2a740b79c1b6ed8e84d12aac9f968d7a5bf .tokensand/bin/observe-check.mjs' | shasum -a 256 -c - &&
node .tokensand/bin/observe-check.mjs verify-suiteIf a PR changes saved cases in regressions.json, replay the target inputs with the current code. With the SDK installed, save the Node repo test in the service’s test/ directory and run the command from the PR summary.
A stale result needs a fresh run by the author. With the SDK installed, you can also check several configured services locally. For a root workflow and services under services/, run the following from the repository root.
node --test test/tokensand-workflow.test.mjs services/*/test/tokensand-workflow.test.mjsClaude Code
mkdir -p .claude/skills/tokensand-agent-pack
curl -fsS https://tokensand.com/agents/install/SKILL.md -o .claude/skills/tokensand-agent-pack/SKILL.mdStart Claude Code from that repository. Invoke /tokensand-agent-pack Use Tokens& to check this change and show me what failed. Check MCP separately with claude mcp list.
Codex
mkdir -p .agents/skills/tokensand-agent-pack
curl -fsS https://tokensand.com/agents/install/SKILL.md -o .agents/skills/tokensand-agent-pack/SKILL.mdStart Codex from that repository. Invoke $tokensand-agent-pack Use Tokens& to check this change and show me what failed. Check MCP separately with codex mcp list. MCP is used for sharing and private project context. The evaluation runs in your local SDK.
Share only when you’re ready
Connect MCP with a developer publishing token, then ask your agent to draft a Tokens& project. Review the title, summary, description, links and tool credits before you approve publication. Your check report stays local. Readers can select Check your own project on the published page to open this guide.
You can also search the tool directory and provider offers in your editor without an account.
1Add Tokens&
Run this command in your terminal.
codex mcp add tokensand -- npx -y https://tokensand.com/packages/dev-adoption-cli-0.1.65.tgz mcp serve --api https://tokensand.comManual configuration
Add this entry to ~/.codex/config.toml if you prefer to configure the server manually.
[mcp_servers.tokensand]
command = "npx"
args = ["-y", "https://tokensand.com/packages/dev-adoption-cli-0.1.65.tgz", "mcp", "serve", "--api", "https://tokensand.com"]2Try it on your current task
Start a new session in Codex, then send this prompt.
View prompt
Use Tokens& for my current task in the open repository. Reuse its stack, constraints and tests; ask for the task only if missing. Use search_tools only for a missing capability or relevant docs, and find_perks only for a needed provider. When I ask to resume saved work, use get_context to locate that plan, then get_build_packet with its exact recommendationId and selected variant. Skip tools that do not help. Continue authorized work here and report what you tested or saved.
Connect your saved plans
Setup help
Public tool search needs no token. Your website sign-in does not connect private saved work to your coding agent.
For saved Build Packets and projects, open saved-plan setup and sign in. The generated configuration includes a scoped DAI_TOKEN and --mode developer.
For public-only use with CLI 0.1.65, set or replace the command argument with --mode public. This disables private credentials, including saved tokens. Command and saved modes take precedence over DAI_MODE.
If Tokens& tools are missing, check the server is enabled in your agent’s MCP settings and start a new session. In Codex, run codex mcp list.
Using ChatGPT in your browser? These commands are for local coding agents. A ready-made Tokens& MCP connection in ChatGPT web is not available yet. For a Build Packet, open More formats to copy Markdown or download JSON. This is a manual handoff; it does not connect your account. Never paste tokens, passwords, or API keys into a chat.
