Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Creating Your First Custom Agent

Build a product description enrichment agent with Product domain MCP tools, an API trigger, and optional RAG, communication, or custom MCP.

Use this trail when you need an agent tailored to a specific process that a library template does not cover. You prepare the Agentic AI configuration the agent depends on, create a custom agent, activate it, trigger it, and confirm the run in AI Logs.

Worked example for this trail: The product description enrichment agent is triggered through an API. You pass a product ID, the agent calls get-product, improves the English description in description.en, returns the proposed text, and writes it back with partial-update-product. Optional add-ons (Product RAG, Slack or Microsoft Teams, custom MCP) extend that same scenario.

Outcome: An active custom agent with an API trigger, get-product and partial-update-product tools attached, an updated description.en for the product ID you sent, and a matching entry in AI Logs.

Each step links out to a detailed guide for that action. Meet the checkpoint before you continue.

For a first run, prepare AI tokens (or use Emporix OpenAI for a short test), create the agent with an API trigger, attach get-product and partial-update-product on the agent Tools tab, activate it, then call it and check AI Logs. Skip the OAuth step and the optional add-on step until that path works. Built-in Product domain tools do not need a separate AI Tools entry. Use AI Tools / AI MCPs only for optional add-ons.

Prerequisites

Complete the Access preparations, then make sure you have the following:

  • Access to Management Dashboard → Agentic AI → AI Agents

  • At least one product in the tenant that you can read and update, so the agent can write description.en back

  • A model that supports tool (function) calling – your own provider credentials stored as an AI token, or Emporix OpenAI for a first test

  • An Emporix API key (Client ID and Secret) that can request a service access token with ai.agentexecution_manage, product.product_read_unpublished, and product.product_manage

  • Familiarity with best practices for Custom agent creation and predefined agent use

The agent chat endpoint requires ai.agentexecution_manage. The Product tools run with the caller's access, so the same token also needs the two product scopes. For a first test, leave Required scopes empty on the agent. If you later restrict the agent to Employee or Integration callers, the token must also meet that restriction.

For details about Required scopes and caller restrictions, see Define activation rules.

Steps

1

Prepare AI tokens

Create the secrets the agent needs in AI Tokens. Prefer adding your own LLM API token (enterprise license or custom model) so the agent is ready beyond a throwaway test. Add any credentials referenced by an OAuth gateway or a custom MCP if those integrations are in scope for this agent.

Checkpoint: The LLM token for this agent (and any other secrets it needs) appears in Agentic AI → AI Tokens and is available to select on the agent. If you are only doing a short Emporix OpenAI test, you can continue without an LLM token and add one before production use.

2

Optional: Configure an OAuth-based gateway

If your enterprise model or a protected MCP endpoint requires OAuth, configure AI OAuth-Based Gateway. Skip this when your LLM token and any custom MCP use API keys or other non-OAuth authentication already stored in AI Tokens.

Checkpoint: Any OAuth configuration you need is available to select when you configure the agent model or a protected endpoint.

3

Optional: Prepare add-on tools

For the minimum path, skip this step and use Product domain tools only. Add-on tools must be configured before you can attach them to the agent. Add one only when it serves this same English-description scenario:

  • Product RAG – when the new description.en needs to borrow tone or facts from similar catalog items. Configure Emporix Product RAG in RAG AI Tool.

  • Slack or Microsoft Teams – when the agent posts the proposed description.en for notification or human review before write-back. Configure in Communication Tools Configuration.

  • Custom MCP – when the description needs attributes the catalog does not hold, for example ERP technical specs. Configure in AI MCPs.

Checkpoint: Either you continue with Product domain tools only, or every add-on tool or MCP you chose is configured and ready to attach.

4

Create the product description enrichment agent

In the Management Dashboard, go to Agentic AI → AI Agents and choose Add new agent.

On the General tab, set an ID and name (for example product-description-enrichment). Paste a user prompt for this goal. You can start from this example:

To refine the prompt for your case, model, and tools, apply the prompt engineering recommendations.

