• Home
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy
Sunday, June 29, 2025
newsaiworld
  • Home
  • Artificial Intelligence
  • ChatGPT
  • Data Science
  • Machine Learning
  • Crypto Coins
  • Contact Us
No Result
View All Result
  • Home
  • Artificial Intelligence
  • ChatGPT
  • Data Science
  • Machine Learning
  • Crypto Coins
  • Contact Us
No Result
View All Result
Morning News
No Result
View All Result
Home Machine Learning

A Developer’s Information to Constructing Scalable AI: Workflows vs Brokers

Admin by Admin
June 28, 2025
in Machine Learning
0
Agent vs workflow.jpeg
0
SHARES
0
VIEWS
Share on FacebookShare on Twitter

READ ALSO

AI Agent with Multi-Session Reminiscence

Pipelining AI/ML Coaching Workloads with CUDA Streams


I had simply began experimenting with CrewAI and LangGraph, and it felt like I’d unlocked an entire new dimension of constructing. All of the sudden, I didn’t simply have instruments and pipelines — I had crews. I might spin up brokers that might cause, plan, discuss to instruments, and discuss to one another. Multi-agent methods! Brokers that summon different brokers! I used to be virtually architecting the AI model of a startup group.

Each use case turned a candidate for a crew. Assembly prep? Crew. Slide technology? Crew. Lab report evaluate? Crew.

It was thrilling — till it wasn’t.

The extra I constructed, the extra I bumped into questions I hadn’t thought by means of: How do I monitor this? How do I debug a loop the place the agent simply retains “pondering”? What occurs when one thing breaks? Can anybody else even preserve this with me?

That’s once I realized I had skipped an important query: Did this actually must be agentic? Or was I simply excited to make use of the shiny new factor?

Since then, I’ve change into much more cautious — and much more sensible. As a result of there’s an enormous distinction (in keeping with Anthropic) between:

  • A workflow: a structured LLM pipeline with clear management circulate, the place you outline the steps — use a device, retrieve context, name the mannequin, deal with the output.
  • And an agent: an autonomous system the place the LLM decides what to do subsequent, which instruments to make use of, and when it’s “achieved.”

Workflows are extra such as you calling the photographs and the LLM following your lead. Brokers are extra like hiring a superb, barely chaotic intern who figures issues out on their very own — typically fantastically, typically in terrifyingly costly methods.

This text is for anybody who’s ever felt that very same temptation to construct a multi-agent empire earlier than pondering by means of what it takes to keep up it. It’s not a warning, it’s a actuality examine — and a discipline information. As a result of there are instances when brokers are precisely what you want. However more often than not? You simply want a stable workflow.


Desk of Contents

  1. The State of AI Brokers: Everybody’s Doing It, No person Is aware of Why
  2. Technical Actuality Verify: What You’re Really Selecting Between
  3. The Hidden Prices No person Talks About
  4. When Brokers Really Make Sense
  5. When Workflows Are Clearly Higher (However Much less Thrilling)
  6. A Resolution Framework That Really Works
  7. The Plot Twist: You Don’t Should Select
  8. Manufacturing Deployment — The place Concept Meets Actuality
  9. The Trustworthy Suggestion
  10. References

The State of AI Brokers: Everybody’s Doing It, No person Is aware of Why

You’ve most likely seen the stats. 95% of corporations at the moment are utilizing generative AI, with 79% particularly implementing AI brokers, in keeping with Bain’s 2024 survey. That sounds spectacular — till you look somewhat nearer and discover out solely 1% of them think about these implementations “mature.”

Translation: most groups are duct-taping one thing collectively and hoping it doesn’t explode in manufacturing.

I say this with love — I used to be considered one of them.

There’s this second while you first construct an agent system that works — even a small one — and it looks like magic. The LLM decides what to do, picks instruments, loops by means of steps, and comes again with a solution prefer it simply went on a mini journey. You assume: “Why would I ever write inflexible pipelines once more once I can simply let the mannequin determine it out?”

After which the complexity creeps in.

You go from a clear pipeline to a community of tool-wielding LLMs reasoning in circles. You begin writing logic to right the logic of the agent. You construct an agent to oversee the opposite brokers. Earlier than you realize it, you’re sustaining a distributed system of interns with nervousness and no sense of value.

Sure, there are actual success tales. Klarna’s agent handles the workload of 700 customer support reps. BCG constructed a multi-agent design system that reduce shipbuilding engineering time by almost half. These are usually not demos — these are manufacturing methods, saving corporations actual money and time.

However these corporations didn’t get there by chance. Behind the scenes, they invested in infrastructure, observability, fallback methods, finances controls, and groups who might debug immediate chains at 3 AM with out crying.

For many of us? We’re not Klarna. We’re attempting to get one thing working that’s dependable, cost-effective, and doesn’t eat up 20x extra tokens than a well-structured pipeline.

So sure, brokers can be wonderful. However we’ve got to cease pretending they’re a default. Simply because the mannequin can resolve what to do subsequent doesn’t imply it ought to. Simply because the circulate is dynamic doesn’t imply the system is sensible. And simply because everybody’s doing it doesn’t imply you have to comply with.

Generally, utilizing an agent is like changing a microwave with a sous chef — extra versatile, but additionally dearer, tougher to handle, and infrequently makes selections you didn’t ask for.

Let’s determine when it really is sensible to go that route — and when you must simply stick to one thing that works.

Technical Actuality Verify: What You’re Really Selecting Between

Earlier than we dive into the existential disaster of selecting between brokers and workflows, let’s get our definitions straight. As a result of in typical tech style, everybody makes use of these phrases to imply barely various things.

picture by creator

Workflows: The Dependable Buddy Who Reveals Up On Time

Workflows are orchestrated. You write the logic: possibly retrieve context with a vector retailer, name a toolchain, then use the LLM to summarize the outcomes. Every step is express. It’s like a recipe. If it breaks, you realize precisely the place it occurred — and doubtless easy methods to repair it.

That is what most “RAG pipelines” or immediate chains are. Managed. Testable. Price-predictable.

The wonder? You’ll be able to debug them the identical method you debug another software program. Stack traces, logs, fallback logic. If the vector search fails, you catch it. If the mannequin response is bizarre, you reroute it.

Workflows are your reliable buddy who exhibits up on time, sticks to the plan, and doesn’t begin rewriting your complete database schema as a result of it felt “inefficient.”

