Route questions and choose models¤
AI Disclaimer
Companion is an AI-based feature. AI-generated content may be inaccurate or incomplete. Verify important information.
Introduction¤
The tutorial Build a Companion catalog gives the purchasing team of a fictional hardware company its own agents.
The shipped routing agent default-router decides which agent answers, and the agents run on the shipped named models fast and default.
This tutorial takes control of both, using the module Companion Management:
- The named model
procurementruns the agents of the purchasing team. A later change of the model applies to all of them, without changing the agents. - The routing agent
procurement-routertakes the conversations in the application view Product Demo of the purchasing team. It hands a question either toprocurement-advisoror todomain-expert, and to no other agent.
The tutorial ends with a check of which routing agent took a conversation.
Each step starts with a short screen recording of the step.
Prerequisites¤
- The tutorial Build a Companion catalog is completed.
The catalog
Procurement Companionholds the agentsprocurement-advisorandsupplier-lookup. - The package Product Data Demo (
ecc-product-data-project) provides the application view Product Demo with the identifierproduct-demo.
1 Create the named model¤
A named model points at a model of a provider and sets the parameters it runs with. Agents reference the named model, not the model of the provider.
- Open Companion management under ADMIN in the main navigation.
- Select the Catalog tab, then the Models tab.
- Select
Procurement Companionin the catalog selector above the list, next to Named models. The selector starts with CMEM Base Companion Catalog (base). - Click Add a new named model in the header.
- Enter
procurementin the Identifier field and click Create. - Select Use the configured default model, which is marked
recommended. The named model then uses the provider and the model of the application configuration. Providers that the deployment has no access to are markednot configured. - Enter
lowin the Reasoning effort field. Leave the other fields empty, so that the defaults of the configured model apply. - Click Save changes in the header.
The list shows the named model as procurement with configured default · reasoning low.
Test the named model:
- Click Test model.
- Click Send to send the prompt
Say hi.
The dialog shows the Reply of the model and the Latency.
2 Switch the agents to the named model¤
- Select the Agents tab, with
Procurement Companionstill selected in the catalog selector. - Select the agent Procurement Advisor.
- Select
procurementin the Model field under Prompt. - Select the agent Supplier Lookup, and select
procurementin the Model field as well. - Click Save changes in the header.
Both agents now run on the named model procurement.
To give the purchasing team a different model or a different reasoning effort, change only this named model.
3 Create the routing agent¤
A routing agent reads the first message of a conversation and hands it to an interactive agent.
The shipped routing agent default-router is available on every application view, may pick any interactive agent and has the priority 0.
A routing agent with a higher priority takes the conversations of the application views it is available on.
- Click Add a new agent in the header, with
Procurement Companionstill selected in the catalog selector. - Select Routing agents under Kind of agent.
- Enter
procurement-routerin the Identifier field and click Create. -
Enter the following values under General and Prompt:
- Label:
Procurement Router, filled from the identifier - Description:
Routes the questions asked in the product data view to the purchasing team or to the domain expert. - Model:
fast -
System message:
A routing agent only decides who answers, so the fast model is enough.
- Label:
-
Expand Agent resources, and select
product-demoin the Application views field. - Expand Agentic Collaboration, and select
procurement-advisoranddomain-expertin the Handoff agents field. The routing agent can hand a conversation only to these agents. - Enter
10in the Priority field. The higher priority wins overdefault-routerin the application view Product Demo. - Click Save changes in the header.
4 Check the agent network¤
- Select the Agent network tab.
- Click the application view
product-demounder Application views.
The view highlights both routing agents, Procurement Router and User Message Router, because both are available on the application view product-demo.
The agent network does not show which of them takes a conversation: the priority decides.
The nodes Procurement Advisor and Supplier Lookup show the named model procurement.
5 Ask the Companion in the application view¤
The Companion receives the application view in which the chat is open.
procurement-router is available only on the application view Product Demo: in any other application view, default-router takes the question.
Explore keeps the application view that was selected last.
- Click the user menu in the application header.
- Select
Product Demo (en)in the Application view selector at the top of the user menu. The selector shows the application view that is open, and Default Application View before the switch. - Click Chat with the companion in the application header.
- Click New chat.
-
Enter the following question and press Enter:
The answer names
procurement-advisorabove the answer. -
Click New chat.
-
Enter the following question and press Enter:
The answer names
domain-expert. In the application view Default Application View,default-routertakes the same question and may hand it to another agent, such asknowledge-graph-expert.
6 Check which routing agent took the conversation¤
- Open Companion management under ADMIN in the main navigation.
- Select the History tab.
- Click Open at the right of the newest conversation.
The list starts with the newest conversation.
The line below its title names the user and the agent that answered, for example
admin · domain-expert.
The first agent message names the routing agent, procurement-router, and the handoff tool it called, for example companion-core--handoff-domain-expert.


