Skip to main content
Use this page to decide what your agent may do on its own and where a person has to act. A few steps need a person signed in to DevTune, GitHub or GitBook. Everything else a credential with the right scope can do by itself; for some of those writes, DevTune checks only that your agent says a person approved. Most writes act as the person who created the API key or signed in to the OAuth connection. That person answers for what their agent sends, including an approval it attests to. Attaching a Results URL or claiming or unclaiming a detected content change requires Member or higher on the project, or ownership of the personal account for a personal API key. See Code mode operations for the roles other writes require.

Steps only a person can take

DevTune doesn’t publish or edit your live site. A content draft becomes a pull request on your content repository or a change request in your GitBook space, opened by you or, if you turn it on, automatically. See GitHub pull requests and GitBook change requests.

Steps a credential can take on its own

These need the right scope and pass the checks each operation lists. No person has to see the change.
  • Approving or dismissing an agent draft with Review a managed-agent draft or devtune_review_agent_run, given agents.review. The decision is recorded against the key’s creator or the signed-in member. Code mode can’t review drafts. Grant agents.review only to an agent you trust to decide for its owner.
  • Adding or deleting tracked prompts with devtune_create_prompt, devtune_delete_prompt, their REST endpoints or code mode. Only Dex’s own proposals wait on a card.
  • Confirming a Dex handoff with devtune_decide_dex_handoff or its REST endpoint, which starts the specialist run and spends credits.
  • Starting a credit-spending run against an estimate (see Credit estimates).
  • Any write that takes an attestation field (see Approvals the caller attests to).

Credit estimates

Some starts spend credits only against an estimate the caller passes back. DevTune checks the estimate, not that a person saw it.
  • Prompt-set analysis. approvedEstimatedCredits must equal the current creditState.estimatedCredits. A changed estimate returns 409, and nothing starts. See Prompt-set analysis.
  • Agent Picks tests and schedules. A start needs a quote_token from an earlier quote and a max_credits ceiling. It returns 409 estimate_changed when the setup or baseline changed since the quote, and 409 over_max_credits when the fresh high estimate is above max_credits. A test token starts one test; a retry with it returns that test while it is queued or running, and 409 test_finished once it has ended. A schedule token saves once; reusing it returns 409 quote_token_used. See Start a test.
Code mode can’t start an Agent Picks test or turn on a schedule, so one execution can’t quote and spend.

Approvals the caller attests to

These fields carry your agent’s statement that a person approved or confirmed. DevTune refuses the request without them, but only checks their value. Other write tools, such as claiming a detected content change, ask your agent to get approval first but have no approval field.