Picture by creator, impressed by Anthropic

On this instance of a easy buyer help job, this workflow at all times follows the identical classify → route → reply → log sample. It’s predictable, debuggable, and performs constantly.

def customer_support_workflow(customer_message, customer_id):
    """Predefined workflow with express management circulate"""
    
    # Step 1: Classify the message sort
    classification_prompt = f"Classify this message: {customer_message}nOptions: billing, technical, common"
    message_type = llm_call(classification_prompt)
    
    # Step 2: Route based mostly on classification (express paths)
    if message_type == "billing":
        # Get buyer billing information
        billing_data = get_customer_billing(customer_id)
        response_prompt = f"Reply this billing query: {customer_message}nBilling knowledge: {billing_data}"
        
    elif message_type == "technical":
        # Get product information
        product_data = get_product_info(customer_id)
        response_prompt = f"Reply this technical query: {customer_message}nProduct information: {product_data}"
        
    else:  # common
        response_prompt = f"Present a useful common response to: {customer_message}"
    
    # Step 3: Generate response
    response = llm_call(response_prompt)
    
    # Step 4: Log interplay (express)
    log_interaction(customer_id, message_type, response)
    
    return response

The deterministic strategy offers:

  • Predictable execution: Enter A at all times results in Course of B, then End result C
  • Express error dealing with: “If this breaks, try this particular factor”
  • Clear debugging: You’ll be able to actually hint by means of the code to search out issues
  • Useful resource optimization: You understand precisely how a lot all the things will value

Workflow implementations ship constant enterprise worth: OneUnited Financial institution achieved 89% bank card conversion charges, whereas Sequoia Monetary Group saved 700 hours yearly per consumer. Not as attractive as “autonomous AI,” however your operations group will love you.

Brokers: The Sensible Child Who Generally Goes Rogue

Brokers, alternatively, are constructed round loops. The LLM will get a purpose and begins reasoning about easy methods to obtain it. It picks instruments, takes actions, evaluates outcomes, and decides what to do subsequent — all inside a recursive decision-making loop.

That is the place issues get… enjoyable.

Picture by creator, impressed by Anthropic

The structure permits some genuinely spectacular capabilities:

  • Dynamic device choice: “Ought to I question the database or name the API? Let me assume…”
  • Adaptive reasoning: Studying from errors throughout the similar dialog
  • Self-correction: “That didn’t work, let me strive a unique strategy”
  • Complicated state administration: Protecting monitor of what occurred three steps in the past

In the identical instance, the agent would possibly resolve to go looking the data base first, then get billing information, then ask clarifying questions — all based mostly on its interpretation of the client’s wants. The execution path varies relying on what the agent discovers throughout its reasoning course of:

def customer_support_agent(customer_message, customer_id):
    """Agent with dynamic device choice and reasoning"""
    
    # Accessible instruments for the agent
    instruments = {
        "get_billing_info": lambda: get_customer_billing(customer_id),
        "get_product_info": lambda: get_product_info(customer_id),
        "search_knowledge_base": lambda question: search_kb(question),
        "escalate_to_human": lambda: create_escalation(customer_id),
    }
    
    # Agent immediate with device descriptions
    agent_prompt = f"""
    You're a buyer help agent. Assist with this message: "{customer_message}"
    
    Accessible instruments: {record(instruments.keys())}
    
    Assume step-by-step:
    1. What sort of query is that this?
    2. What info do I want?
    3. Which instruments ought to I take advantage of and in what order?
    4. How ought to I reply?
    
    Use instruments dynamically based mostly on what you uncover.
    """
    
    # Agent decides what to do (dynamic reasoning)
    agent_response = llm_agent_call(agent_prompt, instruments)
    
    return agent_response

Sure, that autonomy is what makes brokers highly effective. It’s additionally what makes them onerous to regulate.

Your agent would possibly:

  • resolve to strive a brand new technique mid-way
  • overlook what it already tried
  • or name a device 15 instances in a row attempting to “determine issues out”

You’ll be able to’t simply set a breakpoint and examine the stack. The “stack” is contained in the mannequin’s context window, and the “variables” are fuzzy ideas formed by your prompts.

When one thing goes mistaken — and it’ll — you don’t get a pleasant pink error message. You get a token invoice that appears like somebody mistyped a loop situation and summoned the OpenAI API 600 instances. (I do know, as a result of I did this at the least as soon as the place I forgot to cap the loop, and the agent simply saved pondering… and pondering… till all the system crashed with an “out of token” error).


To place it in easier phrases, you’ll be able to consider it like this:

A workflow is a GPS.
You understand the vacation spot. You comply with clear directions. “Flip left. Merge right here. You’ve arrived.” It’s structured, predictable, and also you nearly at all times get the place you’re going — until you ignore it on function.

An agent is completely different. It’s like handing somebody a map, a smartphone, a bank card, and saying:

“Work out easy methods to get to the airport. You’ll be able to stroll, name a cab, take a detour if wanted — simply make it work.”

They could arrive sooner. Or they may find yourself arguing with a rideshare app, taking a scenic detour, and arriving an hour later with a $18 smoothie. (Everyone knows somebody like that).

Each approaches can work, however the actual query is:

Do you really need autonomy right here, or only a dependable set of directions?

As a result of right here’s the factor — brokers sound wonderful. And they’re, in principle. You’ve most likely seen the headlines:

  • “Deploy an agent to deal with your complete help pipeline!”
  • “Let AI handle your duties when you sleep!”
  • “Revolutionary multi-agent methods — your private consulting agency within the cloud!”

These case research are in every single place. And a few of them are actual. However most of them?

They’re like journey images on Instagram. You see the glowing sundown, the right skyline. You don’t see the six hours of layovers, the missed practice, the $25 airport sandwich, or the three-day abdomen bug from the road tacos.

That’s what agent success tales usually miss: the operational complexity, the debugging ache, the spiraling token invoice.

So yeah, brokers can take you locations. However earlier than you hand over the keys, ensure you’re okay with the route they may select. And which you could afford the tolls.

The Hidden Prices No person Talks About

On paper, brokers appear magical. You give them a purpose, and so they determine easy methods to obtain it. No have to hardcode management circulate. Simply outline a job and let the system deal with the remainder.

In principle, it’s elegant. In observe, it’s chaos in a trench coat.

