Cortex · Enterprise queries

One question. Every system. One table

An Enterprise tool asks the same question of every system it covers and returns a single combined table, with each row labelled by where it came from. The results are merged by code, not by the AI, so one question costs one tool call.

No integration to build between the systems, and no enterprise blind spot. Ask where an order is right now, and see what the order system, the warehouse and transport each say about it, side by side.

01

One order lives in four systems. No screen shows all of it

An order is born in the ERP, picked in one warehouse, topped up from another and handed to a carrier. Each system knows its own part of the story, and only that part.

So a simple question, where is this order right now, has no simple place to be asked. Someone logs into the ERP, then the warehouse system, then the other warehouse, then transport, and pieces the answer together by hand. By the time it is written down, part of it is out of date.

There are three usual ways out, and each has a cost. You can build integrations between the systems, which takes months and has to be redone when one of them changes. You can copy everything into a data warehouse, which gives you yesterday's answer. Or you can put an AI agent on each system and have them work it out together, which works, but spends a great deal of AI on what is really a look-up.

Enterprise queries were made for the case those three miss. You already know what you want from each system. You just want it from all of them, in one go, in one table.

The same question, two ways
Where is order SO-48290 right now?
Three logins and a phone callReleased in the ERP. Not sure about the warehouse.nobody sees the whole picture
One Enterprise query4 rows, one per system
Figure 1. The same question, answered by hand and by one Enterprise query.

02

Decide once what to ask. Then ask it everywhere

The idea rests on a small piece of preparation. For each system, your team writes a tool that answers the question in that system's own terms: a query for the ERP, a command for the warehouse, an API call for transport. The only rule is that every version returns the same columns.

On top of those sits the Enterprise tool. It has no query of its own. It is a short definition that says which systems to ask, how to combine what comes back, and what the columns of the result are.

When someone asks where an order is, the model sees one tool and picks it. Smart Forge sends the question to every system the tool covers, in a single request, and combines the answers with a query. Each row of the result says which system and which instance it came from, so nothing is lost in the merge.

Step through it below.

How it works

03

Why it uses so few tokens

Every time a model reads, plans or writes, it uses tokens, and tokens are what AI costs. The way to spend fewer is not a cheaper model. It is to ask the model to do less.

Compare two ways of answering the order question. With a team of agents, a lead agent reads the question and plans. An agent for each system then reads its brief, chooses its tools, reads the results and writes a hand-off. The lead agent reads the hand-offs and writes the answer. The model is working at every one of those steps, for every system, each time the question is asked.

With an Enterprise query the model makes one decision: which tool, and which order number. Everything after that is code. The systems are asked by code, the answers are merged by code, and the table is drawn by code.

Where the model does the work

A team of agents
Lead agent plansAn agent per system reads and decidesEach writes a hand-offLead agent writes the answer
An Enterprise query
Picks one toolEvery system is askedAnswers are mergedOne table
  • Done by the model, uses tokens
  • Done by code, uses none
Figure 2. The same question, two routes. The model works at every step of the first and at one step of the second.
When you already know what to ask, the model only needs to decide once.

The saving grows with the number of systems. A fifth system adds a row to the table. It does not add another agent that has to think.

In Operational Mode the saving is complete. The combined table goes to your screen and not to the model, so the rows themselves cost no tokens at all. Read about Operational Mode.

The usual way, and the Smart Forge way

The usual wayWith Smart Forge
One agent per system, each reasoning in turnOne tool call that covers every system
The model stitches the results togetherA query merges the results, in code
Tokens spent on every agent and every hand-offTokens spent only on choosing the tool

04

Where it fits

An Enterprise query suits any question where you know what you want from each system before you ask. These are examples of the kind of question it is built for.

Where is this order?

The ERP, each warehouse and transport report what they know about one order, in four rows.

Where is order SO-48290 right now?
Stock, everywhere

Every warehouse reports what it holds of one item, so you see the whole position before you promise a date.

How many units of A-204 do we have, across all sites?
One person, every system

When someone leaves, each system reports whether it still has an account for them.

Which systems still have an account for this leaver?
Open work, in every tracker

Each ticketing tool reports its open items, in one list you can sort your own way.

What is still open for the warehouse team?

The same tool serves more than chat. A deployed agent can call it, and a ForgeView screen can be built on it, so the combined table becomes something people open every morning and not something they have to ask for.

And if you want to work on the result, total it, group it or find what stands out, Reasoning Mode treats the combined table like any other result and can query it with ForgeQL. One request gathers the data from every system. The thinking then happens on a single table. Read about Reasoning Mode.

05

Enterprise query, or a team of agents?

The two are easy to confuse, because both span several systems. They answer different kinds of question, and you can use both.

Use an Enterprise query when the same question applies to every system and you know what you want back. Use multi-agent orchestration when each system needs its own investigation, or when what you ask the second system depends on what the first one said.

Compared onEnterprise queryOne call, every systemMulti-agent orchestrationOne agent per system
The questionThe same for every systemDifferent for each system
What the model doesPicks one toolPlans, investigates and writes up
What comes backOne table, each row labelled by its sourceA written answer with its evidence
AI costTokens only for choosing the toolTokens for every agent and every hand-off
Best forStatus, positions and lists across systemsWorking out why something happened

06

What to know before you rely on it

Four things are worth knowing, so the table is never read for more than it says.

  1. Each system needs its own version of the toolYour team writes it once for each system. A system without one is not asked.
  2. It puts rows side by sideThe result stacks what each system returned and labels the source. It does not decide which rows belong together. That reading is yours, or Reasoning Mode's.
  3. It answers when the slowest system hasThe request waits for every system it covers, so the answer arrives with the slowest reply.
  4. A system you are not connected to is left outThe source column shows which systems answered, so check it before you conclude that a system had nothing to say.