> For the complete documentation index, see [llms.txt](https://docs.wem.io/platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wem.io/platform/wemmodeler/agentic-ai/wem-ai-agent.md).

# WEM AI Agent

## The AI Agent Resource Tab in your WEM Project

The AI Agent tab in the resource pane is where Agents are created and managed within the WEM Modeler. This interface provides an intuitive way to configure AI Agents, define their properties, and integrate them into your application workflows.

Below is an image illustrating the location of the AI Agent tab in the resource pane. This tab serves as the central hub for managing agents, allowing developers to orchestrate application agents efficiently.

<figure><img src="https://1449034948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_NpOsk0sjotPXNy29Q%2Fuploads%2Fx8Nfn1zg9HvialbKpIfN%2Fimage.png?alt=media&amp;token=cebcc1f5-cc81-4a09-ba3f-caebcfe4370a" alt=""><figcaption></figcaption></figure>

### Creating a New Agent

A new AI Agent can be added by right-clicking "AI agents" and selecting the **New AI Agent** option from the context menu. This will open the **"New AI Agent" Wizard**, where you can configure the following options:

* **Name**: This serves as the identifier for the AI Agent. Choose a meaningful name to easily recognise the Agent's role within your application.
* **Instruction**: This defines the **behaviour and purpose of the Agent**. It's essentially a description of what the Agent should do, guiding its decision-making process and responses within the application. This instruction is very important to setup correctly - like Prompt-Engineering for Generative AI is a newly emerging "art" to get better results and ensure security.
* **Model**: Opens the model selector overlay where a specific AI model can be assigned to the agent. The available models update automatically. Each model has different strengths around reasoning capability, response speed, context window size, and cost. Choose based on the agent's role and expected workload.\
  \
  The model can be changed on an existing agent after creation. Note that changing the provider or model of an agent that already has active conversations will clear any provider-specific conversation state.
* **Options**: Available options depend on the selected Provider, Model, and Model version. Each option's **Default** value reflects the provider's recommended setting for general-purpose use. This a good starting point and should be tweaked on its performance and results.

### AI Agent Model Picker

The model used is chosen in the **model selector overlay**, opened from the **Model** field in the AI Agent wizard and from the same field on an existing agent. When a model is selected its panel is expanded with more details about the model and its capabilities:

<table data-search="false"><thead><tr><th width="127">Information</th><th width="539">Description</th></tr></thead><tbody><tr><td>Name</td><td>The model identifier as the provider publishes it.</td></tr><tr><td>Provider</td><td>The provider supplying the model, shown with the provider logo.</td></tr><tr><td>Description</td><td>A short summary of what the model is suited for.</td></tr><tr><td>Input</td><td>Which input type the model accepts, for example text, image or PDF, and the size of its context window.</td></tr><tr><td>Output</td><td>The largest response the model can return. Not available for every model.</td></tr><tr><td>Tools</td><td>Which hosted tools the model can use: File search, Web search, Code interpreter.</td></tr><tr><td>Features</td><td>Model capabilities that affect how it behaves, such as whether it is a reasoning model.</td></tr><tr><td>Conversation modes</td><td>Whether the model supports text conversations, voice conversations, or both.</td></tr><tr><td>Released</td><td>When the provider released the model.</td></tr><tr><td>Knowledge cut-off</td><td>The point up to which the model's training data extends.</td></tr><tr><td>External docs</td><td>A link to the provider's own page for the model, where available.</td></tr></tbody></table>

{% hint style="danger" %}
A model is **only** usable once its provider has **valid** credentials configured in the **DevOps portal**. See [AI Agent configuration](/platform/wemmodeler/agentic-ai/agent-configuration.md) for more information
{% endhint %}

#### Filtering the list

By default the overlay shows the models that are current and usable, which keeps the list short and steers new agents toward models with a reasonable lifespan ahead of them.

**Deprecated models are hidden by default.** Enable **Include deprecated** to bring them back into the list, for example when you need to match the model an existing agent already uses.

#### Status indicators

Models are labelled in the overlay so their status is visible before you select one.

<table><thead><tr><th>Indicator</th><th width="128" align="center"></th><th>Meaning</th></tr></thead><tbody><tr><td><strong>Preview</strong> pill</td><td align="center"><img src="https://1449034948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_NpOsk0sjotPXNy29Q%2Fuploads%2FOUF5UwBDL1XMCgzJxfSn%2Fimage.png?alt=media&amp;token=7596f56a-09a1-4155-bb8d-3a9511aa134b" alt="" data-size="original"></td><td>The model is offered for evaluation only and may be discontinued on short notice. Do not build production agents on a preview model.</td></tr><tr><td>Deprecated warning (yellow)</td><td align="center"><img src="https://1449034948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_NpOsk0sjotPXNy29Q%2Fuploads%2FOGzyjS7dcuR2M28pnmX1%2FScreenshot%202026-08-14%20123325.png?alt=media&amp;token=56cc38fb-4a3b-4dfa-bfe3-c4b0a1af4f2c" alt="" data-size="original"></td><td>The model still works but is no longer recommended, and has a retirement date. Where the provider publishes one, a recommended replacement model is shown.</td></tr><tr><td>Retired error (red)</td><td align="center"><img src="https://1449034948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_NpOsk0sjotPXNy29Q%2Fuploads%2FXLM9NukmNlmXIq8iBLzA%2FScreenshot%202026-08-14%20124035.png?alt=media&amp;token=7dd96e14-0dce-4767-9bbf-4f457869d0fe" alt="" data-size="original"></td><td>The model is no longer available. An agent using it will not work and must be moved to another model.</td></tr></tbody></table>

The same deprecated and retired states are also surfaced outside the overlay: as an icon on the agent in the project tree, and as a message in the publisher overlay. Neither blocks publishing.

#### Model version

Once a model is selected, the model picker overlay is closed, and the new agent overlay is extended with the chosen models controls. Depending on the model it will also now have a model version control, allowing you to choose between the latest version, or a specific model version.&#x20;

{% hint style="warning" %}
Pinning protects you from behaviour changes, not from retirement. A pinned version still reaches its retirement date, and the agent stops working when it does. Check the lifecycle status of pinned agents periodically.
{% endhint %}

<table><thead><tr><th width="193">Value</th><th width="491">Behaviour</th></tr></thead><tbody><tr><td><strong>Latest</strong></td><td>The agent always uses the most recent release of the model. Useful during development, or when you want model improvements to arrive automatically.</td></tr><tr><td>A specific version</td><td>The agent is pinned to that exact release. Recommended for production agents, where consistent and predictable behaviour matters more than having the newest capabilities.</td></tr></tbody></table>

### Options

After a model has been selected, the **Options** panel in the New AI agent overlay becomes available. Options control how the model behaves when it responds: how much it reasons, how long its answers may be,  and which hosted tools it may call.

**Which options appear depends entirely on the provider, the model and the model version.** There is no fixed set. Selecting a different model replaces the panel with that model's own options, and any value you set for an option the new model does not support is discarded.&#x20;

As the available depends on every model we have categorised the type of options you can encounter:

| Kind               | What it does                                                                                              | Examples                                              |
| ------------------ | --------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
| Hosted tools       | Toggles a capability the provider hosts, so the agent can use it without you modelling a function for it. | File search, Web search, Code interpreter             |
| Output limits      | Caps the size of a response. The cap covers reasoning tokens as well as visible output.                   | Max output tokens                                     |
| Reasoning controls | Determines how much thinking the model does before answering, and whether that thinking is reported back. | Thinking, Reasoning effort, Effort, Reasoning summary |
| Response shaping   | Influences the style or variability of the answer rather than its content.                                | Verbosity, Temperature                                |

Most options offer a **Default** value, which applies the provider's own recommended setting. Leave options on Default until you have a reason to change them, then tune based on the agent's actual output rather than in advance.

{% hint style="info" %}
Reasoning and thinking options have a direct cost consequence. Reasoning tokens are billed like any other tokens and count towards the output limit, so a high reasoning effort produces slower and more expensive responses. Lowering it is the first thing to try when an agent is accurate but too slow or too costly.&#x20;
{% endhint %}

{% hint style="warning" %}
Hosted tools are executed by the provider, not by your project. Web search in particular sends conversation content to the provider's search infrastructure and returns content from the public web into the conversation. Only enable a hosted tool when the agent's task genuinely needs it.
{% endhint %}

For what an individual option does, refer to the provider's documentation ([OpenAI](https://platform.openai.com/docs/), [Anthropic](https://docs.anthropic.com/), [Google Gemini](https://ai.google.dev/gemini-api/docs), [Azure OpenAI](https://learn.microsoft.com/azure/ai-services/openai/), [Cerebras](https://inference-docs.cerebras.ai/)). Each option in the Modeler also carries a short description underneath it explaining its effect.

### Properties of an Agent

After creating an AI Agent, its properties can be configured to define its behaviour and enhance its capabilities through **functions**. These properties determine how the Agent interacts with the application, which information it can process and what functionalities it can execute.

<div><figure><img src="https://1449034948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_NpOsk0sjotPXNy29Q%2Fuploads%2F8BuenyPDDpJQj8fSYUNz%2FScreenshot%202026-04-28%20154052.png?alt=media&amp;token=73919464-6f4c-4dd6-8fdb-d0dbac701f9d" alt=""><figcaption></figcaption></figure> <figure><img src="https://1449034948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_NpOsk0sjotPXNy29Q%2Fuploads%2FEtGvXyIINVpUsG8jmq3u%2FScreenshot%202026-04-28%20160522.png?alt=media&amp;token=4a760834-88ae-433c-9842-20e923d26df8" alt=""><figcaption></figcaption></figure></div>

#### **Conversation Context**

The conversation context acts as a "session field" where relevant information is stored throughout an interaction. This data is **not** directly processed by the AI, but is part of the WEM Agent's context, allowing the application runtime to utilize it for continuity between exchanges. This enables the Agent to maintain context within a session without increasing token usage.

#### **File Sources**

Agents can be assigned files, which are stored in a vectorised format for efficient retrieval. These files function as an **additional knowledge base**, providing structured information that the Agent can reference. While the AI does not treat the entire file content as tokens, any quoted sections may count towards response tokens. This allows for efficient, context-aware responses without excessive computational costs. Files uploaded as part of the File sources are accessible for all instances of this agent, be mindful of what you include as part of the Files sources. This can best be used to supply the agent with documentation or company policies but should not be used to upload files containing personal or proprietary data.

{% hint style="info" %}
File fields from the datamodel can only be used when the file type validation is set on the field itself. This is to make sure documents can be interpreted correctly and safely.&#x20;
{% endhint %}

#### **Functions**

Functions extend an Agent's capabilities by enabling it to **execute predefined actions**. These functions operate similarly to flowcharts in the Modeler but are specifically designed for the Agent to follow. By defining structured flows, the Agent can perform tasks beyond text generation, such as triggering processes, interacting with data sources, or modifying system states based a users input. Because the agent knows which functions it has available to them it best practise to instruct the agent to not share this with users in the agent instructions.&#x20;

#### Function parameters

Function parameters define specific fields or lists used by a function to execute correctly. Parameters can be simple values such as strings or numbers, or more complex objects containing multiple fields or even lists. When a user makes a request, the Agent identifies the relevant function and populates its parameters with data extracted from the conversation, file sources, or other context. This ensures that the function operates with precise and relevant information, enabling accurate automation and reducing ambiguity. Parameters may have defined types, required/optional status, and default values, ensuring consistent behaviour across different Agent interactions. Using the required property on certain fields can help to force the agent query the user on all relevant information.&#x20;

#### AI Agent Conversation field type

A dedicated **AI agent conversation** field type is now available in the Data Model. This replaces the previous practice of using a plain text field to store a conversation ID.

When adding a new field, select **AI agent conversation** as the type and link it to the specific AI agent the conversation belongs to. This makes it immediately clear in the data model that a field represents a conversation, rather than an arbitrary text value. More information on this can be found [here](/platform/wemreference/data-types/convo-id.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.wem.io/platform/wemmodeler/agentic-ai/wem-ai-agent.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
