Skip to content
AgentLabs.

Choosing an AI Agent Framework Without Technology Lock-In

Choosing an AI Agent Framework Without Technology Lock-In

AI agent frameworks: how to choose without getting stuck with the wrong technology

Does it feel as though everybody is building AI agents and nobody understands what happens inside?

Browse the web today, particularly LinkedIn, and every other post seems to announce: “We launched a new AI agent that manages the entire sales process” or “We developed a revolutionary AI agent framework.” Ask a simple question, such as what it runs on, how it is built or what happens if you want to change models, and the answers suddenly become vague. Whether building a product, a start-up or an internal company project, choosing an AI agent framework is more than another technology decision. It is almost a statement of intent. A poor choice today can quickly backfire: you become locked to a particular provider, the architecture turns monstrous and the team spends more time adapting code to the chosen framework than solving the business problem. Let us pause, unpack the hype and discuss AI agents more calmly, like a corridor conversation between two experienced developers, or one product manager trying to understand why the demo does not work.

Before jumping to a framework, what is an AI agent?

One problem begins here: agent has become a marketing word. In practice, an AI agent can mean anything from one language model API call to a complex system of dozens of processes, rules, memory and tools that do things in the real world.

The practical definition: AI agents for people who do not need a thesis

Set academic definitions aside and consider practice. When a company says it is building an AI agent, it usually means one or more of the following: - A component receives input, such as text, a request or data. - It thinks using a large language model, an LLM, or a combination of models. - It receives access to tools: an internal API, database, CRM or code running behind the scenes. - It records context and learns, at least partly, from previous interactions. - It returns an answer or even carries out an automatic action. The AI agent framework attempts to organise this complexity: managing flow, connecting tools, handling memory, security, state management, scheduling, monitoring and more.

Why do we need a framework? Can we not simply write code?

You can, and many do. Initially it even looks excellent: a few calls to OpenAI's API, some Python logic, perhaps Redis, and we are underway. The problem begins when somebody innocently asks: “Can the agent remember what I did last week?” or “Can it choose whether to talk to the database or retrieve information from Google Drive?” At that point, without noticing, you have built your own little AI agent framework, without documentation, a community, support or time for a serious comparison with alternatives. This is where the real discussion begins: which framework, when to choose it and, above all, how to avoid a choice that traps you for years, rather than whether a framework is needed.

The big trap: choosing an AI agent framework by the coolest demo

A demo is easy. Maintaining a reliable, maintainable system is another matter.

What actually happens when you choose too early?

A classic scenario I have seen more than once in Israel: 1. An R&D team needs to experiment with AI agents. It chooses a fashionable framework that all the bloggers discuss. 2. A quick proof of concept looks phenomenal. The framework works magic behind the scenes: handling chain-of-thought, scheduling tools, connecting the LLM and retaining memory. 3. The project enters production. Small questions suddenly arise: - How do we change LLM providers? - Where exactly are logs stored? - Why can the agent not be checked with normal unit tests? 4. Six months later, the team is tied to that framework's architecture. A small change requires rewriting half the code. These things do not initially seem dangerous. “We will change it later.” “We will solve it when we get there.” But an AI agent is not a UI library that can be replaced in a day. It sits deep in the logic, sometimes very close to the business core.

How do you recognise a framework threatening to lock you in?

Several irritating signs recur: - **A heavyweight DSL**: the framework requires its own language for defining agents instead of ordinary code. - **Monolithic design**: one system attempts to solve everything without allowing a single layer to be used independently, such as memory or orchestration alone. - **A lack of transparency**: there is no real control over flow; you must believe the agent makes correct decisions from configuration. - **Missing tests**: no easy way to run unit tests on AI agent logic is a warning sign. If you cannot explain what happens under the bonnet without reading twenty configuration files, something is wrong.

How should you choose an AI agent framework? Beyond slogans

Writing “Choose an open, flexible framework with a community” and going home is not enough. Everybody writes that. It does not really help when deciding between LangChain, Semantic Kernel, OpenAI's assistants, an internal framework or something entirely different. Instead, consider several real dimensions: technical depth, control, development speed and future adaptability.

First dimension: how well do you understand LLMs and orchestration?

A technically strong team with a deep understanding of context windows, tokenisation, fine-tuning, vector stores and all those intimidating words has more freedom. You can choose a relatively thin AI agent framework providing mainly glue code and utilities, then write the rest yourself. A team less immersed in LLMs day to day, or a traditional information systems team with little ML experience, may benefit from a framework handling more of the operation. Even a less experienced team, however, should resist a magical system that makes it entirely dependent on a supplier.
A small golden question
Ask yourselves: if the AI agent framework disappeared tomorrow, how quickly could you replace it? - “In a day or two” is a good position. - “I have no idea” means pause: something is unhealthy.