Let’s discuss what it actually prices to go agentic — not simply in {dollars}, however in complexity, failure modes, and emotional wear-and-tear in your engineering group.

Token Prices Multiply — Quick

In response to Anthropic’s analysis, brokers eat 4x extra tokens than easy chat interactions. Multi-agent methods? Strive 15x extra tokens. This isn’t a bug — it’s the entire level. They loop, cause, re-evaluate, and infrequently discuss to themselves a number of instances earlier than arriving at a call.

Right here’s how that math breaks down:

  • Primary workflows: $500/month for 100k interactions
  • Single agent methods: $2,000/month for a similar quantity
  • Multi-agent methods: $7,500/month (assuming $0.005 per 1K tokens)

And that’s if all the things is working as supposed.

If the agent will get caught in a device name loop or misinterprets directions? You’ll see spikes that make your billing dashboard appear to be a crypto pump-and-dump chart.

Debugging Feels Like AI Archaeology

With workflows, debugging is like strolling by means of a well-lit home. You’ll be able to hint enter → operate → output. Straightforward.

With brokers? It’s extra like wandering by means of an unmapped forest the place the timber sometimes rearrange themselves. You don’t get conventional logs. You get reasoning traces, filled with model-generated ideas like:

“Hmm, that didn’t work. I’ll strive one other strategy.”

That’s not a stack hint. That’s an AI diary entry. It’s poetic, however not useful when issues break in manufacturing.

The actually “enjoyable” half? Error propagation in agent methods can cascade in fully unpredictable methods. One incorrect resolution early within the reasoning chain can lead the agent down a rabbit gap of more and more mistaken conclusions, like a recreation of phone the place every participant can also be attempting to resolve a math downside. Conventional debugging approaches — setting breakpoints, tracing execution paths, checking variable states — change into a lot much less useful when the “bug” is that your AI determined to interpret your directions creatively.

Picture by creator, generated by GPT-4o

New Failure Modes You’ve By no means Needed to Assume About

Microsoft’s analysis has recognized totally new failure modes that didn’t exist earlier than brokers. Listed here are just some that aren’t widespread in conventional pipelines:

  • Agent Injection: Immediate-based exploits that hijack the agent’s reasoning
  • Multi-Agent Jailbreaks: Brokers colluding in unintended methods
  • Reminiscence Poisoning: One agent corrupts shared reminiscence with hallucinated nonsense

These aren’t edge instances anymore — they’re changing into widespread sufficient that complete subfields of “LLMOps” now exist simply to deal with them.

In case your monitoring stack doesn’t monitor token drift, device spam, or emergent agent habits, you’re flying blind.

You’ll Want Infra You In all probability Don’t Have

Agent-based methods don’t simply want compute — they want new layers of tooling.

You’ll most likely find yourself cobbling collectively some combo of:

  • LangFuse, Arize, or Phoenix for observability
  • AgentOps for value and habits monitoring
  • Customized token guards and fallback methods to cease runaway loops

This tooling stack isn’t elective. It’s required to maintain your system steady.

And when you’re not already doing this? You’re not prepared for brokers in manufacturing — at the least, not ones that influence actual customers or cash.


So yeah. It’s not that brokers are “dangerous.” They’re simply much more costly — financially, technically, and emotionally — than most individuals understand after they first begin taking part in with them.

The difficult half is that none of this exhibits up within the demo. Within the demo, it appears clear. Managed. Spectacular.

However in manufacturing, issues leak. Programs loop. Context home windows overflow. And also you’re left explaining to your boss why your AI system spent $5,000 calculating the perfect time to ship an electronic mail.

When Brokers Really Make Sense

[Before we dive into agent success stories, a quick reality check: these are patterns observed from analyzing current implementations, not universal laws of software architecture. Your mileage may vary, and there are plenty of organizations successfully using workflows for scenarios where agents might theoretically excel. Consider these informed observations rather than divine commandments carved in silicon.]

Alright. I’ve thrown a variety of warning tape round agent methods thus far — however I’m not right here to scare you off perpetually.

As a result of typically, brokers are precisely what you want. They’re good in ways in which inflexible workflows merely can’t be.

The trick is figuring out the distinction between “I wish to strive brokers as a result of they’re cool” and “this use case really wants autonomy.”

Listed here are just a few eventualities the place brokers genuinely earn their hold.

Dynamic Conversations With Excessive Stakes

Let’s say you’re constructing a buyer help system. Some queries are simple — refund standing, password reset, and so forth. A easy workflow handles these completely.

However different conversations? They require adaptation. Again-and-forth reasoning. Actual-time prioritization of what to ask subsequent based mostly on what the consumer says.

That’s the place brokers shine.

In these contexts, you’re not simply filling out a type — you’re navigating a scenario. Personalised troubleshooting, product suggestions, contract negotiations — issues the place the following step relies upon totally on what simply occurred.

Corporations implementing agent-based buyer help methods have reported wild ROI — we’re speaking 112% to 457% will increase in effectivity and conversions, relying on the business. As a result of when achieved proper, agentic methods really feel smarter. And that results in belief.

Excessive-Worth, Low-Quantity Resolution-Making

Brokers are costly. However typically, the choices they’re serving to with are extra costly.

BCG helped a shipbuilding agency reduce 45% of its engineering effort utilizing a multi-agent design system. That’s value it — as a result of these selections had been tied to multi-million greenback outcomes.

If you happen to’re optimizing easy methods to lay fiber optic cable throughout a continent or analyzing authorized dangers in a contract that impacts your complete firm — burning just a few additional {dollars} on compute isn’t the issue. The mistaken resolution is.

Brokers work right here as a result of the value of being mistaken is method greater than the value of computing.

Picture by creator

Open-Ended Analysis and Exploration

There are issues the place you actually can’t outline a flowchart upfront — since you don’t know what the “proper steps” are.

Brokers are nice at diving into ambiguous duties, breaking them down, iterating on what they discover, and adapting in real-time.

Assume:

  • Technical analysis assistants that learn, summarize, and evaluate papers
  • Product evaluation bots that discover rivals and synthesize insights
  • Analysis brokers that examine edge instances and recommend hypotheses

These aren’t issues with identified procedures. They’re open loops by nature — and brokers thrive in these.

Multi-Step, Unpredictable Workflows

Some duties have too many branches to hardcode — the sort the place writing out all of the “if this, then that” circumstances turns into a full-time job.

