Skip to main content
Configure every aspect of an agent before execution. For running agents, see Run Agents.

Create an Agent

Agent Studio is the visual interface for building, configuring, and testing AI agents without writing code.
1

Navigate to the AI Studio

2

Create a new Agent

Use the + button in the Project or folder.Creating an entity
3

Configure the Agent

Name and describe the Agent. Use the AI assistant to pre-configure role and instructions, or choose Start from scratch for full manual control.The Agent Studio opens with a customizable template.
The Agent Studio has three panels:
  • Instructions Panel (left): Define what the agent does and how it behaves.
  • Configuration Panel (center): Set up model, tools, context, evaluators, and constraints.
  • Chat Panel (right): Chat with the agent and test their behaviour.
Save the configuration at any time using the Publish button.

Select a Model

Select the language model that powers the agent from the Configuration panel.
Available models depend on the AI Router configuration. Switch models at any time and the agent uses the new model on its next execution.
Considerations when selecting a model:
  • Speed vs Quality: Smaller models are faster but less capable.
  • Cost: Larger models cost more per token.
  • Capability: Some tasks require more advanced reasoning models.
  • Latency: Models that use reasoning tokens add latency. Consider the impact of Max Iterations and Max Execution Time constraints.

Configure Instructions

The Instructions panel defines the agent’s behavior, goals, and personality. Write clear, exhaustive instructions to keep behavior consistent across executions.
Use the AI button to generate effective instructions for the agent.
You are an experienced customer support specialist for the SaaS company **{company_name}**.
Your job is to provide clear, concise, and accurate answers to customer inquiries about {product_name}.
Responses should be brief, no more than **150 words**, and include any necessary next-step actions.

**Step-by-Step Instructions**

1. **Read the query**: `{customer_query}`.
2. **Extract the core problem** (e.g., password reset, API error, pricing).
3. **Draft a concise answer**: no more than 150 words.
4. **Add suggested next steps**: at most 3 actions the customer can take.
5. **End with a friendly closing** and a reminder of available support channels (`{support_contact}`).

Role and Description

  • Role: Defines the agent’s responsibility and coverage. Sent to the agent during execution to reinforce its perimeter.
  • Description: Used by other agents in multi-agent setups to understand what this agent can do. Write a detailed description so orchestrators delegate correctly.
To learn more about multi-agent orchestration, see Multi-Agent Workflows.

Snippets

Embed reusable content blocks in agent instructions using {{snippet.key}}, where key is the key of a Prompt Snippet in the project. Updating a snippet propagates the change to every agent instruction that references it.

Variables and Templates

Reference dynamic values in agent instructions using double braces: {{variableName}}. Pass a key-value map in the variables field at invocation time and Orq.ai substitutes each variable before execution.
Agent variable prompt templating in the AI Studio
Orq.ai supports three template engines. Select the Template Engine from the Agent Settings panel:
  • Text (default): variables use {{double_braces}} syntax.
  • Jinja: full templating with conditionals, loops, filters, and more.
  • Mustache: logic-less templating with sections.
Template engine selector
Instructions template:
You are a support assistant for {{company_name}}.

{% if user_tier == "premium" %}
{{customer_name}} is a premium customer. Greet them by name and let them know they have priority support.
{% else %}
{{customer_name}} is on the free plan. Standard response time is 24 hours.
{% endif %}
Invoke the agent:
cURL
curl --request POST \
  --url 'https://api.orq.ai/v2/agents/support-bot/responses' \
  --header 'Authorization: Bearer <ORQ_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
    "message": {
      "role": "user",
      "parts": [{"kind": "text", "text": "I need help."}]
    },
    "variables": {
      "company_name": "Acme",
      "customer_name": "Sarah",
      "user_tier": "premium"
    }
  }'
Instructions template:
You are a support assistant for {{company_name}}.

