Actions3
- Agent Actions
- AI Interaction Actions
Agent → Invoke
AI-generatedSummary
Invokes a Port AI agent with a prompt, returning an SSE-parsed response with invocation tracking and execution results.
Inputs
- agentIdentifier (required) — The agent identifier to invoke
- prompt (required) — Prompt string
- additionalFields — Optional configuration for the invocation. Available fields: context (json object), invocation_identifier (string), labels (json object), model (options: gpt-5, claude-sonnet-4-20250514, claude-haiku-4-5-20251001), provider (options: anthropic, azure-openai, bedrock, openai, port)
- stream — Whether to stream the response (default: false)
- use_mcp — Whether to use MCP (default: false)
Output shape
object
Parsed Server-Sent Events response from the agent invocation. Contains invocationIdentifier, events, executionMessages, finalData, executionMessage, and data fields. Emitted as a streaming event stream that resolves to final execution output.
Examples
Example 1: Invoke a Port AI agent with a simple prompt and default model
agentIdentifier: 'agent_123', prompt: 'What is the current status?', stream: false, use_mcp: false