Summarize with AI:
With more autonomy than a predefined AI workflow, an agentic application uses AI to make decisions, plan and execute tasks, use tools and adapt its actions to achieve a goal with limited human input.
An agentic application gives an AI model responsibility for choosing some of the steps needed to complete a task. As a task progresses, the model uses the results of earlier actions to decide how to proceed within limits set by the application.
In How AI-Powered Applications Work, we explored the architecture behind model calls and tool use. In this article, we’ll look at what makes a workflow agentic and where that flexibility is useful.
The terms agent and agentic don’t have one universally applied definition. A useful distinction is how the work is controlled: predefined workflows follow paths set by application code, while agents give the model room to choose and revise steps as new information arrives.
Consider a project management application that lets customers export their project data as a downloadable file. When an export job fails, the application’s support feature investigates the failure and prepares a recommended next step for a support engineer to review.
We could build this feature in several ways:
| Approach | How the Work Proceeds | Role of the Model |
|---|---|---|
| Direct model call | The application supplies a failed job’s details and asks for a summary | Explains the supplied information |
| Predefined AI workflow | The application retrieves job details, follows configured diagnostic branches and generates a response | Performs assigned tasks within the workflow |
| Agentic workflow | The model chooses which evidence to gather and revises the investigation after each result | Directs the investigation within application limits |
A predefined workflow can still have conditional branches and recover from errors. An agentic workflow becomes useful when deciding what to investigate requires interpreting information that doesn’t fit neatly into those branches.
Both approaches can work within a single product. The application’s support feature might use a predefined workflow for common export failures and delegate unfamiliar cases to an agent. A chat interface could expose either approach, so the interface alone tells us little about how the work is controlled.
Building the agentic version of this feature starts with defining what it should accomplish and how much control it should have. From there, we can look at how it plans the investigation and uses tools and memory to carry it out. These decisions will help us assess whether an agent is a useful fit for the task.
Goal-oriented behavior means choosing actions that help complete a defined task. For our support feature, success means preparing a recommendation backed by evidence and identifying anything the investigation couldn’t resolve.
The application might report that the export timed out without explaining what the customer should do next. The agent can continue investigating until it has enough evidence to support a response or needs help from a support engineer.
Autonomy describes the decisions the system can make without asking a person at every step. We might allow the agent in our support feature to inspect the customer’s export history and search relevant documentation independently. Restarting an export or changing account settings would require separate authority.
We can let the agent choose its investigative steps while leaving the final customer response to a person. Our code must enforce the requesting user’s access rights and check any required approval before running an operation. We explored these boundaries in Understanding Human-Agent Collaboration Patterns.
With the goal and permissions defined, the agent uses planning and reasoning to choose its next steps and adapt as new evidence arrives.
Planning organizes the work needed to reach the goal. The agent behind this support feature might begin by inspecting the failed export, then gathering evidence about its failure before preparing a recommendation. That plan can change when a tool returns information the agent didn’t have at the start.
Suppose the export details show a timeout while contacting a storage service. The agent may decide to check service incidents before searching the product’s configuration documentation. If there is no relevant incident, it may search the documentation using details from the error.
Reasoning is how the model uses available information to evaluate possible explanations and select a next step. It helps the model decide whether to follow the plan or revise it as new evidence arrives.
The agent doesn’t need to work out every step before it starts. It can use each result to refine its plan and decide what to investigate next.
As the agent follows these leads, it needs to check whether the evidence supports its conclusions. A service incident that happened around the same time as the export failure may be relevant, but timing alone doesn’t establish that it caused the failure.
Tools are operations our application exposes to the model. For this support feature, these might include get_export_job and search_product_docs, alongside a tool for checking service incidents. The model requests an operation with arguments, and our code validates the request before executing it.
The result goes back to the model, which can request another operation or prepare a response. This repeated cycle of choosing an action and checking its result is an agent loop.
For the failed export, the agent could follow the loop shown above:
Inspect the failed job. The agent requests its details and receives a timeout error that identifies the storage service involved.
Check a possible explanation. It looks for service incidents and finds one that may be relevant. It then checks whether the incident affects the storage service used by the export.
Find a supported next step. It searches the recovery guidance for that failure. If the guidance says to wait for service recovery, it includes that condition in the recommendation.
Prepare the response. It explains what the evidence supports and identifies any remaining uncertainty for the support engineer reviewing the draft.
If the incident affects an unrelated service, the agent should continue investigating rather than present it as the cause. If the necessary evidence is unavailable, it can hand the case to a support engineer with a record of what it found.
Read-only tools can support this entire process. Agentic behavior doesn’t require permission to modify business records, and access to a write tool doesn’t establish agentic behavior on its own.
Even with read-only tools, the agent needs limits on how long it can keep working. We can cap the number of tool calls and set a time or cost budget for each run. If repeated lookups produce no useful evidence, the application should stop the loop and show that the task needs attention.
The agent loop depends on carrying useful information from one step to the next. Short-term memory holds the current task’s state so later model calls can build on work already completed.
In the export workflow described above, this state would include the export’s identifier and the evidence gathered so far. If an incident is ruled out because it affected an unrelated service, that finding should be retained too. Without it, a later model call could repeat the lookup or mistakenly cite the incident as the cause.
Application code saves the results we want to retain and supplies relevant details in later model requests. This gives the model access to earlier findings without retraining it. A documentation search can supply context too, but finding reference material is different from retaining the history of a task.
Long-term memory, on the other hand, retains selected information across tasks or sessions. It might store a support team’s preferred diagnostic report format so the agent can reuse it in future cases. An agent can still complete a task using only short-term memory.
We should keep generated summaries separate from the records they describe. A saved summary of an earlier incident may guide a search, but the agent should get the current status from the service before recommending a next step. We should also prevent one customer’s saved information from appearing in another customer’s requests and remove it when it’s no longer needed.
A system with tools and persistent memory can still follow a predefined workflow. To decide whether our feature would benefit from giving the model more control, we can work through four questions:
What outcome are we delegating? Define what the system should accomplish and what evidence is needed to judge the result.
Which decisions depend on information found during execution? Identify where the model needs discretion to choose a next step. If the useful paths are already well understood, ordinary workflow logic may be sufficient.
Can the application support those decisions? Check that the required tools expose useful results and that task state preserves relevant evidence. Define the permissions and stopping conditions around the work.
Does that discretion improve the outcome? Compare the agent with a simpler workflow on representative tasks. Include unsuccessful runs when measuring completion quality and operating cost.
For more on building AI-powered applications and agents with Progress, check out the following resources:
Hassan is a senior frontend engineer and has helped build large production applications at-scale at organizations like Doordash, Instacart and Shopify. Hassan is also a published author and course instructor where he’s helped thousands of students learn in-depth frontend engineering skills like React, Vue, TypeScript and GraphQL.