Skip to content
Proud to collaborate with Microsoft for Startups

agents.session-launch ​

Launch a new agent session: validate, create, load context, start runner, start watch

Orchestrate a full agent session launch.

Overview ​

PropertyValue
Workflow typeDag
LibraryApp-agents
Version1.0

Triggers ​

SourceEndpoint / EventDescription
APIPOST /api/agents/sessionsLaunch a new agent session

Input Schema ​

FieldTypeRequiredDefaultDescription
workflow_run_uuidstringNo—DAG-stamped parent run id (auto-injected by the engine)
workflow_run_idstringNo——
agent_config_uuidstringYes——
actor_uuidstringNo——
act_as_identity_app_uuidstringNo—ADR-IDENTITY-010 session mode: run this Staff actor session as the actor's own end-user seat in this identity app
ticket_git_work_uuidstringNo——
ticket_uuidstringNo——
repository_uuidstringNo——
branch_refstringNo——
target_refstringNo——
base_oidstringNo——
head_oidstringNo——
taskstringYes——
organization_uuidstringYes——
contextdictNo——
caller_refstringNo——
attachment_uuidslistNo——
include_platform_defaultsbooleanNo——
refresh_stale_mcpbooleanNo——
max_tool_roundsintegerNo——
max_parallel_tool_callsintegerNo——
safe_retry_resume_noncestringNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
errorstringNo——
error_typestringNo——
failed_atstringNo——
failed_at_statestringNo——
failed_layerjsonNo——
failed_stepstringNo——
failure_reasonstringNo——
workflow_run_uuidjsonNo——
workflow_run_idstringNo——
agent_config_uuidjsonNo——
actor_uuidjsonNo——
act_as_identity_app_uuidjsonNo——
ticket_git_work_uuidjsonNo——
ticket_uuidjsonNo——
repository_uuidjsonNo——
branch_refjsonNo——
target_refjsonNo——
base_oidjsonNo——
head_oidjsonNo——
taskjsonNo——
organization_uuidjsonNo——
contextjsonNo——
caller_refjsonNo——
attachment_uuidsjsonNo——
include_platform_defaultsjsonNo——
refresh_stale_mcpjsonNo——
max_tool_roundsjsonNo——
max_parallel_tool_callsjsonNo——
safe_retry_resume_noncestringNo——
reconcile-stale-capacityjsonNo——
validate-createjsonNo——
fetch-secretsjsonNo——
load-skillsjsonNo——
load-mcpjsonNo——
load-memoryjsonNo——
build-tool-catalogjsonNo——
plan-git-workjsonNo——
reserve-delivery-costjsonNo——
launch-runnerjsonNo——
start-watchjsonNo——
mark-failedjsonNo——
compensation_triggerjsonNo——
comp_queuejsonNo——
comp_current_layerjsonNo——
comp_retry_countjsonNo——

DAG Layers ​

#LayerStepsCompensation
1reconcile-stale-capacityrunner.execution-reconcile-stale-claims—
2validate-createagents._session-launch.validate-createagents._session-launch.mark-failed
3load-contextagents._session-launch.fetch-secrets, agents._session-launch.load-skills, agents._session-launch.load-mcpagents._session-launch.mark-failed
4build-tool-catalogagents.tool-catalog.buildagents._session-launch.mark-failed
5load-memoryagents._session-launch.load-memoryagents._session-launch.mark-failed
6plan-git-workticket.git-work.beginagents._session-launch.mark-failed
7reserve-delivery-costticket.software-delivery.cost-reserve-bundleagents._session-launch.mark-failed
8launch-runneragents._session-launch.launch-runneragents._session-launch.mark-failed
9start-watchagents._session-launch.start-watch—

Execution Flow ​

Compensation ​

When any layer fails, its compensation steps run in reverse order to roll back the work completed so far.

Sub-workflows ​

Sub-workflowStep name
runner.execution-reconcile-stale-claimsreconcile-stale-capacity
agents._session-launch.validate-createvalidate-create
agents._session-launch.fetch-secretsfetch-secrets
agents._session-launch.load-skillsload-skills
agents._session-launch.load-mcpload-mcp
agents.tool-catalog.buildbuild-tool-catalog
agents._session-launch.load-memoryload-memory
ticket.git-work.beginplan-git-work
ticket.software-delivery.cost-reserve-bundlereserve-delivery-cost
agents._session-launch.launch-runnerlaunch-runner
agents._session-launch.start-watchstart-watch
agents._session-launch.mark-failedmark-failed

Outcomes ​

OutcomeTypeDescriptionState Data Keys
launchedSUCCESSAgent session launchedworkflow_run_uuid, agent_config_uuid
failedFAILUREAgent session launched failedfailure_reason, error, error_type, failed_at_state, failed_step, failed_layer

Business Errors ​

CodeMessage Template
AGENTS_ORGANIZATION_CONTEXT_INVALIDAuthenticated organization context is missing or does not match the workflow input
AGENTS_SESSION_NOT_FOUNDAgent session {session_uuid} was not found in the organization
AGENTS_CONFIG_NOT_FOUNDAgent configuration {agent_config_uuid} was not found in the organization
AGENTS_RUNNER_GROUP_NOT_FOUNDRunner group {runner_group_uuid} was not found in the organization
AGENTS_VALIDATION_FAILEDWorkflow input or domain state failed validation:
AGENTS_CONFLICTConflicting agent domain state:
AGENTS_PROVIDER_FAILEDUpstream provider or runner call failed:
AGENTS_MCP_CALL_FAILEDMCP tool call failed for {tool_name}:

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "agents.session-launch",
  "initial_data": {
    "agent_config_uuid": "value",
    "task": "value",
    "organization_uuid": "value"
  }
}