Skip to content

GitHub Action

import { Badge } from ‘@astrojs/starlight/components’;

The ambient-action GitHub Action creates Ambient Code Platform sessions directly from GitHub workflows. Use it to automate bug fixes on new issues, run code analysis on pull requests, or trigger any agent workflow from CI/CD.

  • Fire-and-forget — Create a session and move on. The workflow does not wait for the session to finish.
  • Wait-for-completion — Create a session and poll until it completes (or times out). Useful when subsequent steps depend on the agent’s output.
  • Send to existing session — Send a message to a running session instead of creating a new one (set session-name).
InputRequiredDefaultDescription
api-urlYesAmbient Code Platform API URL
api-tokenYesBot user bearer token (store as a GitHub secret)
projectYesAmbient project/namespace name
promptYesInitial prompt for the session, or message to send to an existing session
session-nameNoExisting session name to send a message to (skips session creation)
display-nameNoHuman-readable session display name
reposNoJSON array of repo objects ([{"url":"...","branch":"...","autoPush":true}])
labelsNoJSON object of labels for the session
environment-variablesNoJSON object of environment variables to inject into the runner
timeoutNo0Session inactivity timeout in seconds (auto-stops after this duration of inactivity; 0 means no timeout)
stop-on-run-finishedNofalseStop the session automatically when the agent finishes its run
modelNoModel override (e.g., claude-sonnet-4-20250514)
workflowNoJSON workflow object (e.g., {"gitUrl":"https://...","branch":"main","path":"workflows/my-wf"})
waitNofalseWait for session completion before exiting
poll-intervalNo15Seconds between status polls (only when wait: true)
poll-timeoutNo60Max minutes to poll before giving up (only when wait: true)
no-verify-sslNofalseDisable SSL certificate verification (for self-signed certs)
OutputDescription
session-nameCreated session name
session-uidCreated session UID
session-urlURL to the session in the Ambient UI
session-phaseFinal session phase (only set when wait: true)
session-resultSession result text (only set when wait: true)

Add the action to any GitHub Actions workflow:

name: Run ACP Session
on:
issues:
types: [opened]
jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: ambient-code/ambient-action@v2
with:
api-url: ${{ secrets.ACP_URL }}
api-token: ${{ secrets.ACP_TOKEN }}
project: my-team
prompt: |
Triage this issue and suggest a severity label:
${{ github.event.issue.title }}
${{ github.event.issue.body }}

Set wait: true to block the workflow until the session finishes:

- uses: ambient-code/ambient-action@v2
with:
api-url: ${{ secrets.ACP_URL }}
api-token: ${{ secrets.ACP_TOKEN }}
project: my-team
prompt: "Analyze the codebase for security vulnerabilities and report findings."
wait: true
poll-timeout: 30

Use session-name to send a follow-up prompt to a running session instead of creating a new one:

- uses: ambient-code/ambient-action@v2
with:
api-url: ${{ secrets.ACP_URL }}
api-token: ${{ secrets.ACP_TOKEN }}
project: my-team
session-name: my-existing-session
prompt: "Run the test suite again and report the results."

Pass a JSON array to clone multiple repositories into the session:

- uses: ambient-code/ambient-action@v2
id: session
with:
api-url: ${{ secrets.ACP_URL }}
api-token: ${{ secrets.ACP_TOKEN }}
project: platform-team
prompt: "Refactor shared types to use the new schema"
repos: |
[
{"url": "https://github.com/org/frontend.git", "branch": "main", "autoPush": true},
{"url": "https://github.com/org/backend.git", "branch": "main", "autoPush": true}
]
workflow: |
{"gitUrl": "https://github.com/org/workflows.git", "branch": "main", "path": "workflows/cross-repo-refactor"}
wait: true
poll-timeout: 45
- run: echo "Session ${{ steps.session.outputs.session-name }} finished"