# How to Build Enterprise-Aware Agents

Chau Tran, Glean | AI Engineer World's Fair 2025 | 19:53

Source: https://www.youtube.com/watch?v=hxFpUcvWPcU
Channel: AI Engineer (https://www.youtube.com/@aiDotEngineer). Summarised by AIE Talks.
Page: https://aietalks.com/talks/how-to-build-enterprise-aware-agents
Published: 2025-07-24
Tags: agents, enterprise, rag, workflows

## TL;DR
- Workflows provide predictable execution for repetitive tasks, while agents can handle open-ended tasks by choosing their own steps and tools.
- A task completed by an agent can be saved as a workflow, creating data that can evaluate and train future agents while helping teams discover useful workflows.
- Dynamic prompting through workflow search gives agents predictable behavior for familiar tasks and room to reason about new or personalized tasks.

## Summary
Chau Tran compares workflows and agents as two ways to build AI systems. Workflows use predefined code or graphs, which makes them cheaper, easier to debug, and more predictable. Agents decide their own steps, which makes them better suited to open-ended work but more expensive and less consistent. Tran argues that teams can combine the approaches: agents can generate, evaluate, discover, and execute workflows, while workflow libraries can teach agents how a company actually operates. He then compares fine-tuning with dynamic prompting through search. Fine-tuning can generalize from large amounts of data, but it is costly to update and less suitable for changing or personalized processes. Workflow search retrieves relevant examples at runtime, allowing the model to follow established practices when there is a good match and reason freely when there is not. Enterprise search also needs authoritativeness signals, such as a workflow's success rate and its creator's relationship to the user.

## Key ideas
### Workflows trade flexibility for predictable execution
[00:36](https://www.youtube.com/watch?v=hxFpUcvWPcU&t=36s)
Tran defines workflows as systems where language models and tools are orchestrated through predefined code paths. They can use imperative code, where a programmer controls each call and response, or declarative graphs, where nodes and edges describe the structure and a framework handles execution. Their main benefit is predictability: a workflow should behave mostly the same way tomorrow as it did today. Workflows fit repetitive tasks and established business practices. They also tend to have lower cost and latency, and their explicit steps make failures easier to locate and fix.

### Agents trade control for open-ended problem solving
[02:05](https://www.youtube.com/watch?v=hxFpUcvWPcU&t=125s)
An agent receives a goal, plans an action, executes it, reads the result from the environment, and repeats until it can respond. This makes agents useful for researching unsolved problems and lets them take advantage of improving model capabilities. The cost is higher latency and expense because the model must decide what to do. Tran compares workflows to Toyota cars and agents to Teslas: an agent can show impressive ability, but it can still take the wrong exit. The choice between them depends on how capable current models are, since a task that fails in an agent loop may work after a later model update.

### An agent's trace can become a reusable workflow
[05:16](https://www.youtube.com/watch?v=hxFpUcvWPcU&t=316s)
Tran reframes the workflow-versus-agent choice. When an agent solves a task, the sequence of steps in its trace is a workflow. Companies can collect successful, or "golden," workflows that show how particular tasks should be done. Those examples can evaluate an agent by checking whether it took the right steps, rather than judging only its final answer. They can also train the agent to reproduce known procedures while still composing several workflows or extending them for unfamiliar tasks.

### Agents and workflows can improve each other
[08:07](https://www.youtube.com/watch?v=hxFpUcvWPcU&t=487s)
Tran describes several feedback paths between the two approaches. An agent can turn a natural-language description into a proposed workflow that a user edits. More powerfully, users can try new tasks with an agent and save successful traces as company-specific workflows. Over time, those discoveries become training data. This gives a system a way to capture how work is actually done instead of requiring engineers to encode every process in advance.

### Enterprise knowledge requires more than general intelligence
[09:28](https://www.youtube.com/watch?v=hxFpUcvWPcU&t=568s)
Even a highly intelligent system may arrive like a brilliant new employee who does not know the company's business practices, contacts, or subtle procedures. Tran calls an enterprise-aware system fully onboarded. He separates an acceptable answer from a great one. For competitor analysis, a basic web search may produce an answer, but a strong result follows the company's process and covers the metrics executives care about. The missing ingredient is company-specific workflow knowledge.

### Fine-tuning learns broadly but is expensive to keep current
[11:06](https://www.youtube.com/watch?v=hxFpUcvWPcU&t=666s)
Tran discusses supervised fine-tuning, which teaches a model to mimic expected outputs, and reinforcement learning from human feedback, which uses ratings or rewards. With enough task and workflow data, these methods can generalize across tasks and combine workflows. They also create a fork from the frontier model, so a newer base model may require another training run. New tools, changed business priorities, and revised processes likewise require retraining. Fine-tuning is also a poor fit when different teams or employees need different versions of an optimal workflow.

### Workflow search adjusts the balance between determinism and creativity
[13:21](https://www.youtube.com/watch?v=hxFpUcvWPcU&t=801s)
Dynamic prompting through search uses the same task-to-workflow data without baking it into model weights. At runtime, the system finds tasks similar to the new request and passes their workflows to the model as examples. With no strong match, the model can create a new workflow. With a high-confidence match, it can follow a procedure that has already worked. Tran illustrates this with competitor analysis, where retrieved examples can guide the model to read customer calls and internal messages, extract competitors, and analyze each one.

### Enterprise workflow search needs authoritativeness signals
[16:36](https://www.youtube.com/watch?v=hxFpUcvWPcU&t=996s)
Text similarity alone cannot reliably choose among hundreds or thousands of similar workflows and documents. Tran recommends the usual search components, including lexical search, vector embeddings, reranking, and late interaction, but says enterprise systems also need a knowledge graph. A workflow may be more trustworthy when its author works closely with the user, when it has a high success rate, or when people discuss it in Slack. These recommendation-style signals are difficult to encode directly in a language model, so a separate search system should rank the workflows.

## Notable quotes
- "When you run a workflow today it will mostly behave the same way if you run it tomorrow." (02:05)
- "An agent takes a task and then generates a workflow to achieve that task." (06:04)
- "The problem becomes how do you choose the right one, which is what I call authoritativeness here." (17:10)
- "Fine-tuning is good for generalized behaviors. Dynamic prompting with search is good for personalized behaviors." (18:10)

## Tools & references mentioned
- Glean
- Slack
- Toyota
- Tesla
- AGI
- RLVR
- reinforcement learning from human feedback

## Who should watch
- You are deciding whether a business process should be implemented as a fixed workflow, an agent loop, or a combination of both.
- Your agent produces acceptable answers but misses company procedures, internal sources, or the metrics that matter to a particular team.
- You have a growing collection of successful task traces and need a way to retrieve and reuse them without retraining whenever a process changes.

## Related talks

- [3 ingredients for building reliable enterprise agents](https://aietalks.com/talks/3-ingredients-for-building-reliable-enterprise-agents) (Harrison Chase, LangChain/LangGraph, 20:55)
- [The Missing Pieces of Workflow Automation](https://aietalks.com/talks/the-missing-pieces-of-workflow-automation) (Shirsha Chaudhuri, Thomson Reuters Labs, 14:37)
- [How to Build Planning Agents without Losing Control](https://aietalks.com/talks/how-to-build-planning-agents-without-losing-control) (Yogendra Miraje, FactSet, 15:58)
- [How agents will unlock the $500B promise of AI](https://aietalks.com/talks/how-agents-will-unlock-the-500b-promise-of-ai) (Donald Hruska, Retool, 16:22)
- [Building AI Agents that Actually Automate Knowledge Work](https://aietalks.com/talks/building-ai-agents-that-actually-automate-knowledge-work) (Jerry Liu, LlamaIndex, 17:57)
