For the past twenty years or so, the story of business automation has been essentially the same: someone encodes a set of rules, software executes them, and any exception to the rule is promptly delivered in an email to an exhausted human being.
Autonomous AI agents rewrite the script. You set an agent a target, and it determines which actions to take, calls on the necessary software tools, processes their outputs, and iterates. The rules aren’t the program anymore.
A shift is happening, but it’s patchy. McKinsey’s 2026 survey found 40% of large companies scaling agents in one function or more, but only 22% of smaller companies. And Gartner expects over 40% of agentic AI projects will be cancelled by the end of 2027.
Both assertions are accurate, and the discrepancy is essentially a technical problem. All of the significant agent frameworks discussed here include a Python SDK, so this article considers the market and Python libraries and what to consider before you buy.
What AI Agents Actually Are
Software that operates within a loop to accomplish a goal is an agent. It decides what the next action should be, performs that action by invoking a tool (making an API call, querying a database, editing a file, etc.), consumes the output, and then decides what action to take next.
The loop terminates once the goal has been achieved or when a certain limit is hit. This concept is stated more plainly in the Agent SDK documentation from Anthropic: an application which makes plans and executes them by calling one or more tools.
How Agents Differ From the Automation You Already Run
Vendor marketing tends to blur three categories together, so it helps to separate them.
| Scripted automation / RPA | Chatbot or assistant | AI agent | |
|---|---|---|---|
| How it decides | Fixed rules written in advance | Responds to one prompt at a time | Plans steps toward a goal and picks tools |
| Unexpected input | Fails or routes to a person | Answers, but rarely acts | Adapts within its permissions, escalates when stuck |
| Typical output | Same result every run | Text or a suggestion | A completed task across several systems |
| Main risk | Breaks when a system changes | Wrong or outdated answer | A wrong action taken quickly, plus runaway cost |
Table 1. A simplified comparison. Real products often mix these categories.
Why the Hype Needs a Reality Check
Gartner’s projection for June 2025 serves as the most valuable corrective. It predicts that more than 40 percent of agentic AI initiatives will be aborted before the end of 2027, due to escalating costs, ambiguous business value, or insufficient risk mitigation.
It further projects that only around 130 of the thousands of purported agentic vendors are in fact, and terms agent ‘washing’ as the relabelling of chatbots, assistants and RPA with minimal agentic functionality, to claim the trend.
It’s also the case, say Gartner’s analysts, that many ‘agentic’ use cases pitched to them don’t in fact call for an agentic design. That is a useful test to keep front of mind.
If a flow is finite and determined, then a normal piece of code will likely be less expensive and more easily auditable. Agents are justified when a flow requires judgement across multiple disparate systems.
The Market in Numbers
Spending Forecasts
Market estimation firms can be inconsistent, but they tend to converge on the same numbers. Marketsand Markets estimates growth from $7.84 billion in 2025 to $52.62 billion in 2030, at a CAGR of 46.3%.
BCC Research estimates growth from around $8 billion in 2025 to $48.3 billion in 2030, at 43.3% CAGR. As with any projections, treat these as directional only. These market size reports are models, and one company’s “agent” may be another’s “thing.”

Sources: MarketsandMarkets (April 2025); BCC Research.
What Gartner Expects Through 2035
Gartner’s forecasts are less about market size and more about where agents will sit inside enterprise software.
| By | Forecast | Published |
|---|---|---|
| 2026 | 40% of enterprise applications will feature task-specific AI agents, up from under 5% in 2025 | August 2025 |
| 2028 | 33% of enterprise software applications will include agentic AI, up from under 1% in 2024 | June 2025 |
| 2028 | At least 15% of day-to-day work decisions will be made autonomously by agentic AI, up from 0% in 2024 | June 2025 |
| 2028 | A third of user experiences will shift from native applications to agentic front ends | August 2025 |
| 2028 | AI agents will intermediate more than $15 trillion of B2B spending | October 2025 |
| 2030 | Up to $234 billion of enterprise application spending will be exposed to “agentic arbitrage”, about 20% of enterprise application SaaS spend | July 2026 |
| 2035 | Best case: agentic AI drives about 30% of enterprise application software revenue, above $450 billion, up from 2% in 2025 | August 2025 |
Table 2. Selected Gartner forecasts. These are projections, not measurements.
Where Adoption Stands Today
One thing is forecasts, another is data on what firms actually do. According to McKinsey’s 2026 survey, 40% of respondents from organisations with more than $1 billion in revenues are in the process of scaling AI agents-up from 27% the year before. The share of smaller firms stayed put at 22%.

