Skip to content

Agent Invocation

Agent invocation is an advanced API path for trusted integrations that need to call the agent runtime directly instead of sending traffic through a product entry point.

TermDefinition
Agent invocationA direct call into the agent runtime.
Prompt or messageThe user or system input supplied by the integration.
Runtime contextTenant, space, workflow, channel, or integration metadata supplied with the call.
Tool accessThe set of configured tools available to the invoked agent.
ActionEndpoint
Invoke an agentPOST /llm-chain/agent/invoke
Terminal window
curl -X POST "$OCTO_BASE_URL/llm-chain/agent/invoke" \
-H "Authorization: Bearer $OCTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message": "Summarize the latest customer request",
"context": {
"spaceId": "space_123",
"workflowVersionId": "workflow_version_123"
}
}'

Use this route only when your integration contract explicitly calls for direct agent invocation. Most production channels should use Entry Points so routing, workflow versioning, interactions, and channel behavior stay consistent.

  1. Keep invocations server-side.
  2. Pass only the context needed for the agent to complete the task.
  3. Confirm which workflow version, tools, and knowledge sheets are available.
  4. Record external correlation IDs in context when you need to reconcile logs later.
  5. Review generated output before using it for irreversible downstream actions.

Is this the same as executing an AI Workflow? No. Workflow execution runs a graph of stencils. Agent invocation calls the agent runtime directly and should be reserved for integrations that need that lower-level behavior.

Can the invoked agent call tools? Tool availability depends on the runtime context and configured agent permissions. Verify tool access before production use.