That is the place agent loops can really simplify issues, as a result of the LLM handles the circulate dynamically based mostly on context, not pre-written logic.

Assume diagnostics, planning instruments, or methods that have to consider dozens of unpredictable variables.

In case your logic tree is beginning to appear to be a spaghetti diagram made by a caffeinated octopus — yeah, possibly it’s time to let the mannequin take the wheel.


So no, I’m not anti-agent (I really love them!) I’m pro-alignment — matching the device to the duty.

When the use case wants flexibility, adaptation, and autonomy, then sure — carry within the brokers. However solely after you’re trustworthy with your self about whether or not you’re fixing an actual complexity… or simply chasing a shiny abstraction.

When Workflows Are Clearly Higher (However Much less Thrilling)

[Again, these are observations drawn from industry analysis rather than ironclad rules. There are undoubtedly companies out there successfully using agents for regulated processes or cost-sensitive applications — possibly because they have specific requirements, exceptional expertise, or business models that change the economics. Think of these as strong starting recommendations, not limitations on what’s possible.]

Let’s step again for a second.

Loads of AI structure conversations get caught in hype loops — “Brokers are the longer term!” “AutoGPT can construct corporations!” — however in precise manufacturing environments, most methods don’t want brokers.

They want one thing that works.

That’s the place workflows are available. And whereas they could not really feel as futuristic, they’re extremely efficient within the environments that almost all of us are constructing for.

Repeatable Operational Duties

In case your use case entails clearly outlined steps that hardly ever change — like sending follow-ups, tagging knowledge, validating type inputs — a workflow will outshine an agent each time.

It’s not nearly value. It’s about stability.

You don’t need artistic reasoning in your payroll system. You need the identical consequence, each time, with no surprises. A well-structured pipeline offers you that.

There’s nothing attractive about “course of reliability” — till your agent-based system forgets what 12 months it’s and flags each worker as a minor.

Regulated, Auditable Environments

Workflows are deterministic. Meaning they’re traceable. Which implies if one thing goes mistaken, you’ll be able to present precisely what occurred — step-by-step — with logs, fallbacks, and structured output.

If you happen to’re working in healthcare, finance, legislation, or authorities — locations the place “we predict the AI determined to strive one thing new” just isn’t an appropriate reply — this issues.

You’ll be able to’t construct a protected AI system with out transparency. Workflows provide you with that by default.

Picture by creator

Excessive-Frequency, Low-Complexity Situations

There are complete classes of duties the place the value per request issues greater than the sophistication of reasoning. Assume:

  • Fetching information from a database
  • Parsing emails
  • Responding to FAQ-style queries

A workflow can deal with hundreds of those requests per minute, at predictable prices and latency, with zero danger of runaway habits.

If you happen to’re scaling quick and wish to remain lean, a structured pipeline beats a intelligent agent.

Startups, MVPs, and Simply-Get-It-Finished Initiatives

Brokers require infrastructure. Monitoring. Observability. Price monitoring. Immediate structure. Fallback planning. Reminiscence design.

If you happen to’re not able to spend money on all of that — and most early-stage groups aren’t — brokers are most likely an excessive amount of, too quickly.

Workflows allow you to transfer quick and learn the way LLMs behave earlier than you get into recursive reasoning and emergent habits debugging.

Consider it this manner: workflows are the way you get to manufacturing. Brokers are the way you scale particular use instances when you perceive your system deeply.


Top-of-the-line psychological fashions I’ve seen (shoutout to Anthropic’s engineering weblog) is that this:

Use workflows to construct construction across the predictable. Use brokers to discover the unpredictable.

Most real-world AI methods are a mixture — and plenty of of them lean closely on workflows as a result of manufacturing doesn’t reward cleverness. It rewards resilience.

A Resolution Framework That Really Works

Right here’s one thing I’ve realized (the onerous method, in fact): most dangerous structure selections don’t come from a lack of understanding — they arrive from transferring too quick.

You’re in a sync. Somebody says, “This feels a bit too dynamic for a workflow — possibly we simply go along with brokers?”
Everybody nods. It sounds cheap. Brokers are versatile, proper?

Quick ahead three months: the system’s looping in bizarre locations, the logs are unreadable, prices are spiking, and nobody remembers who prompt utilizing brokers within the first place. You’re simply attempting to determine why an LLM determined to summarize a refund request by reserving a flight to Peru.

So, let’s decelerate for a second.

This isn’t about selecting the trendiest choice — it’s about constructing one thing you’ll be able to clarify, scale, and really preserve.
The framework under is designed to make you pause and assume clearly earlier than the token payments stack up and your good prototype turns into a really costly choose-your-own-adventure story.

Picture by creator

The Scoring Course of: As a result of Single-Issue Choices Are How Initiatives Die

This isn’t a call tree that bails out on the first “sounds good.” It’s a structured analysis. You undergo 5 dimensions, rating each, and see what the system is absolutely asking for — not simply what sounds enjoyable.

Right here’s the way it works:

  • Every dimension offers +2 factors to both workflow or brokers.
  • One query offers +1 level (reliability).
  • Add all of it up on the finish — and belief the consequence greater than your agent hype cravings.

Complexity of the Activity (2 factors)

Consider whether or not your use case has well-defined procedures. Are you able to write down steps that deal with 80% of your eventualities with out resorting to hand-waving?

  • Sure → +2 for workflows
  • No, there’s ambiguity or dynamic branching → +2 for brokers

In case your directions contain phrases like “after which the system figures it out” — you’re most likely in agent territory.

Enterprise Worth vs. Quantity (2 factors)

Assess the chilly, onerous economics of your use case. Is that this a high-volume, cost-sensitive operation — or a low-volume, high-value state of affairs?

  • Excessive-volume and predictable → +2 for workflows
  • Low-volume however high-impact selections → +2 for brokers

Principally: if compute value is extra painful than getting one thing barely mistaken, workflows win. If being mistaken is pricey and being sluggish loses cash, brokers is perhaps value it.

Reliability Necessities (1 level)

Decide your tolerance for output variability — and be trustworthy about what your small business really wants, not what sounds versatile and trendy. How a lot output variability can your system tolerate?

  • Must be constant and traceable (audits, stories, scientific workflows) → +1 for workflows
  • Can deal with some variation (artistic duties, buyer help, exploration) → +1 for brokers

This one’s usually neglected — however it straight impacts how a lot guardrail logic you’ll want to put in writing (and preserve).