Second dimension: are you building a product or a one-off pilot?

There is an enormous difference between “Let us make an investor demo” and “We are building a new product line around an AI agent.” - **For a short pilot**, a heavier framework, perhaps even tied to a particular cloud provider, can be acceptable if it accelerates progress. - **For a real product**, keep three separate layers in mind: 1. Business logic: what your agent is supposed to do. 2. The integration layer connecting the LLM and tools. 3. The AI agent framework itself: the orchestrator. The more mixed these layers become, the harder changing one thing becomes without everything collapsing.

Third dimension: vendor lock-in versus flexibility

Some frameworks are effectively extensions of a particular cloud service, such as an Assistant API or SaaS AI agent platforms. They offer a highly convenient experience, but the flexibility cost may surface later: - Moving to a competing LLM is difficult. - Sometimes full access to data and logs is unavailable. - Security and regulation mean some environments simply cannot use them. At the other end are more open frameworks able to work with several providers and even local, self-hosted models. Sometimes configuration is more complex, but they preserve the most important thing: freedom to move.

The Israeli reality: showing something quickly while thinking ahead

Like it or not, Israeli culture says: “Come on, show me something running.” Start-ups must impress investors; large companies must demonstrate to management that they too are working with AI agents, no less than their competitors. Many AI agent projects therefore begin as improvisations. That is not necessarily bad; innovation comes from there too. The problem is that a successful demo very quickly becomes the basis of a product.

The agent that grew too quickly

An Israeli company, anonymised here but a real story, built an AI agent guiding customers through opening an account. Initially it was a fairly simple bot with a few prompts, connected to GPT's API. Somebody recommended a popular framework for managing agents, and the team rushed to adopt it. Six months later: - All business logic sat inside complex framework configurations. - Every attempt to change a business process required understanding layers of poorly documented magic. - Moving to another LLM provider required a painful migration. The team seriously considered writing its own internal AI agent framework, but it was already too late: thousands of lines of code depended on the current operating model. The lesson is not “Do not use a framework.” It is to treat the framework as a substantial infrastructure dependency from the outset, like choosing a database rather than a CSS library.

Key questions before choosing an AI agent framework

To avoid losing ourselves in detail, here are questions worth actually writing on a board before implementation:

1. How do I test my agents like ordinary code?

If your AI agent is a black box that is difficult to test, you have a problem. Ask: - Can I write unit tests that pass through the framework but check my own logic? - Can I simulate LLM responses through mocking, or at least fix responses for testing? - Does the framework provide AI agent evaluation tools, such as automatic quality checks and A/B testing?

2. What happens if I want to change LLMs?

Most teams begin with one model, such as GPT-4, and only later realise that cost, privacy or performance require something different. Check: - Does the framework provide an abstract LLM interface that is easy to replace? - How many places in the code must change when a model changes? - Can some of the AI agent also run on local models, for example for internal tests, an on-premises environment or regulatory requirements?

3. Who controls the agent's memory?

Memory is a major pain point. Some frameworks provide a magical memory layer with embeddings, rules and everything else. That is pleasant until it must be aligned with an information security policy, GDPR or internal classification requirements. Ask: - Where is memory stored, in which database and which physical location? - Can I replace the vector store or database layer with my own solution? - Can information be forgotten in a controlled way, such as deletion requests or expiry?

4. What happens in production, rather than the demo?

An AI agent running on a laptop is pleasant, but what about: - Observability: can I see detailed logs of the routes the agent chose? - Tracing: which tools were called, in which order and with which parameters? - Security: are there clear mechanisms for access restrictions, permission logs and separating sensitive data? A framework without a serious production story is, at most, a toy, even if marketed otherwise.

Table: the main considerations when choosing an AI agent framework

CriterionWhat to askWhy it mattersWhat could go wrong
LLM provider flexibilityCan a model or provider change without rewriting the whole system?Prevents technological lock-in and allows cost and quality optimisation.Sharp cost increases, technical migration difficulties and development delays.
Testing and reliabilityAre unit tests, mocking and evaluation supported?Enables maintenance, controlled regression testing and consistent agent improvement.A fragile system, mysterious failures and “It works on my machine.”
Flow transparencyDo I understand what the agent does at every stage? Is observability available?Enables debugging, optimisation and explanations to customers and managers.A black box that is difficult to trust, particularly in large organisations.
Memory and data managementWhere is information stored, and how can the memory layer change?Regulatory compliance, privacy and appropriate data scaling.Data trapped in a closed system, security risks and regulatory risks.
Community size and supportAre there regular updates, documentation and active forums?Shortens the learning curve and prevents tackling bugs alone.A framework that ages quickly, dependent on one or two teams.
Separating business logic from the frameworkHow difficult is separating business code from orchestration?Enables rewriting, framework migration and product flexibility.A system difficult to change, explain or transfer between teams.
On-premises and cloud suitabilityCan parts also run in closed or hybrid environments?Critical for defence, financial and other sensitive organisations.Inability to deploy where needed, leaving an eternal pilot.

