Actions11
- Agent Actions
- File Actions
- Object Actions
- Utility Actions
Agent → Execute Custom System Agent
AI-generatedSummary
Executes a custom system agent via the Sapience API, sending model, system instructions, user query, temperature, optional output type and context, and returns the API response.
Inputs
- Model — OpenAI model to use (gpt-4o, gpt-4.1, o3-mini, gpt-5.2). Default: gpt-4o.
- System Instructions (required) — Complete system prompt for the agent.
- User Query (required) — The user's input/question.
- Temperature — Controls randomness (0.0‑2.0); ignored for reasoning models like o3‑mini. Default: 0.3.
- Output Type — Structured output type; leave empty for plain text output. Options: Agent Instructions, Document Translation, Generic, Goal, Project, Task, Text (Default).
- Context (JSON) — Optional context object passed to the agent. Example: {'company_name':'SuperStore','customer_name':'Maria'}.
Output shape
object
Returns the JSON payload from the /api/v2/system-agents/execute-custom endpoint.
Examples
Example 1: Running a simple Q&A agent with plain text output
Model: gpt-4o, System Instructions: 'Answer questions concisely.', User Query: 'What is the capital of France?', Temperature: 0.5, Output Type: (empty), Context: {}