Technical Readiness (2 factors)

Consider your present capabilities with out the rose-colored glasses of “we’ll determine it out later.” What’s your present engineering setup and luxury degree?

  • You’ve bought logging, conventional monitoring, and a dev group that hasn’t but constructed agentic infra → +2 for workflows
  • You have already got observability, fallback plans, token monitoring, and a group that understands emergent AI habits → +2 for brokers

That is your system maturity examine. Be trustworthy with your self. Hope just isn’t a debugging technique.

Organizational Maturity (2 factors)

Assess your group’s AI experience with brutal honesty — this isn’t about intelligence, it’s about expertise with the precise weirdness of AI methods. How skilled is your group with immediate engineering, device orchestration, and LLM weirdness?

  • Nonetheless studying immediate design and LLM habits → +2 for workflows
  • Snug with distributed methods, LLM loops, and dynamic reasoning → +2 for brokers

You’re not evaluating intelligence right here — simply expertise with a particular class of issues. Brokers demand a deeper familiarity with AI-specific failure patterns.


Add Up Your Rating

After finishing all 5 evaluations, calculate your whole scores.

  • Workflow rating ≥ 6 → Stick to workflows. You’ll thank your self later.
  • Agent rating ≥ 6 → Brokers is perhaps viable — if there aren’t any workflow-critical blockers.

Vital: This framework doesn’t inform you what’s coolest. It tells you what’s sustainable.

Loads of use instances will lean workflow-heavy. That’s not as a result of brokers are dangerous — it’s as a result of true agent readiness entails many methods working in concord: infrastructure, ops maturity, group data, failure dealing with, and price controls.

And if any a type of is lacking, it’s normally not well worth the danger — but.

The Plot Twist: You Don’t Should Select

Right here’s a realization I want I’d had earlier: you don’t have to choose sides. The magic usually comes from hybrid methods — the place workflows present stability, and brokers provide flexibility. It’s the perfect of each worlds.

Let’s discover how that truly works.

Why Hybrid Makes Sense

Consider it as layering:

  1. Reactive layer (your workflow): handles predictable, high-volume duties
  2. Deliberative layer (your agent): steps in for advanced, ambiguous selections

That is precisely what number of actual methods are constructed. The workflow handles the 80% of predictable work, whereas the agent jumps in for the 20% that wants artistic reasoning or planning

Constructing Hybrid Programs Step by Step

Right here’s a refined strategy I’ve used (and borrowed from hybrid greatest practices):

  1. Outline the core workflow.
    Map out your predictable duties — knowledge retrieval, vector search, device calls, response synthesis.
  2. Determine resolution factors.
    The place would possibly you want an agent to resolve issues dynamically?
  3. Wrap these steps with light-weight brokers.
    Consider them as scoped resolution engines — they plan, act, replicate, then return solutions to the workflow .
  4. Use reminiscence and plan loops correctly.
    Give the agent simply sufficient context to make good decisions with out letting it go rogue.
  5. Monitor and fail gracefully.
    If the agent goes wild or prices spike, fall again to a default workflow department. Preserve logs and token meters operating.
  6. Human-in-the-loop checkpoint.
    Particularly in regulated or high-stakes flows, pause for human validation earlier than agent-critical actions

When to Use Hybrid Strategy

State of affairs Why Hybrid Works
Buyer help Workflow does straightforward stuff, brokers adapt when conversations get messy
Content material technology Workflow handles format and publishing; agent writes the physique
Information evaluation/reporting Brokers summarize & interpret; workflows combination & ship
Excessive-stakes selections Use agent for exploration, workflow for execution and compliance
When to make use of hybrid strategy

This aligns with how methods like WorkflowGen, n8n, and Anthropic’s personal tooling advise constructing — steady pipelines with scoped autonomy.

Actual Examples: Hybrid in Motion

A Minimal Hybrid Instance

Right here’s a state of affairs I used with LangChain and LangGraph:

  • Workflow stage: fetch help tickets, embed & search
  • Agent cell: resolve whether or not it’s a refund query, a criticism, or a bug report
  • Workflow: run the proper department based mostly on agent’s tag
  • Agent stage: if it’s a criticism, summarize sentiment and recommend subsequent steps
  • Workflow: format and ship response; log all the things

The consequence? Most tickets circulate by means of with out brokers, saving value and complexity. However when ambiguity hits, the agent steps in and provides actual worth. No runaway token payments. Clear traceability. Computerized fallbacks.

This sample splits the logic between a structured workflow and a scoped agent. (Word: it is a high-level demonstration)

from langchain.chat_models import init_chat_model
from langchain_community.vectorstores.faiss import FAISS
from langchain_openai import OpenAIEmbeddings
from langchain.chains import create_retrieval_chain
from langchain.chains.combine_documents import create_stuff_documents_chain
from langchain_core.prompts import ChatPromptTemplate
from langgraph.prebuilt import create_react_agent
from langchain_community.instruments.tavily_search import TavilySearchResults

# 1. Workflow: arrange RAG pipeline
embeddings = OpenAIEmbeddings()
vectordb = FAISS.load_local(
    "docs_index",
    embeddings,
    allow_dangerous_deserialization=True
)
retriever = vectordb.as_retriever()

system_prompt = (
    "Use the given context to reply the query. "
    "If you do not know the reply, say you do not know. "
    "Use three sentences most and hold the reply concise.nn"
    "Context: {context}"
)
immediate = ChatPromptTemplate.from_messages([
    ("system", system_prompt),
    ("human", "{input}"),
])

llm = init_chat_model("openai:gpt-4.1", temperature=0)
qa_chain = create_retrieval_chain(
    retriever,
    create_stuff_documents_chain(llm, immediate)
)

# 2. Agent: Arrange agent with Tavily search
search = TavilySearchResults(max_results=2)
agent_llm = init_chat_model("anthropic:claude-3-7-sonnet-latest", temperature=0)
agent = create_react_agent(
    mannequin=agent_llm,
    instruments=[search]
)

# Uncertainty heuristic
def is_answer_uncertain(reply: str) -> bool:
    key phrases = [
        "i don't know", "i'm not sure", "unclear",
        "unable to answer", "insufficient information",
        "no information", "cannot determine"
    ]
    return any(ok in reply.decrease() for ok in key phrases)