An AI agent is architecture, not magic

Sometimes there is a feeling that feeding an LLM a good prompt is enough and it will do the rest. In reality, a good AI agent is a harmonious architectural system combining several layers, each of which must be understood.

Core layers worth considering in advance

As a framework for thought rather than a rigid recipe:
The interaction layer
This is where users encounter the agent: chat, an API, a user interface or an integration with a third-party tool. Framework choice should not spill too far into this layer. If your entire UI is tailored to highly specific capabilities of a particular AI agent framework, that is a warning sign.
The decision layer: reasoning and orchestration
This is where the AI agent framework plays a major role, helping manage: - When to call the model. - When to invoke a tool. - How to chain several steps. - How to handle failures. The more this layer is written in your own code, rather than solely configurations or a closed DSL, the more long-term power you retain.
The models themselves
The LLM, embedding modules and perhaps specialist models for images or audio. Ensure the framework permits replacing, extending and combining models. AI agents are advancing at an extraordinary pace; what is state of the art today will look entirely different in a year.
The data and memory layer
The biggest dramas hide here. Questions include: - Does the agent need to remember every interaction? - What is the scope of short-term memory, or context, versus long-term memory? - How are organisational information sources connected securely? A good AI agent framework helps, but does not answer these questions for you. It must therefore let you change the memory model without bringing everything down.

Frequently asked questions about AI agent frameworks

Do we really need a framework, or can we keep a little code?

The short answer depends on your horizon. For a small proof of concept or one-off project, manually written code, perhaps with a few lightweight helper libraries, can suffice. If you know there is a product direction, a core organisational process or something intended to grow, choosing an AI agent framework is preferable, but do so consciously. It should be an infrastructure layer that can theoretically be replaced, not the business core.

Is a large, all-inclusive framework preferable to something minimal?

As with many software questions, the answer lies in the middle. A giant framework trying to do everything can accelerate early progress, but create lock-in and limited flexibility. An excessively thin glue layer, conversely, requires substantial repetitive code. The guiding principle: - Let the framework handle orchestration, tool connections and basic memory management. - Keep business logic and higher-level decisions in your own code.

How do we know our AI agent is production-ready?

There will never be a point of 100% readiness, but healthy signs include: - Automated or semi-automated tests running representative scenarios. - The ability to explain, at least at a high level, how the agent makes decisions. - Monitoring of model calls, errors and performance. - When a teammate asks “What happens if X?”, there is a way to test rather than merely guess.

What about costs? Can a framework make the project more expensive?

Sometimes yes, sometimes the opposite. A good framework can save money by managing context, reducing unnecessary LLM calls and enabling optimisation. A provider-locked solution, particularly without convenient context limits or optimisation support, can become very expensive over the long term. Again, the right questions are: do I have control? Can I easily change model usage policy without breaking half the system?

Is there one winning framework we should choose?

Not really. The AI agent framework market is still taking shape. What looks like a de facto standard today may disappear within two years or become one layer in a larger ecosystem. The principle matters more than the particular name: - Layer separation. - Transparency. - Testing. - Replaceability. A framework enabling all four already puts you in a good position.

How to avoid getting stuck with the wrong technology

A ready-made solution that looks magical is tempting, particularly with pressure to show results, investors on the line or management asking for AI everywhere. But an AI agent is not a gimmick. In many organisations, it becomes part of business infrastructure, from service systems through operational automation to internal developer tools. Choosing a framework therefore deserves the thinking applied to a new database, rather than a design library: - Understand what it does well and what it does not do. - Ensure you can leave it if necessary. - Keep your logic opinionated, explicit and documented, rather than buried in magic. If you are at this junction, considering how to approach AI agents, which framework to choose or even whether to build your own internal layer, we would be happy to offer an initial consultation at no cost, help map needs, weigh alternatives and build architecture you will not regret in two years.

From reading to a pilot

Choose which systems to connect to the pilot

We will assess which data the agent needs to read, which actions it should propose and where the outcome is recorded.