{{# is_premium}}
{{customer_name}} is a premium customer. Priority support with a 2-hour SLA.
{{/ is_premium}}
{{^ is_premium}}
{{customer_name}} is on the free plan. Standard response time is 24 hours.
{{/ is_premium}}
Invoke the agent:
cURL
curl --request POST \
  --url 'https://api.orq.ai/v2/agents/support-bot/responses' \
  --header 'Authorization: Bearer <ORQ_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
    "message": {
      "role": "user",
      "parts": [{"kind": "text", "text": "I need help."}]
    },
    "variables": {
      "company_name": "Acme",
      "customer_name": "Sarah",
      "is_premium": true
    }
  }'
For a complete reference of all template features including filters, macros, and more, see Prompt Templating.

Add Tools

Tools extend the agent’s capabilities by allowing it to interact with external systems, execute code, or fetch information. Add tools from the Tool selection modal.
Agent Adding Tool

Standard Tools

The following tools are available to all agents out of the box:
ToolNameDescription
Current Datecurrent_dateProvides the current date to the model
Google Searchgoogle_searchLets an agent perform a Google Search
Web Scraperweb_scraperLets an agent scrape a web page
Query Memory Storequery_memory_storeLets an agent query a Memory Store. Added automatically when using a Memory Store.
Retrieve Memory Storesretrieve_memory_storesLets an agent fetch Memory Stores. Added automatically when using a Memory Store.
Write Memory Storewrite_memory_storeLets an agent save to a Memory Store. Added automatically when using a Memory Store.
Delete Memory Documentdelete_memory_documentLets an agent delete a memory document. Added automatically when using a Memory Store.
Query Knowledge Basequery_knowledge_baseLets an agent query a Knowledge Base. Added automatically when using a Knowledge Base.
Retrieve Knowledge Basesretrieve_knowledge_basesLets an agent fetch a Knowledge Base. Added automatically when using a Knowledge Base.
Call Sub Agentcall_sub_agentLets an agent invoke another agent.
Retrieve Agentsretrieve_agentsLets an agent fetch other agents.
Create custom tools to use within Agents:
Agent instructions must explicitly mention the available tools so the model knows when and how to invoke them.The model will not use tools unless the instructions clearly describe:
  • What each tool does
  • When to use it
  • How to call it
Example: Web Search Agent
You are a research assistant. Your job is to find current information.

**Available Tools:**

1. **google_search** - Search the internet for information
   - Use this when you need current information or factual data
   - Provide clear search queries
   - Example: When asked "What are the latest AI developments?", call google_search with "latest AI developments 2025"

Function Tools

Define custom functions inline with an OpenAPI-style schema.
{
  "type": "function",
  "key": "get_local_events",
  "display_name": "Get Local Events",
  "description": "Retrieves local events for a given city and date",
  "function": {
    "name": "get_local_events",
    "parameters": {
      "type": "object",
      "properties": {
        "city": { "type": "string", "description": "The name of the city" },
        "date": { "type": "string", "description": "The date (YYYY-MM-DD)" }
      },
      "required": ["city", "date"]
    }
  }
}

Python Tools

Embed executable Python code directly in the tool definition. The code runs server-side in a sandboxed environment.
{
  "type": "code",
  "key": "password_generator",
  "display_name": "Password Generator",
  "description": "Generate secure passwords with numbers and symbols",
  "language": "python",
  "code": "import random\nimport string\n\nchars = string.ascii_letters\nif params.get('include_numbers'): chars += string.digits\nif params.get('include_symbols'): chars += '!@#$%^&*'\nresult = {'password': ''.join(random.choice(chars) for _ in range(params.get('length', 12)))}",
  "parameters": {
    "type": "object",
    "properties": {
      "length": { "type": "integer", "description": "Password length", "default": 12 },
      "include_numbers": { "type": "boolean", "default": true },
      "include_symbols": { "type": "boolean", "default": true }
    }
  }
}
The code receives declared parameters via params.get(...) and must assign its output to result. Using return is not supported.

HTTP Tools

Reference a pre-created HTTP tool by its key. Create HTTP tools first via the Tools page or API.
{
  "type": "http",
  "key": "weather_api"
}

MCP Tools

Reference a pre-created MCP tool by its tool_id. Create MCP tools first via the Tools page or API.
{
  "type": "mcp",
  "tool_id": "TOOL_ID"
}
See the full Create Agent API reference for all tool configuration options.

Connect Knowledge Bases

Attach a Knowledge Base to ground the agent’s responses in relevant data.
  1. Click Add context in the Configuration panel.
  2. Select a Knowledge Base.
Unlike Deployments, a Knowledge Base attached to an agent is not queried on every request. The agent decides when to use the query_knowledge_base tool based on context.
The Knowledge Base description must be explicit so the agent knows when to query it.
For more on building Knowledge Bases for Agents, see Knowledge Bases.

Connect Memory Stores

Attach a Memory Store to give the agent persistent memory across conversations.
  1. Click Add context in the Configuration panel.
  2. Select a Memory Store.
Memory Stores are created and managed through the API. To learn more, see Using Memory Stores.
To use a Memory Store correctly, a Memory Entity ID must be sent during agent execution. This entity ID scopes memories to a specific user or session.
For more on using Memory Stores with Agents, see the Memory Stores documentation.

Configure Evaluators and Guardrails

Evaluators measure agent performance against defined criteria. Guardrails can block execution when an evaluation fails.
Only pre-configured Evaluators can be attached to agents. To see available standard evaluators or create custom ones, see Evaluators.
  1. Click Add Evaluator or Add Guardrail in the Configuration panel.
  2. Select the evaluator type.
  3. Configure evaluation parameters:
    • Input or Output: whether to evaluate the agent’s input or its output.
    • Sample Rate (Evaluators only): the fraction of executions that trigger evaluation.
Evaluators run automatically during task execution and provide performance metrics.
Output Guardrails and Streaming: When an agent is invoked with streaming enabled, output guardrails are deactivated because they cannot run on partial chunks.

Configure Runtime Constraints

Control resource usage and execution limits from the Configuration panel.
ConstraintDescription
Max IterationsMaximum number of LLM reasoning iterations per task
Max Execution TimeMaximum time the agent runs (in seconds)
Max Iterations and Max Execution Time compound: an agent requiring many reasoning steps can hit both limits simultaneously. max_execution_time counts only LLM thinking time; tool call and sub-agent call duration is excluded. Start conservative and increase as needed.
Agents are run and scaled by Orq.ai. No infrastructure setup required.

Versions

The Versions tab shows the full history of all published agent configurations. Open it by selecting Versions from the tabs in the Agent Studio page.
Each version entry shows the version number, author, timestamp, optional commit message, and any assigned environment badges (e.g. latest, production).

Comparing Changes

Click on any version to open the Compare Changes view. Use the From and To dropdowns to compare any two versions, including Current (unpublished working changes).
Two view modes are available:
  • Instructions: diff of agent instructions only.
  • Snapshot: full JSON diff of the complete agent configuration.
Use the button to toggle between side-by-side and unified diff layouts.

Assigning Environments

Click on a version to assign it to an environment:
  • Select an existing environment (e.g. develop, production).
  • Create environment: add a new environment from this dropdown.
  • Manage environments: open the full environment management settings.
A version can be assigned to multiple environments. Assigned badges appear on the version row.
To learn more about environments, see Environments.