def hybrid_pipeline(question: str) -> str:
    # RAG try
    rag_out = qa_chain.invoke({"enter": question})
    rag_answer = rag_out.get("reply", "")
    
    if is_answer_uncertain(rag_answer):
        # Fallback to agent search
        agent_out = agent.invoke({
            "messages": [{"role": "user", "content": query}]
        })
        return agent_out["messages"][-1].content material
    
    return rag_answer

if __name__ == "__main__":
    consequence = hybrid_pipeline("What are the most recent developments in AI?")
    print(consequence)

What’s taking place right here:

  • The workflow takes the primary shot.
  • If the consequence appears weak or unsure, the agent takes over.
  • You solely pay the agent value when you actually need to.

Easy. Managed. Scalable.

Superior: Workflow-Managed Multi-Agent Execution

In case your downside actually requires a number of brokers — say, in a analysis or planning job — construction the system as a graph, not a soup of recursive loops. (Word: it is a excessive degree demonstration)

from typing import TypedDict
from langgraph.graph import StateGraph, START, END
from langchain.chat_models import init_chat_model
from langgraph.prebuilt import ToolNode
from langchain_core.messages import AnyMessage

# 1. Outline your graph's state
class TaskState(TypedDict):
    enter: str
    label: str
    output: str

# 2. Construct the graph
graph = StateGraph(TaskState)

# 3. Add your classifier node
def classify(state: TaskState) -> TaskState:
    # instance stub:
    state["label"] = "analysis" if "newest" in state["input"] else "abstract"
    return state

graph.add_node("classify", classify)
graph.add_edge(START, "classify")

# 4. Outline conditional transitions out of the classifier node
graph.add_conditional_edges(
    "classify",
    lambda s: s["label"],
    path_map={"analysis": "research_agent", "abstract": "summarizer_agent"}
)

# 5. Outline the agent nodes
research_agent = ToolNode([create_react_agent(...tools...)])
summarizer_agent = ToolNode([create_react_agent(...tools...)])

# 6. Add the agent nodes to the graph
graph.add_node("research_agent", research_agent)
graph.add_node("summarizer_agent", summarizer_agent)

# 7. Add edges. Every agent node leads on to END, terminating the workflow
graph.add_edge("research_agent", END)
graph.add_edge("summarizer_agent", END)

# 8. Compile and run the graph
app = graph.compile()
ultimate = app.invoke({"enter": "What are right this moment's AI headlines?", "label": "", "output": ""})
print(ultimate["output"])

This sample offers you:

  • Workflow-level management over routing and reminiscence
  • Agent-level reasoning the place applicable
  • Bounded loops as an alternative of infinite agent recursion

That is how instruments like LangGraph are designed to work: structured autonomy, not free-for-all reasoning.

Manufacturing Deployment — The place Concept Meets Actuality

All of the structure diagrams, resolution timber, and whiteboard debates on the planet received’t prevent in case your AI system falls aside the second actual customers begin utilizing it.

As a result of that’s the place issues get messy — the inputs are noisy, the sting instances are infinite, and customers have a magical potential to interrupt issues in methods you by no means imagined. Manufacturing visitors has a character. It can take a look at your system in methods your dev setting by no means might.

And that’s the place most AI initiatives stumble.
The demo works. The prototype impresses the stakeholders. However you then go dwell — and all of a sudden the mannequin begins hallucinating buyer names, your token utilization spikes with out rationalization, and also you’re ankle-deep in logs attempting to determine why all the things broke at 3:17 a.m. (True story!)

That is the hole between a cool proof-of-concept and a system that truly holds up within the wild. It’s additionally the place the distinction between workflows and brokers stops being philosophical and begins changing into very, very operational.

Whether or not you’re utilizing brokers, workflows, or some hybrid in between — when you’re in manufacturing, it’s a unique recreation.
You’re not attempting to show that the AI can work.
You’re attempting to verify it really works reliably, affordably, and safely — each time.

So what does that truly take?

Let’s break it down.

Monitoring (As a result of “It Works on My Machine” Doesn’t Scale)

Monitoring an agent system isn’t simply “good to have” — it’s survival gear.

You’ll be able to’t deal with brokers like common apps. Conventional APM instruments received’t inform you why an LLM determined to loop by means of a device name 14 instances or why it burned 10,000 tokens to summarize a paragraph.

You want observability instruments that talk the agent’s language. Meaning monitoring:

  • token utilization patterns,
  • device name frequency,
  • response latency distributions,
  • job completion outcomes,
  • and price per interplay — in actual time.

That is the place instruments like LangFuse, AgentOps, and Arize Phoenix are available. They allow you to peek into the black field — see what selections the agent is making, how usually it’s retrying issues, and what’s going off the rails earlier than your finances does.

As a result of when one thing breaks, “the AI made a bizarre selection” just isn’t a useful bug report. You want traceable reasoning paths and utilization logs — not simply vibes and token explosions.

Workflows, by comparability, are method simpler to watch.
You’ve bought:

  • response instances,
  • error charges,
  • CPU/reminiscence utilization,
  • and request throughput.

All the same old stuff you already monitor together with your customary APM stack — Datadog, Grafana, Prometheus, no matter. No surprises. No loops attempting to plan their subsequent transfer. Simply clear, predictable execution paths.

So sure — each want monitoring. However agent methods demand an entire new layer of visibility. If you happen to’re not ready for that, manufacturing will ensure you study it the onerous method.

Picture by creator

Price Administration (Earlier than Your CFO Levels an Intervention)

Token consumption in manufacturing can spiral uncontrolled sooner than you’ll be able to say “autonomous reasoning.”

It begins small — just a few additional device calls right here, a retry loop there — and earlier than you realize it, you’ve burned by means of half your month-to-month finances debugging a single dialog. Particularly with agent methods, prices don’t simply add up — they compound.

That’s why good groups deal with value administration like infrastructure, not an afterthought.

Some widespread (and needed) methods:

  • Dynamic mannequin routing — Use light-weight fashions for easy duties, save the costly ones for when it really issues.
  • Caching — If the identical query comes up 100 instances, you shouldn’t pay to reply it 100 instances.
  • Spending alerts — Automated flags when utilization will get bizarre, so that you don’t study the issue out of your CFO.

With brokers, this issues much more.
As a result of when you hand over management to a reasoning loop, you lose visibility into what number of steps it’ll take, what number of instruments it’ll name, and the way lengthy it’ll “assume” earlier than returning a solution.

