Agents

Change what an app instance builds and how it starts.

Call to point the instance at another branch, fix a build command, or replace the private-repository token. The pod reads this at start, so the change takes effect on the next POST /agents/{id}/rebuild.

patch/agents/{id}/app

Request

  • Base URL: https://agentspodium.com/api
  • URL: https://agentspodium.com/api/agents/{id}/app
  • Auth: HTTP bearer

Path parameters

idstring required

Agent id (agt_…).

Request body

repostring required

Public https git URL. Private repositories need repoToken on create.

branchstring required
runtime'node' | 'python' | 'go' | 'static' | 'docker' | 'null' nullable

Omit and the pod detects it from the repository.

buildCommandstring nullable
outputDirstring nullable

Static output, relative to rootDir; null means no static half.

startCommandstring nullable

Backend process; null means a static-only app.

appPortinteger required

Port the backend listens on inside the pod.

apiPrefixstring required

Paths routed to the backend; everything else is served from outputDir.

envobject

Environment variables for the app. Not for secrets.

rootDirstring nullable

Directory inside the repository where the build runs. For a monorepo whose app is not at the root. Netlify calls this "base".

repoUserstring nullable

Username paired with repoToken when the host wants one. Left out, we use what the host expects: x-access-token for GitHub, oauth2 for GitLab, the token alone for Gitea and Forgejo.

Example request

{
  "repo": "https://github.com/owner/project",
  "buildCommand": "npm ci && npm run build",
  "outputDir": "dist",
  "startCommand": "node server.js",
  "rootDir": "app"
}

Response

OK.

appliedstring required

Example response

{
  "agent": {
    "id": "agt_…",
    "app": {
      "repo": "https://github.com/owner/project",
      "buildCommand": "npm ci && npm run build",
      "outputDir": "dist",
      "startCommand": "node server.js",
      "rootDir": "app"
    }
  },
  "applied": "on the next rebuild"
}

Changes

No recorded changes to this operation across all 1 revision of this API.