Source: McKinsey Global Survey on the state of AI, 2025 and 2026.
By contrast, financial outcomes haven’t kept pace. Some 37% of survey participants say that at least part of their EBIT has been impacted by AI, a share that’s flat compared to last year, while one in five claim that operating costs-such as token costs-have capped AI utilization.
Developers show a comparable split. Stack Overflow’s 2025 survey found that some 31% of developers had been employing AI agents to some extent in their jobs, and 37.9% were not planning to. An April 2026 pulse survey found agent usage at 59%, though the samples are not comparable.

Sources: Stack Overflow Developer Survey 2025; Stack Overflow blog (April 2026 pulse survey).
Why Python Sits at the Center of Agent Development
What the Usage Data Says
By contrast, financial outcomes haven’t kept pace. Some 37% of survey participants say that at least part of their EBIT has been impacted by AI, a share that’s flat compared to last year, while one in five claim that operating costs-such as token costs-have capped AI utilization.
Developers show a comparable split. Stack Overflow’s 2025 survey found that some 31% of developers had been employing AI agents to some extent in their jobs, and 37.9% were not planning to. An April 2026 pulse survey found agent usage at 59%, though the samples are not comparable.

Source: Stack Overflow Developer Survey 2026.
A survey conducted by the Python Software Foundation and JetBrains with over 30,000 developers, which explains why the language so effortlessly straddles data science and application code.
In the survey, 48% of respondents employ Python for data analysis, 46% for web development, and 41% for machine learning. The popular framework for building the APIs that agents call, FastAPI, increased in usage to 38% from 29% in the year prior.

Sources: Python Developers Survey by the Python Software Foundation and JetBrains; JetBrains PyCharm blog.
Four Practical Reasons Teams Pick It
- From data to deployment in one language: JetBrains outlines the typical Python journey: pandas and NumPy for data wrangling, scikit-learn and Hugging Face Transformers for modeling, FastAPI or Flask for serving and vLLM for inference serving. Agent developers can build their toolsets, orchestration and evaluation scripts without language switching.
- SDKs from vendors: Microsoft, OpenAI, Google, and Anthropic each provide a Python SDK for agents (see Table 3), so switching from one provider to another seldom involves a language switch.
- For the majority of agent code, it’s integration: Calling APIs, validating inputs, logging results, and retrying failures compose much of the agent code. Python is great at writing that kind of glue code.
- Concurrency is on the rise: Since agents are spending most of their time waiting on models and APIs, that is a perfect use case for async. Also, the next major Python release (3.14), out October 7, 2025, made free-threaded builds an officially sanctioned option (under PEP 779), albeit not a default installed build.

The Python Agent Stack in 2026
Anatomy of a Production Agent
Whether or not it follows this template, it’s essentially the same story. Something initiates a run, a planning/model selects an action, tools execute it, and output is fed back to the model until the task is finished.
Underneath are three layers – state, to enable the agent to pick up where it left off; guardrails, to restrict its behavior; and tracing, to record its actions.