If you happen to don’t have real-time value monitoring, per-agent finances limits, and swish fallback paths — you’re only one immediate away from a really costly mistake.

Brokers are good. However they’re not low-cost. Plan accordingly.

Workflows want value administration too.
If you happen to’re calling an LLM for each consumer request, particularly with retrieval, summarization, and chaining steps — the numbers add up. And when you’re utilizing GPT-4 in every single place out of comfort? You’ll really feel it on the bill.

However workflows are predictable. You know the way many calls you’re making. You’ll be able to precompute, batch, cache, or swap in smaller fashions with out disrupting logic. Price scales linearly — and predictably.

Safety (As a result of Autonomous AI and Safety Are Greatest Mates)

AI safety isn’t nearly guarding endpoints anymore — it’s about getting ready for methods that may make their very own selections.

That’s the place the idea of shifting left is available in — bringing safety earlier into your growth lifecycle.

As an alternative of bolting on safety after your app “works,” shift-left means designing with safety from day one: throughout immediate design, device configuration, and pipeline setup.

With agent-based methods, you’re not simply securing a predictable app. You’re securing one thing that may autonomously resolve to name an API, entry personal knowledge, or set off an exterior motion — usually in methods you didn’t explicitly program. That’s a really completely different menace floor.

This implies your safety technique must evolve. You’ll want:

  • Position-based entry management for each device an agent can entry
  • Least privilege enforcement for exterior API calls
  • Audit trails to seize each step within the agent’s reasoning and habits
  • Risk modeling for novel assaults like immediate injection, agent impersonation, and collaborative jailbreaking (sure, that’s a factor now)

Most conventional app safety frameworks assume the code defines the habits. However with brokers, the habits is dynamic, formed by prompts, instruments, and consumer enter. If you happen to’re constructing with autonomy, you want safety controls designed for unpredictability.


However what about workflows?

They’re simpler — however not risk-free.

Workflows are deterministic. You outline the trail, you management the instruments, and there’s no decision-making loop that may go rogue. That makes safety easier and extra testable — particularly in environments the place compliance and auditability matter.

Nonetheless, workflows contact delicate knowledge, combine with third-party companies, and output user-facing outcomes. Which implies:

  • Immediate injection remains to be a priority
  • Output sanitation remains to be important
  • API keys, database entry, and PII dealing with nonetheless want safety

For workflows, “shifting left” means:

  • Validating enter/output codecs early
  • Operating immediate checks for injection danger
  • Limiting what every element can entry, even when it “appears protected”
  • Automating red-teaming and fuzz testing round consumer inputs

It’s not about paranoia — it’s about defending your system earlier than issues go dwell and actual customers begin throwing surprising inputs at it.


Whether or not you’re constructing brokers, workflows, or hybrids, the rule is identical:

In case your system can generate actions or outputs, it may be exploited.

So construct like somebody will attempt to break it — as a result of ultimately, somebody most likely will.

Testing Methodologies (As a result of “Belief however Confirm” Applies to AI Too)

Testing manufacturing AI methods is like quality-checking a really good however barely unpredictable intern.
They imply properly. They normally get it proper. However now and again, they shock you — and never at all times in a great way.

That’s why you want layers of testing, particularly when coping with brokers.

For agent methods, a single bug in reasoning can set off an entire chain of bizarre selections. One mistaken judgment early on can snowball into damaged device calls, hallucinated outputs, and even knowledge publicity. And since the logic lives inside a immediate, not a static flowchart, you’ll be able to’t at all times catch these points with conventional take a look at instances.

A stable testing technique normally contains:

  • Sandbox environments with fastidiously designed mock knowledge to stress-test edge instances
  • Staged deployments with restricted actual knowledge to watch habits earlier than full rollout
  • Automated regression checks to examine for surprising modifications in output between mannequin variations
  • Human-in-the-loop evaluations — as a result of some issues, like tone or area nuance, nonetheless want human judgment

For brokers, this isn’t elective. It’s the one solution to keep forward of unpredictable habits.


However what about workflows?

They’re simpler to check — and actually, that’s considered one of their largest strengths.

As a result of workflows comply with a deterministic path, you’ll be able to:

  • Write unit checks for every operate or device name
  • Mock exterior companies cleanly
  • Snapshot anticipated inputs/outputs and take a look at for consistency
  • Validate edge instances with out worrying about recursive reasoning or planning loops

You continue to wish to take a look at prompts, guard in opposition to immediate injection, and monitor outputs — however the floor space is smaller, and the habits is traceable. You understand what occurs when Step 3 fails, since you wrote Step 4.

Workflows don’t take away the necessity for testing — they make it testable.
That’s an enormous deal while you’re attempting to ship one thing that received’t collapse the second it hits real-world knowledge.

The Trustworthy Suggestion: Begin Easy, Scale Deliberately

If you happen to’ve made it this far, you’re most likely not on the lookout for hype — you’re on the lookout for a system that truly works.

So right here’s the trustworthy, barely unsexy recommendation:

Begin with workflows. Add brokers solely when you’ll be able to clearly justify the necessity.

Workflows could not really feel revolutionary, however they’re dependable, testable, explainable, and cost-predictable. They train you the way your system behaves in manufacturing. They provide you logs, fallback paths, and construction. And most significantly: they scale.

That’s not a limitation. That’s maturity.

It’s like studying to cook dinner. You don’t begin with molecular gastronomy — you begin by studying easy methods to not burn rice. Workflows are your rice. Brokers are the froth.

And while you do run into an issue that truly wants dynamic planning, versatile reasoning, or autonomous decision-making — you’ll know. It received’t be as a result of a tweet instructed you brokers are the longer term. It’ll be since you hit a wall workflows can’t cross. And at that time, you’ll be prepared for brokers — and your infrastructure will probably be, too.

Take a look at the Mayo Clinic. They run 14 algorithms on each ECG — not as a result of it’s stylish, however as a result of it improves diagnostic accuracy at scale. Or take Kaiser Permanente, which says its AI-powered scientific help methods have helped save a whole bunch of lives annually.

These aren’t tech demos constructed to impress traders. These are actual methods, in manufacturing, dealing with tens of millions of instances — quietly, reliably, and with enormous influence.

The key? It’s not about selecting brokers or workflows.
It’s about understanding the issue deeply, selecting the correct instruments intentionally, and constructing for resilience — not for flash.

