Skip to content

Testing before you publish

You can validate changes without making them live to your org.

Run a chat on an unpublished agent revision. Instruction edits land on a draft (see concepts). To try the draft end-to-end before deploy_agent:

  • start_chat(agent, message, use_draft=true) — pins the chat to the agent’s current draft revision.
  • start_chat(agent, message, revision_version=N) — pins a specific past version (re-test an old instruction).
  • Omit both → the chat runs the published (active) revision (the default).

The pin holds for the whole chat. get_chat reports revision_version (and pinned_revision_id) so you can confirm which revision ran — null means it followed the published one. In the web UI these chats show a “Running draft v{n}” badge. Iterate on the draft (update_agent) → test → deploy_agent when happy.

Test building blocks in isolation (no chat, no agent wiring):

  • test_code_tool(tool, args) — runs the code tool’s current source in a sandbox and returns its status, result, logs, and any error.
  • test_prompt(prompt, variables, revision_version=?) — renders the template and runs it against its LLM; returns status, result (the model output), error, duration_ms, and token usage. If the tested revision has an extraction schema (fields, see prompt-fields), pass input_text or input_url instead of (or alongside) variablesresult is then the structured data.

Each of these records a run, so it shows up on the building block’s Runs page. Prompts are revision-versioned: pass revision_version to test an unpublished revision; omit it for the latest. (Code tools have no revisions — the test runs the single saved source.) These all require an admin/owner role.

To test a skill, mount it on an agent and run a draft-revision chat — there is no isolated skill runner.