Framework Comparison
Selecting a framework is not as crucial as it was a year ago. Microsoft has combined AutoGen and Semantic Kernel into a unified Agent Framework, which attained 1.0 for Python and.NET on the 3rd of April, 2026, while LangChain and LangGraph have matured into stable 1.x releases.
| Framework | Languages | Suited to | Worth knowing |
|---|---|---|---|
| LangGraph | Python, TypeScript | Workflows that need explicit state and replay | Checkpoint persistence, interrupts and state history; stable 1.x line |
| CrewAI | Python | Role-based teams of agents inside controlled workflows | Crews handle collaboration and Flows control execution; MIT license |
| OpenAI Agents SDK | Python, JavaScript / TypeScript | A quick path to a working multi-agent setup | Handoffs, guardrails, sessions and tracing; works with 100+ other LLMs |
| Microsoft Agent Framework | Python, .NET | Microsoft-stack teams and AutoGen or Semantic Kernel migrations | 1.0 in April 2026; sequential, concurrent, handoff, group chat and Magentic-One patterns; A2A and MCP support |
| Google ADK | Python, Java | Code-first agents deployed on Google Cloud | Python 1.0 in May 2025; model-agnostic though tuned for Gemini; A2A integration; Cloud Run or Vertex AI Agent Engine deployment |
| Claude Agent SDK | Python, TypeScript | Agents that read files, run commands and edit code | Same tools and agent loop as Claude Code; subagents, skills and plugins |
Table 3. Common Python agent frameworks and SDKs. Details come from each vendor’s own documentation or announcements.
Choosing Without Overthinking It
When you need explicit state and an audit trail
Graph tools like LangGraph and the workflow component of the Microsoft Agent Framework provide the ability to save states, allowing a session to be halted at an approval point and resumed later.
When the work looks like a team of specialists
CrewAI’s role-based structure, or handoffs in the OpenAI Agents SDK, correspond well with multi-stage processes such as researching, drafting, and reviewing.
When you’ve already committed to a cloud or model provider
Begin with the vendor’s own SDK-it generally offers the easiest integration with that vendor’s own environment, tracing, and model support.
No matter which one you select, isolate your business logic and utility functions in Python modules apart from the framework, to keep your future migrations cost-effective.
Shared Standards: MCP and A2A
Most of the interoperability is being done by two standards. The first is Model Context Protocol (MCP), which Anthropic open-sourced in November 2024 and which defines a standard for connecting an AI app to tools and data, and donated on December 9, 2025, to the Agentic AI Foundation (a Linux Foundation fund co-founded by Anthropic, Block, and OpenAI).
The Linux Foundation reported more than 10,000 MCP servers published at that time. The second was Agent Skills, which Anthropic donated in October 2026 to the same Agentic AI Foundation.
The Agent2Agent (A2A) protocol from Google defines how agents communicate with one another, and there is a native Python SDK available for A2A. The practical benefit to this is that a single tool server implementation can support agents developed on various frameworks.
Where Python Agents Are Delivering Value
Common Use Cases
LangChain’s State of Agent Engineering (1,340 responses, collected from November to December 2025) found customer support (27%) to be the number one most common agent use case, followed by research and analysis (24%) and internal productivity (18%).
According to McKinsey’s 2025 survey, the most common scaled agent uses in tech are software engineering (24%) and IT (22%). It’s worth remembering that LangChain is a framework vendor and therefore its sample is biased toward those already building agents.
| Function | What the agent does | Python building blocks |
|---|---|---|
| Customer support | Triages tickets, drafts replies, updates the CRM | FastAPI webhooks, vector search over help content, CRM client libraries |
| Finance and operations | Reconciles invoices, flags anomalies, prepares reports | pandas, SQLAlchemy, scheduled jobs |
| Research and analysis | Gathers sources, summarizes, compares options | LLM SDK, search tools, document parsers |
| IT and engineering | Triages incidents, proposes and tests fixes, updates docs | Coding-agent SDKs, CI integrations |
| Sales and marketing operations | Enriches leads, drafts outreach, keeps the pipeline current | API clients, templates, approval queues |
Table 4. Illustrative examples, not survey data.
Coding Agents and the Build-or-Buy Question
In McKinsey’s 2026 survey, there is a relevant data point for Python teams. Approximately 32% of respondents stated that they had opted not to purchase at least one software product or feature as they were able to build it internally with agentic coding tools.
Approximately two out of ten respondents are scaling coding agents, the number being 31% among larger enterprises.
Estimates from Gartner dated July 2026 are in line with this. Up to $234 billion in enterprise applications expenditure by 2030 – what it terms “agentic arbitrage” – or roughly 20 percent of enterprise SaaS spend, is at risk as agents get work done across apps without users needing to log in to each one.
What Slows Agent Projects Down
Quality Comes Before Cost
A similar report from LangChain, based on a survey of their community, found that 57% of respondents had deployed agents into production (67% at organisations with over 10,000 employees), while 32% cited quality (accuracy, relevance and consistency) as their biggest challenge, and cost was less of a concern than last year.
Security was the second biggest challenge at 25% for large enterprise respondents. As these are self-reported data from a vendor community, they are better considered as signposts than as industry standards.
One observation from the LangChain report is that whilst some 89% had implemented observability for their agents, only about 52% were carrying out offline evaluations.
Security Is an Engineering Task
OWASP unveiled its Top 10 for Agentic Applications on December 9, 2025, with contributions from more than 100 experts from across the sector.
Three of the identified risks arise in nearly every single agent project. Controls in the righthand column represent best practice for Python codebases and are not extracted from the OWASP documentation.
| Risk (OWASP) | What it looks like | Control to build in |
|---|---|---|
| ASI01: Agent Goal Hijack | Instructions hidden in an email or document redirect what the agent does | Treat retrieved text as untrusted data; require approval for actions triggered by outside content |
| ASI02: Tool Misuse and Exploitation | A legitimate tool is used in a harmful way, such as a bulk delete | Narrow tool functions, validate arguments with typed models, add rate limits and dry-run modes |
| ASI03: Identity and Privilege Abuse | The agent runs with broader credentials than the task needs | Scoped, short-lived credentials per agent; log every call with the agent’s identity |
Table 5. Three OWASP agentic risks and practical controls.
Trust Is Conditional
Developers are understandably cautious. A Stack Overflow 2026 survey found 66% of coders use code assistants or code agents and 26.2% use automated agent workflows; only 6.6% claim to trust AI with their high-stakes decisions, and nearly half trust AI only if they can check its output.
Just 24% of respondents say their employer has published approved tools or an official AI policy.
A Practical Rollout Plan
None of this is a case against agent development. It’s a call for agent development with intention.
Gartner’s position is that one should develop agentic AI only in cases where there is obvious value, and rather than simply layering agents over existing technology, one should rethink workflows from scratch. A recommended order of operations is:
- Select a single workflow that has a concrete metric associated with it. Cost per ticket, hours per report, time to resolution; without a baseline you can’t judge whether the agent is of any help.
- Ascertain if you actually require an agent for that workflow. If the sequence of steps never change, a script will suffice.
- Define an agent scope, and pick a narrow one. Give it a small set of capabilities in its least-privilege form, and if there are multiple systems that need the same functionality, expose it via an MCP.
- Before going live, assemble an evaluation dataset. Gather actual queries with an associated correct response, and use this dataset to benchmark changes to prompts, models and tools.
- Maintain a human in the loop, especially for agents capable of effecting irreversible changes, such as making payments, permanently deleting data or sending out emails to external addresses.
- Track cost per completed unit. Since one in five McKinsey respondents say operating costs already cap their AI adoption, measuring it early is key.
What to Expect Through 2028
- Priority on results, not assistants: According to a forecast by Gartner in April 2026, by 2028, more than half of all organizations will discontinue spending on assistants like copilots and instead opt for platforms offering guaranteed results in their business processes.
- Less bulky interfaces: A third of all interfaces could shift from native applications to agentic front ends in 2028, says Gartner.
- Lowering the number of protocols and increasing the number of shareable ones: Microsoft merged two frameworks into one, while both MCP and Agent Skills are now governed in a neutralized manner at the Linux Foundation.
- Operating costs and efficiencies: As McKinsey finds 20% of their survey are already hit by AI operational costs, expect increasing focus on cost per output.
Frequently Asked Questions
Do you need Python to build an AI agent?
No. TypeScript has robust libraries and Microsoft’s agent framework supports.NET. Python does have the broadest range of libraries and was the language used most by AI developers on Stack Overflow 2026, if only just ahead of JavaScript.
Is an AI Agent just an advanced RPA bot?
Not really. RPA follows strict, scripted paths and breaks if the UI changes. An agent picks steps at run-time, which makes it adaptable but also unpredictable; hence, it needs different, more sophisticated guardrails and more extensive testing.
What is a good first framework to adopt?
Pick the SDK of the model you use already. Move up to a graph-based framework once you need checkpointing, resumes, and replays.
Is it safe to hand over production environment write access to an AI agent?
No, it isn’t. Use scoped credentials, verify each tool invocation, require human approval for irreversible commands, and log all of it. As detailed in Table 5, these are the OWASP risks.
Conclusion
AI agents won’t be replacing your enterprise software next year, and the cancellation forecasts remind us that plenty of initiatives will hit a ceiling.
The trend remains obvious, however: forecasts are on the up, enterprises are graduating from pilots to rollouts, and the tool sets have stabilized to the point where you can choose a stack with confidence.
Python’s place in the narrative is unsexy but functional; it’s where data, models, APIs and vendors’ SDKs coalesce.
The winning teams will be the ones focusing on a tightly defined use-case, taking measurements, embedding security and evaluation functions from the outset, and expanding agent capabilities only when the metrics vindicate the decision.

Explore Python AI Development Services.

Pooja Upadhyay
Director Of People Operations & Client Relations
Sources
https://survey.stackoverflow.co/2025
https://www.python.org/downloads/release/python-3140
https://learn.microsoft.com/en-us/agent-framework/overview
https://openai.github.io/openai-agents-python
https://genai.owasp.org/resource/owasp-top-10-for-agentic-applications

