Actions14
- Chat Actions
- Image Actions
- Video Actions
- Agent Actions
- Audio Actions
- Tools Actions
Agent → Run Graph
AI-generatedSummary
Run an AI agent with configurable model, prompt, system instructions, optional built-in tools, and checkpointer-backed memory. Executes a ReAct loop when autoExecuteTools is true, returning the agent's final response, step-by-step execution logs, tool execution count, session thread ID, and usage metadata.
Inputs
- model (required) — The AI model to use for the agent (e.g., qwen3-max, claude-4.5-sonnet, gpt-5, etc.)
- prompt (required) — The user goal or query for the agent
- systemMessage — Agent persona and instructions
- builtinTools — Built-in tools the agent can use automatically: webSearch, ocr, imageGenerate, videoGenerate
- autoExecuteTools — Automatically execute tool calls and return results (ReAct loop). Defaults to true.
- maxContextTokens — Maximum context tokens. SDK auto-compacts when exceeded. Default 32000.
- maxSteps — Maximum number of agent steps. Prevents infinite loops. Default 10, max 50.
- threadId — Session ID for memory continuity. Auto-generated if checkpointer is enabled and left empty.
- tools — Array of user-defined tool definitions in OpenAI function format.
- temperature — Controls randomness in generation. Default 0.7, range [0, 2].
- checkpointerType — State persistence type for multi-turn conversations. Options: none, memory, kodo, redis, postgres. Default none.
- checkpointerConnection — Connection string for the checkpointer backend (redis://... or postgresql://...). Shown when checkpointerType is redis or postgres.
- kodoBucket — Qiniu Kodo bucket name for state storage. Shown when checkpointerType is kodo.
- kodoAccessKey — Qiniu Access Key (AK). Shown when checkpointerType is kodo.
- kodoSecretKey — Qiniu Secret Key (SK). Shown when checkpointerType is kodo.
- kodoPrefix — Object key prefix for session states. Default n8n-threads/. Shown when checkpointerType is kodo.
Output shape
The agent's execution result including final response, step-by-step logs, tool execution metadata, and session info.
parallelConfig is always null (deprecated; parallel execution not supported in current SDK version).