Agentsai-org
POST/groups/{group_id}/ai-org/rituals/{ritual_key}/run
Run a ritual now, outside its cadence. The run starts within a minute, is held to the
run_ai_ritual_now
ai_org:manage
A token needs theai_org:managescope: Configure and operate an AI organization: drafts, pausing, suspending, sessionsGranted bywrite_api.Every operation this scope unlocksAudited · mutation
x-gitmoap-audit: {"kind":"audited","arg":"mutation"}
Quota · ai sessions per org per day
x-gitmoap-quota: {"kind":"enforced","arg":"ai_sessions_per_org_per_day"}
Takes ai_org.manage and a person. The ritual must be in the live revision; a ritual held for
every squad names the squad to run for. Counts against the organization's sessions per day.
Parameters
Path
- group_idGroupId (string · uuid)The organization's top-level group
- ritual_keyRitualKey (string)The ritual, by its key in the live revision
Request body
application/json- squad_keySquadKey (string) or nulloptionalFor a ritual of every squad, the squad to run it for; required then, refused otherwise.
Request body exampleSynthesized example
{}
Responses
200The run, scheduled for nowapplication/json
- cost_microsinteger · int64What it spent, in millionths of a dollar with the fee included.
- kindRitualKindstand_upplanningrefinementreviewretrospectivearchitecture_reviewreleasereplenishmentdigestWhat the ritual does.
- namestringThe ritual's name when the run was scheduled.
- ritual_keyRitualKey (string)The ritual's key in the revision.
- run_idAiRitualRunId (string · uuid)The run.
- scheduled_forstring · date-timeWhen it was due.
- started_byAiRitualStartscheduledmanualreleaseWhat started it.
- stateAiRitualRunStatescheduledrunningcompletedskippedfailedWhere it stands.
- budget_microsinteger · int64 or nulloptionalThe most it may spend.
- ended_atstring · date-time or nulloptionalWhen it ended.
- errorstring or nulloptionalWhy it failed.
- gate_idAiGateId (string · uuid) or nulloptionalThe gate its outcome waits on, when a person approves it.
- outcomeobject or nulloptionalWhat it produced, as its facilitator recorded it.
- phaseAiRitualPhaseparticipantsfacilitatingawaiting_approvalapplyingor nulloptionalWhere a running run is.
- skip_reasonstring or nulloptionalWhy it was skipped.
- squad_keySquadKey (string) or nulloptionalThe squad it ran for; absent for the whole organization.
- started_atstring · date-time or nulloptionalWhen it started.
- threadstring or nulloptionalIts thread, by address.
200 exampleSynthesized example
{
"cost_micros": 39,
"kind": "stand_up",
"name": "payments-api",
"ritual_key": "ritual-key-2115",
"run_id": "4b03b78c-8e13-4ca9-a220-352ca6c2adc6",
"scheduled_for": "2026-10-10T16:27:59Z",
"started_by": "scheduled",
"state": "scheduled",
"budget_micros": 4,
"ended_at": "2026-10-13T15:39:15Z",
"error": "error-491e",
"gate_id": "f6ff974a-131f-49b2-9df2-0ec5ec3cc5fe",
"outcome": {},
"phase": "participants",
"skip_reason": "skip-reason-5912",
"squad_key": "squad-key-d240",
"started_at": "2026-10-16T17:54:42Z",
"thread": "thread-e2af"
}
400Bad request — a path parameter is not a well-formed value of its typeapplication/json
Error codes
- BAD_REQUESTThe request is malformed: a parameter or a body field is not a well-formed value of its type
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
400 exampleSynthesized example
{
"error": {
"code": "code-1e24",
"message": "Stream pipeline status into the run header"
}
}
401Unauthenticated — no credential, or an invalid oneapplication/json
Error codes
- UNAUTHORIZEDNo credential was sent, or the one sent is invalid, expired or revoked
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
401 exampleSynthesized example
{
"error": {
"code": "code-ae23",
"message": "Draw the region map from operation density"
}
}
403Forbidden — the caller's access level or token scope is insufficientapplication/json
Error codes
- FORBIDDENYou are signed in but may not do this here;
reasonnames the permission or the rule that refused it - INSUFFICIENT_SCOPEThe access token lacks the scope this operation needs;
required_scopenames it - PERMISSION_REQUIREDYou need a permission you do not hold here; the message names it
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
403 exampleSynthesized example
{
"error": {
"code": "code-eadd",
"message": "Draw the region map from operation density"
}
}
404application/json
Error codes
- NOT_FOUNDThe resource does not exist — or exists and you cannot see it: a private resource you have no access to answers exactly as an absent one does
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
404 exampleSynthesized example
{
"error": {
"code": "code-c0a2",
"message": "Stream pipeline status into the run header"
}
}
409The organization has no live revisionapplication/json
Error codes
- CONFLICTThe request conflicts with the resource's current state;
reasonsays how - LEGAL_ACCEPTANCE_REQUIREDAccept the current Terms of Service before changing anything; reading stays open
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
409 exampleSynthesized example
{
"error": {
"code": "code-c2e5",
"message": "Label every synthesized example"
}
}
422The squad is missing, or the ritual does not run for itapplication/json
Error codes
- NOT_A_USERA team is made of people; give a service account access directly instead
- UNPROCESSABLE_ENTITYThe request is well-formed but asks for something the resource's rules do not allow;
reasonsays which
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
422 exampleSynthesized example
{
"error": {
"code": "code-81bb",
"message": "Pin a page's payload to the build that rendered it"
}
}
429The organization has started as many sessions today as its plan allowsapplication/json
Error codes
- TOO_MANY_REQUESTSRetryableA quota, a rate limit or a transfer budget is spent. When the response carries
Retry-After, retry after that many seconds
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
429 exampleSynthesized example
{
"error": {
"code": "code-db39",
"message": "Draw the region map from operation density"
}
}
CLI
gitmoap ai-org run-ai-ritual-now
- --group-ididThe organization's top-level group (id or group path)
- --ritual-keyidThe ritual, by its key in the live revision
- --squad-keystringoptional