AI Session Start

Description

Creates a new AI workflow session, starts the orchestration runtime using the named planner agent profile, and submits the supplied prompt as the first user message. Returns the SessionId. Pair with `AISessionWait` to drive a one-shot AI workflow and pull back every message and tool call generated during the turn.

Notes:

  • AgentProfile must match the Name of an agent profile registered on the server (use the same names visible in the AI Sessions UI). The selected profile becomes the planner — its AccessibleFunctions and IncludeSpecterScripts flag determine what tools and SpecterScripts the workflow can use.
  • Provider is one of OpenAI, Anthropic, Ollama.
  • ToolApprovalPolicy is one of AutoApproveAll, AutoApproveLow, AutoApproveMedium, AutoApproveNone. Default AutoApproveAll so the workflow runs unattended.
  • The cmdlet returns immediately with the SessionId once the prompt has been queued. Use AISessionWait to block until the agent finishes.

Example:

{
  "function_call": {
    "name": "AISessionStart",
    "arguments": {
      "Prompt": "List all active listeners and summarize their configuration.",
      "AgentProfile": "Operation Orchestration",
      "ModelName": "gpt-4o",
      "Provider": "OpenAI"
    }
  }
}
Scroll to Top