As a result of in the actual world, worth comes from what works.
Not what wows.


Now go forth and make knowledgeable architectural selections. The world has sufficient AI demos that work in managed environments. What we want are AI methods that work within the messy actuality of manufacturing — no matter whether or not they’re “cool” sufficient to get upvotes on Reddit.


References

  1. Anthropic. (2024). Constructing efficient brokers. https://www.anthropic.com/engineering/building-effective-agents
  2. Anthropic. (2024). How we constructed our multi-agent analysis system. https://www.anthropic.com/engineering/built-multi-agent-research-system
  3. Ascendix. (2024). Salesforce success tales: From imaginative and prescient to victory. https://ascendix.com/weblog/salesforce-success-stories/
  4. Bain & Firm. (2024). Survey: Generative AI’s uptake is unprecedented regardless of roadblocks. https://www.bain.com/insights/survey-generative-ai-uptake-is-unprecedented-despite-roadblocks/
  5. BCG International. (2025). How AI might be the brand new all-star in your group. https://www.bcg.com/publications/2025/how-ai-can-be-the-new-all-star-on-your-team
  6. DigitalOcean. (2025). 7 sorts of AI brokers to automate your workflows in 2025. https://www.digitalocean.com/assets/articles/types-of-ai-agents
  7. Klarna. (2024). Klarna AI assistant handles two-thirds of customer support chats in its first month [Press release]. https://www.klarna.com/worldwide/press/klarna-ai-assistant-handles-two-thirds-of-customer-service-chats-in-its-first-month/
  8. Mayo Clinic. (2024). Mayo Clinic launches new expertise platform ventures to revolutionize diagnostic drugs. https://newsnetwork.mayoclinic.org/dialogue/mayo-clinic-launches-new-technology-platform-ventures-to-revolutionize-diagnostic-medicine/
  9. McKinsey & Firm. (2024). The state of AI: How organizations are rewiring to seize worth. https://www.mckinsey.com/capabilities/quantumblack/our-insights/the-state-of-ai
  10. Microsoft. (2025, April 24). New whitepaper outlines the taxonomy of failure modes in AI brokers [Blog post]. https://www.microsoft.com/en-us/safety/weblog/2025/04/24/new-whitepaper-outlines-the-taxonomy-of-failure-modes-in-ai-agents/
  11. UCSD Heart for Well being Innovation. (2024). 11 well being methods main in AI. https://healthinnovation.ucsd.edu/information/11-health-systems-leading-in-ai
  12. Yoon, J., Kim, S., & Lee, M. (2023). Revolutionizing healthcare: The function of synthetic intelligence in scientific observe. BMC Medical Training, 23, Article 698. https://bmcmededuc.biomedcentral.com/articles/10.1186/s12909-023-04698-z

If you happen to loved this exploration of AI structure selections, comply with me for extra guides on navigating the thrilling and infrequently maddening world of manufacturing AI methods.

Tags: AgentsBuildingDevelopersGuideScalableWorkflows

Related Posts

Image 127.png
Machine Learning

AI Agent with Multi-Session Reminiscence

June 29, 2025
4.webp.webp
Machine Learning

Pipelining AI/ML Coaching Workloads with CUDA Streams

June 26, 2025
Levart photographer drwpcjkvxuu unsplash scaled 1.jpg
Machine Learning

How you can Practice a Chatbot Utilizing RAG and Customized Information

June 25, 2025
T2.jpg
Machine Learning

Constructing A Trendy Dashboard with Python and Taipy

June 24, 2025
Sqlcrew.jpg
Machine Learning

A Multi-Agent SQL Assistant You Can Belief with Human-in-Loop Checkpoint & LLM Value Management

June 23, 2025
Image 66.jpg
Machine Learning

What PyTorch Actually Means by a Leaf Tensor and Its Grad

June 22, 2025
Next Post
Data mining 1 hanna barakat aixdesign archival images of ai 4096x2846.png

Hitchhiker’s Information to RAG with ChatGPT API and LangChain

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

POPULAR NEWS

0 3.png

College endowments be a part of crypto rush, boosting meme cash like Meme Index

February 10, 2025
Gemini 2.0 Fash Vs Gpt 4o.webp.webp

Gemini 2.0 Flash vs GPT 4o: Which is Higher?

January 19, 2025
1da3lz S3h Cujupuolbtvw.png

Scaling Statistics: Incremental Customary Deviation in SQL with dbt | by Yuval Gorchover | Jan, 2025

January 2, 2025
How To Maintain Data Quality In The Supply Chain Feature.jpg

Find out how to Preserve Knowledge High quality within the Provide Chain

September 8, 2024
0khns0 Djocjfzxyr.jpeg

Constructing Data Graphs with LLM Graph Transformer | by Tomaz Bratanic | Nov, 2024

November 5, 2024

EDITOR'S PICK

Bonk.webp.webp

BONK Types Double Backside, Targets $0.000019 Breakout

April 17, 2025
04owpdscbisend R.jpeg

Demystifying the Correlation Matrix in Information Science | by Niklas Lang | Nov, 2024

November 13, 2024
9 1920x1080@2x 1.png

Expanded margin pairs accessible for RENDER, RUNE, MEW, TURBO, TON, GALA, EIGEN and ZK!

November 28, 2024
Etherum222.webp.webp

Ethereum Worth Eyes $2,000 Breakout Amid Whale Accumulation

April 27, 2025

About Us

Welcome to News AI World, your go-to source for the latest in artificial intelligence news and developments. Our mission is to deliver comprehensive and insightful coverage of the rapidly evolving AI landscape, keeping you informed about breakthroughs, trends, and the transformative impact of AI technologies across industries.

Categories

  • Artificial Intelligence
  • ChatGPT
  • Crypto Coins
  • Data Science
  • Machine Learning

Recent Posts

  • Re-Engineering Ethernet for AI Cloth
  • Carnegie Mellon research • The Register
  • REX-Osprey Ethereum, Solana staked ETFs could launch quickly as SEC raises no objections
  • Home
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy

© 2024 Newsaiworld.com. All rights reserved.

No Result
View All Result
  • Home
  • Artificial Intelligence
  • ChatGPT
  • Data Science
  • Machine Learning
  • Crypto Coins
  • Contact Us

© 2024 Newsaiworld.com. All rights reserved.

Are you sure want to unlock this post?
Unlock left : 0
Are you sure want to cancel subscription?