Skip to main content
Creating an agent from scratch gives you full control over every configuration setting — the agent’s profile, behavior instructions, tools, and knowledge sources. To begin: open your agentic app → Agents section → + New AgentCreate from Scratch.

Step 1: Set Up the Agent Profile

The agent profile establishes the agent’s identity and purpose. The orchestrator uses the name and description to route incoming tasks to the most suitable agent.

Name

Choose a unique, descriptive name that reflects the agent’s core function.
Good                          Avoid
────                          ─────
Order Manager                 Agent 1
Leave Manager                 Helper
Credit Card Assistant         Bot

Description

Write a description that tells the orchestrator when to route requests to this agent. Be specific about the agent’s responsibilities and what differentiates it from other agents in the application.
Good:  Manages all user requests related to order status, returns, and
       refunds. Handles order lookups by order number, email, or phone.

Weak:  Helps with orders.

Avatar

Select an avatar from the available list of logos and icons. The avatar identifies the agent visually in the user interface.

AI Model

Select the AI model and connection the agent will use for reasoning, tool calling, and generating responses.
Use caseRecommended model
Complex reasoningGPT-4, Claude 3 Opus
Fast responsesGPT-3.5-turbo, Claude 3 Haiku
Code generationGPT-4, specialized code models
Cost-sensitive tasksSmaller models
Click the settings icon next to the model selector to configure model generation parameters such as temperature and max tokens. For setup instructions, see Managing External Models.

Context Window Limit

Set the maximum number of messages the agent retains in its conversation context. When the limit is reached, older messages are automatically removed.
MessagesUse case
25Simple Q&A, transactional tasks
50Standard conversations (default)
100Multi-step processes
200Complex, long-running workflows

Step 2: Write the Agent Definition

The agent definition is the system prompt. It describes the agent’s role, the tasks it can perform, and the rules it must follow. Well-structured instructions ensure the agent responds consistently and operates within its intended scope. The definition editor supports:
  • Rich text formatting for structured instructions
  • Dynamic variables to reference memory fields, tools, and other agents at runtime — for example, {{memory.sessionMeta.metadata.FLAG}}
  • AI-assisted authoring to generate, refine, and organize instructions

Structure Your Instructions

Use clearly labeled sections to organize the definition:
## Role
Who is this agent and what is their purpose?

## Guidelines
How should the agent behave and respond?

## Response Format
How should responses be structured?

## Constraints
What should the agent never do?
Define scope boundaries to help the orchestrator route edge cases correctly:
### Out of Scope
- Payment processing and refunds (→ Billing Agent)
- Product recommendations (→ Sales Agent)
- Technical product support (→ Tech Support Agent)

Example: Order Manager

## Role
You are an AI agent responsible for enabling users to access real-time
order updates and manage their orders independently.

## Guidelines

### Order Status Inquiry
Provide updates on order status using the order lookup tool.

### Return Management
Verify return eligibility, guide users through the return process,
initiate returns, and provide information on return policies.

### Refund Enquiry
Provide refund status and address refund-related queries.

## Constraints
Always get confirmation from the user before performing any transaction.

Step 3: Add Tools

Tools are the functional extensions of an agent’s intelligence. They enable the agent to fetch data from external systems, execute custom logic, and trigger workflows. Agent Platform supports three tool types:
TypeBest forExecution
Workflow ToolsVisual, no-code workflows for standardized and repeatable processesSync and async
Code ToolsCustom logic in JavaScript or Python for complex or dynamic operationsSync
MCP ToolsRemote functions on Model Context Protocol servers for external integrationsSync

Adding a New Tool

  1. In agent configuration, go to Tools+ New Tool
  2. Select the tool type: Workflow Tool, Code Tool, or MCP Tool
  3. Enter a name and description, then click Create
  4. Open the tool to define its logic or connection details
Write the tool description carefully — the LLM uses it to decide when and how to invoke the tool. Workflow Tool: Design the flow using the visual builder. See Workflow Tools. Code Tool: Write JavaScript or Python logic directly. See Code Tools. MCP Tool: Connect to an MCP server and select available tools. See Configure an MCP Server.

Importing an Existing Tool

Import tools from the shared library to accelerate development and reuse existing logic.
SourceDescription
FileImport a previously exported tool (JSON format)
LibraryUse tools from the platform’s shared repository
MarketplaceAccess tools from the publicly shared catalog
Imported tools are scoped to the app. Customizing an imported tool does not affect the original source or other apps using it.

Testing a Tool

Verify a tool’s behavior before using it in production:
  1. Navigate to the Tools page of the application
  2. Select the tool to open its details view
  3. Use the Test interface to run the tool and review its output
See Test a Workflow Tool for a step-by-step guide.

Step 4: Add Knowledge

Link knowledge sources to enable RAG-based responses grounded in your enterprise content. The Platform uses the Search AI application to power search across connected knowledge bases.

Connecting a Knowledge Source

  1. In agent configuration, go to Knowledge+ Connect Knowledge
  2. Select an existing Search AI application or create a new one
You can link one or more Search AI applications from the same workspace. Each Search AI app can connect to multiple content sources.

Supported Sources

SourceBest for
DocumentsPolicies, guides, FAQs
Web crawlerWebsite content, help centers
ConfluenceInternal documentation
SharePointEnterprise content
Custom APIDynamic data sources
See Knowledge Integration for configuration details.

Step 5: Configure Delegation

Applies to: Apps using the Adaptive Network orchestration pattern only. Delegation rules define how this agent routes tasks to other agents within the application. If the app uses a different orchestration pattern, this section is not required and won’t appear in the UI.

Delegation Settings

Direct Responses — Controls whether this agent communicates with the user directly:
  • Enabled — The agent sends responses directly to the user
  • Disabled — The agent passes responses to another agent for further processing
Task Delegation — Defines routing rules for handing off tasks to other agents:
  1. Click Add Delegation
  2. From Delegate To, select the target agent
  3. Define the condition that triggers the handoff
Add all delegation rules this agent can use for routing.

Passing Context Between Agents

When control passes from one agent to another, the application saves context — including summaries and pending tasks — to sessionMeta memory under the delegationContext field. The receiving agent accesses this field to continue the task seamlessly. Agents can also use custom memory stores to share task-specific data during handoffs.

Event-Based Delegation

If a delegation rule is triggered by an event, subsequent handling follows that event’s configuration. For example, an agent handoff event configured to escalate to a human agent via AI for Service will trigger the handoff process accordingly.