Skip to main content

Run AI agent

Give an agent a goal and a set of agents it may use; it plans, calls the agents and returns its final answer and a trace.

Command in the AI Agents toolkit · id ooa.ai_agent/run · 34 inputs, 5 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
GoalStringNoWhat the agent should achieve, e.g. the customer email to handle.
InstructionsStringNoYou are a careful business assistant. Use the tools to act; never invent results.Role, policy and rules for the agent.
ToolsListNoIds of the agents it may call, e.g. ["lookup_order", "check_refund_policy"].
Sensitive toolsListNoAgent ids that need a person's approval before each call (e.g. issue_refund).
ProviderStringNoopenaiWho runs the model: OpenAI, Azure OpenAI, Anthropic, OpenAI-compatible (LiteLLM, vLLM, Ollama), Hugging Face (its router or your own TGI server), AWS SageMaker (a model on an Amazon SageMaker endpoint), AWS Bedrock or Google Vertex AI (Gemini).
ConnectionStringNoName of a Model Connection (provider, model and key managed in one place). Leave empty to set them on this action.
ModelStringNoModel name; the deployment name for Azure OpenAI; the endpoint name for AWS SageMaker; the model or inference profile id for AWS Bedrock.
API keyCredentialNoAPI key or access token from the vault (not needed for some self-hosted endpoints). For AWS Bedrock and AWS SageMaker: the AWS secret access key (or ACCESS_KEY_ID:SECRET). For Google Vertex AI: a service-account JSON key or an access token.
Endpoint addressStringNoEndpoint; required for Azure OpenAI, Vertex AI (https://REGION-aiplatform.googleapis.com/v1/projects/PROJECT/locations/REGION) and self-hosted models (for a TGI server, e.g. http://tgi-host:8080/v1).
Maximum stepsNumberNo8Maximum model turns. New steps start at 25, room for longer tasks; steps saved before keep their own value (8 when they never set one).
Maximum tokens totalNumberNo60000Stop when this many tokens have been used.
Hide personal dataBooleanNotrueReplace emails, phone and card numbers, IBANs and similar before sending; restored in the answer.
AWS access key IDCredentialNoAWS Bedrock and AWS SageMaker only: AWS access key id from the vault (api_key then holds the secret access key).
AWS regionStringNoAWS Bedrock and AWS SageMaker only: AWS region, e.g. eu-west-1.
RoleStringNoWho the agent acts as; added in front of the instructions.
Action planStringNoThe order in which to use the tools and when to stop or ask a person, in plain words.
Output fieldsDictionaryNoValues the agent must return, name to description; they come back in outputs. Plain text answer when empty.
Allow cancelBooleanNofalseLet the agent end with status cancelled when the goal should not be pursued (with output fields only).
Maximum duration (seconds)NumberNo0Stop with limit_reached after this many seconds; no time limit when 0.
TemperatureNumberNo00 = consistent, higher = more creative.
FormsListNoForms from the form designer the agent may show to the person at the runner, as tools, to ask for information or a decision (attended runners).
Form timeout (seconds)NumberNo600How long a form waits for the person; no answer is reported to the agent as not answered.
Toxicity guardrailStringNooffCheck the goal, the model's answers and the arguments it gives tools for toxic language (threats, self-harm, hate, insults, swearing): log records it in the trace; block stops the agent with status blocked.
Toxicity levelStringNomediumFrom which level the guardrail acts: high only threats, self-harm and hate; medium also insults and explicit content; low also swearing.
Blocked termsListNoYour own words or phrases the guardrail treats as high, e.g. competitor names or internal code names.
ApproversStringNoWhen nobody is at the runner, a sensitive tool's approval goes to the Task inbox of these people (user:NAME or role:NAME, separated by commas). Empty: denied at once.
Approval timeout (seconds)NumberNo600How long to wait for an answer in the Task inbox; no answer means no.
Knowledge indexesListNoKnowledge indexes (Knowledge Q&A > Build index) the agent searches itself for facts, with a search_knowledge tool.
Mcp server address (URL)StringNoAn MCP server whose tools the agent may use (Streamable HTTP).
Mcp tokenCredentialNoThe MCP server's bearer token, when it needs one.
Mcp toolsListNoWhich of the server's tools it may use (names); empty: all. Name them in sensitive_tools as mcp:NAME to need approval.
Goal fileFileNoA text file holding the goal, read as UTF-8 when the step runs (at most 1 MB).
Workspace folderFileNoThe folder the agent's tools may work in: file paths the model gives agents are kept inside it (one outside is refused), agents with a workspace_folder input receive it, and forms and knowledge indexes must be inside it. Any folder when empty.
CredentialsDictionaryNoCredentials from the vault the agents it runs may use, by the name of their Credential input. They are handed over directly and never shown to the model.

Outputs​

OutputTypeWhat it is
answerStringThe agent's final answer.
statusStringcompleted, limit_reached, stopped or blocked (by the toxicity guardrail); with output fields also failed or cancelled, as the agent decided.
outputsDictionaryThe output fields asked for (empty when none were).
traceListEach model turn and tool call, for review and audit.
tokensNumberTotal tokens used.