On the Model tab, select the model and your LLM token, or Emporix OpenAI for a short test only. Choose a model that supports tool (function) calling. A model with reasoning capabilities is recommended, because it handles multi-step tool calls more reliably.

On the Trigger & Constraints tab, set API as the trigger type. For a first test, leave Required scopes empty. If you restrict the agent to Employee or Integration callers, the service access token must also meet that restriction.

For details about Required scopes and caller restrictions, see Define activation rules.

For field-by-field configuration and screenshots, see Creating a custom agent.

API trigger with empty Required Scopes
Trigger settings for the product description enrichment agent

Checkpoint: The General, Model, and Trigger & Constraints tabs are filled in. Keep the agent open for the next step.

5

Attach Product domain tools

On the agent Tools tab, attach both built-in Emporix Product domain MCP tools:

  • get-product – loads the product by ID

  • partial-update-product – writes the improved description.en back to the product. This tool changes tenant data.

Also attach any add-on RAG, communication, or custom MCP tools you prepared in the optional step. Built-in domain tools do not need a separate entry under AI Tools.

You do not need an MCP token for built-in tools. When the agent runs, the platform forwards the caller's access context, including scopes, to the Product tools. The token you call the agent with therefore needs product.product_read_unpublished for get-product and product.product_manage for partial-update-product. For all Product operations and their scopes, see Emporix MCP Server.

Selected Product domain tools
Product domain tools attached to the agent

Checkpoint: get-product and partial-update-product are attached on the Tools tab.

6

Save and activate the agent

Save the agent and copy its ID. On My agents, toggle the agent active.

Checkpoint: The agent is listed under My agents, is active, uses an API trigger, and you have copied its ID for the test call.

7

Trigger the agent and verify in AI Logs

Request a service access token with your Emporix API key. Include ai.agentexecution_manage and the product scopes in the token scope. Empty Required scopes on the agent does not remove the ai.agentexecution_manage requirement.

Copy the access_token value from the response. For more about the token request, see OAuth Service.

Then call Starting agent chat with that token, your tenant, and the agent ID you copied. Pass a product ID that has an English description, for example delightCoffee:

Replace {tenant}, {{OAUTH2_ACCESS_TOKEN}}, and {agentId} with your values. For other chat modes, such as streaming or async, see How to communicate with an agent.

In the Management Dashboard, go to Agentic AI → AI Logs, or open the agent-specific logs from AI Agents. Open the Requests tab, find the request for your agent ID, then open Log Details. Check that the agent invoked get-product and partial-update-product, and that description.en was updated for that product.

For log views and filters, see AI Logs.

Log details for the enrichment request
Log details for the product description enrichment request

Checkpoint: A request appears for your agent ID. Log Details shows the message, get-product and partial-update-product tool calls, and a response with the improved English description.

What to do next

This custom-agent trail is complete on its own. You can continue with any of the following guides:

For a ready-made agent instead of a custom one, see Enabling Your First Library Agent. For partner IDE tooling, see Agentic Engineering.

Troubleshooting

Problem
What to do

Cannot select a model token

Create the provider secret in AI Tokens, then reopen the agent Model tab.

Agent cannot call get-product or update the product

Confirm Product domain tools are attached on the agent and that the token you call the agent with includes product.product_read_unpublished and product.product_manage. See Emporix MCP Server.

Agent cannot call an optional tool

Confirm the tool is configured under AI Tools or AI MCPs, is attached on the agent, and that the credentials the tool uses include the scopes it requires. Check allowed operations for communication tools.

Trigger never fires

Confirm the agent is active and that Trigger Types match how you invoke it. For Slack or Teams, attach the matching communication tool.

API trigger returns authorization errors

Confirm the service access token includes ai.agentexecution_manage. If the agent has Required scopes, confirm the token also meets that restriction. See Define activation rules.

Request ends with an error as soon as the agent calls a tool

Check that the model on the Model tab supports tool (function) calling. If it does, try a model with reasoning capabilities. Save and retry.

Logs show errors or empty responses

Open Log Details for the request, adjust the user prompt or tools, save a new version if needed, and retry. Use AI Logs and AI Best Practices.

Last updated

Was this helpful?