Agents SDK

Agents SDK — one API, every provider

The same /api/agents surface is a meta-agent router: set `source` to choose who runs the task. openpaths (the default) runs it on app.nz workers using our model credentials — which take precedence over any provider key when running in our cloud — and opens PRs through our GitHub app. devin, cursor, and codex-cloud launch the run on that vendor and the result (status, logs, diff, pull request) normalizes back into the same task — so every provider reads through one trace. GET /api/agents/config returns `sources` plus a `sourcesConfigured` map so a UI can disable providers that lack server credentials.

basehttps://app.nz
Source values
openpathssourceDefault. Runs on app.nz workers with our credentials; engine selects Claude Code / Codex / Gemini. Real PRs via our GitHub app.
devinsourceLaunches a Devin cloud session. Needs server DEVIN_API_KEY + DEVIN_ORG_ID.
cursorsourceLaunches a Cursor cloud agent with auto-PR. Needs server CURSOR_API_KEY.
codex-cloudsourceLaunches an OpenAI Codex Cloud task against a GitHub-connected repo. Needs CODEX_CLOUD_ENV_ID + the codex CLI.
Launch on Devin (or swap source for cursor / codex-cloud / openpaths)
curl -sX POST https://app.nz/api/agents/tasks \
  -H "Authorization: Bearer pk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "source": "devin",
    "prompt": "fix failing CI and open a pull request",
    "repo": "lee101/edukids",
    "baseBranch": "main",
    "autoMergePr": false
  }'

# CLI equivalent:
#   app agents-sdk run "fix failing CI and open a PR" --source devin --repo lee101/edukids
#   app agents-sdk providers      # see which providers are configured
#   app agents-sdk logs <id>      # read the normalized trace