1/11/2026
You run a marketing, operations or IT team, and an agent project arrives with a question that divides: open building block or proprietary solution? This page is for those who have to settle that choice and defend it in front of an IT department, a security officer and a finance department. It helps you decide what an open source AI agent gives you as rights and transfers to you as obligations, and in what order to examine licences, auditability, security, model and total cost.
Opening up the building block is not an ideological gesture: it is a trade-off between what you want to inspect, what you accept operating yourself and what you will defend in a committee.
What open source gives you, and what it transfers to you
A public repository is not open source by the mere fact of being readable: what qualifies it is the rights granted by its licence. An agent built on such components remains an agent in the usual sense, one that perceives, decides and acts through tools, with rights graded according to the four permission levels of an AI agent.
Openness adds three rights, which outlive the vendor's pricing policy.
- Change the code: adapt the orchestrator, the connectors and the rules without waiting for a vendor's roadmap.
- Self-host: run the building block in your own environment, under your network and access rules.
- Audit the behaviour: read what the agent did and why, from the code and the traces.
Those rights have an exact counterpart: you gain control, but you inherit operations, the rarest skill in-house. If that load is not sustainable, validate the use in a no-code AI agent environment, then come back when its limits are reached. If the general method is still missing, what you need first is to create an AI agent; here, the agent is already designed and we decide on the building block.
First clarification: open source concerns the framework or the agentic application, not necessarily the model used. The two layers are decided, hosted and licensed separately.
Licences: framework, model, weights
One question cannot be caught up on later: are you entitled to use this component the way you intend to? An incompatible licence can only be fixed by rewriting, and the rule “the strictest licence applies to everything” is false: what is owed depends on each component and on your distribution mode.
Nothing here stands as legal advice: it is a reading grid to use before a lawyer examines your case.
Three objects, three licences that do not overlap
Three things are licensed independently, with no licence covering the others, and a fourth is added as soon as you fine-tune a model.
- The framework (orchestrator, memory layer, tool connectors) falls under an ordinary software licence.
- The model, in the sense of its architecture and its inference code, has another.
- The weights, the parameters produced by training, often have a third: downloadable does not mean usable.
- The fine-tuning datasets keep their own licence, which does not vanish into the model you obtain.
What each licence family really commits you to
Each licence family comes down to what it allows, what it demands in return and the case where it blocks you.
Your distribution mode separates these situations; name it before reading any licence. Three kinds of use cover the essentials.
Also check four points before committing development effort.
- The inventory of dependencies and their licences, transitive ones included.
- The licence of the weights, distinct from that of the model code.
- What your customer contract promises about ownership of the deliverable.
- Who decides on your side when a component changes licence along the way, which is anticipated by freezing versions.
Making execution inspectable
The right to audit produces nothing by itself: it is the instrumentation built around the code that makes a decision explainable. In a company, the question is never “does the agent work”, but “can we prove what it did, and why”.
The full film of a run
Trace the whole chain, not just the result: a run must be replayable six months later with the same explanation, from objects that are named, kept and correlated.
- Prompts and rules versioned like code: version, author, date, justification for the change.
- Decision log: the action carried out, the criterion that triggered it and the threshold crossed.
- Tools called: name, input schema, parameters passed, result, duration, errors.
- Artefacts produced kept as they stand (files, fixes, exports, answers), with the diffs of any change.
- Run identifiers correlated across all the logs, so that a task can be reconstructed end to end.
With no artefact kept, an action cannot be challenged; with no correlated identifier, it cannot be found.
What auditability requires you to keep up
This instrumentation is better budgeted than discovered. It calls for four things.
- Storage: agent logs grow fast as soon as full contexts are kept.
- A retention period decided rather than endured.
- An access policy on the logs, which often hold more sensitive data than the business database.
- Somebody who reads them: settle from go-live who reviews a sample, how often, and what triggers a full review.
Security and compliance of a stack you host yourself
Self-hosting moves the risk without removing it, and does not on its own cut off the sending of data to third parties. An orchestrator installed at your end carries on calling whatever you have plugged into it.
- A model served by API, when you do not host the model as well.
- A web search or a connector to an online application.
- A managed vector database.
- Telemetry enabled by default in a dependency.
What disappears is the sending imposed by a vendor; what appears is full responsibility for the attack surface. Treat your agentic flows as critical application flows.
- Data classification upstream and encryption, at rest and in transit.
- Network isolation, the most profitable measure: outbound blocking by default, destinations authorized one by one, logging of attempts outside the scope.
- Role-based access control and segmentation, so that the agent sees only what its task requires.
- Secrets outside the code and the prompts, separated by environment, renewed on a schedule and not after an incident.
One mechanism changes nature when you are the host: the emergency stop, which nobody else will pull for you. Plan a global kill switch, tested, reachable by people other than the agent's author, and degraded modes while the diagnosis is being made.
The security officer's question bears on the whole data chain, not on the model alone: where do the prompts, the context, the logs, the artefacts and the user identifiers reside, and who accesses them? An agent suspected of exfiltrating teams' work will not be adopted. Apply minimization: what does not enter the context does not have to be protected.
Acceptance testing, and preventing the loop
An agent is not tested once: it is evaluated continuously, because models, data and dependencies move. Acceptance testing has to prove that it does what is expected on realistic cases, and guarantee that it stops when it no longer knows what to do.
Scenarios, golden prompts and continuous evaluation
Test representative scenarios, not clean cases: dependency outages, inconsistent data, insufficient permissions, ambiguous inputs. Keep a set of golden prompts, frozen reference inputs replayed at every change of prompt, rule or model: the only mechanism that catches a regression nobody caused. Complete it in production with a sample of runs reviewed by a human.
Watch four simple metrics, each with an alert threshold and a rollback procedure written in advance: switch off a function, go back to an earlier version, escalate to a human.
- Task success rate: the share of runs that reach the expected result.
- Accuracy: how correct what the agent produces is when it succeeds.
- Latency: the time per task, from trigger to final artefact.
- Fallback frequency: the share of cases where the agent gives up, escalates or switches to degraded mode.
Why an agent loops, and what stops it
An agentic loop is an agent running without converging: it repeats actions, alternates between tools and burns budget while producing noise. Three causes dominate.
- Vague objectives: the agent does not know what success looks like.
- Unstable tools: variable responses, delays, incomplete permissions.
- Noisy feedback: it believes it is progressing because a superficial signal moves.
The guardrails answer term for term.
- A budget of actions and duration per run.
- A depth limit on planning, which forbids breaking a sub-task down indefinitely.
- A mandatory final artefact at each iteration, which makes non-convergence visible.
- A post-action check confirming the expected effect, failing which the action is rolled back or escalated.
Add human validation as soon as the action is irreversible, that is as soon as the agent goes beyond the pillar's controlled-write level. When several agents call one another, the loop can arise from their dialogue: stop rules then belong to AI agent orchestration.
The model: self-hosted or served by API
This is the decision that carries the most ideology and the least data: handle it as an engineering choice, with constraints stated and measures that settle it. An open model does not make your agent auditable.
Decide on metrics, not on a preference
Models served through an API cut integration time, but move part of the control away: data, dependencies, variable costs. Self-hosted models can offer better control of data and more predictable costs at scale, at the price of an investment in infrastructure and operations. Neither is structurally superior: it all depends on your confidentiality constraints and your volumes.
The decision is made on real metrics, latency, success rate, cost per task, and not on an ideological preference: run the same set of scenarios on both options, with your data.
Four selection criteria, and routing by task type
The model is chosen on what it has to do inside the loop, not on an impression of general quality. Four criteria are enough to eliminate most candidates.
- Context capacity: long documents, document retrieval, multi-turn exchanges.
- Tool compatibility: function calls, strict schemas, output validation.
- Multilingual: real level in French and terminological consistency over time.
- Licence: compatibility with your real use, internal, commercial or redistribution.
There is no “best model” for every task. Routing each task type (structured extraction, writing, analysis, code) to the right model often improves the cost-quality ratio, but every route imposes its own observability and non-regression tests. Keep a backup model: the day the main vendor goes down, you will find out whether you were reversible.
Deciding, and knowing what it costs
The real comparison is not “free against paid”, but a trade-off between control, security, speed to production and total cost of ownership. The risk is symmetrical: dependency and black box on the proprietary side; on the open side, an operating discipline without which technical debt arrives faster than the licence saving.
The decision is conditional: if your dominant constraint is the evidence you have to produce or where the data resides, openness is justified; if it is time to service, the reverse.
The line items of a total cost of ownership
Not paying a licence means paying internally, on lines nobody ties back to the project. Start from a cost per task, projected onto your real volumes, not the pilot's. Five line items cover the essentials.
One line is missing from this table, the most underestimated: document the human cost as well, on-call, incidents and updates included. It appears on no invoice, and yet it is what decides whether the setup is sustainable. Conversely, a proprietary solution hides those costs at first, then becomes unpredictable if billing follows usage.
Sovereignty: where the data resides, who can access it
Sovereignty is not judged on a server location, but on two questions asked for every object in the chain: where does it reside, and who can legally access it? Self-hosted, you control those answers better, provided you have written them down; proprietary, they are negotiated through contract and right to audit. A transparent vendor is worth more than an internal stack where nobody knows where it writes its logs.
Time-to-value against technical debt
If your priority is to ship fast, a managed solution shortens the path: on a limited, low-sensitivity scope, it is often the rational decision. If you are aiming for a lasting, reusable and auditable asset, the initial investment in an open building block pays off, provided you take on the discipline that comes with it.
The more your agent touches critical processes, the more expensive the dependency is to undo. The right decision balances time-to-value against the cost of control over twelve to twenty-four months, and is re-examined when the scope widens.
Continue reading
Depending on your stage, three articles take this one further.
- Your building block is chosen and now has to be wired to your systems: connections, identities and permissions belong to AI agent integration.
- You have settled the principle and are looking for which building blocks actually exist: models, vendors and automation tools are compared on an AI agent platform.
- Your agent has to answer from internal documents that will not leave your walls: chunking, retrieval and citations are the subject of the RAG AI agent.
And if the issue is not the building block but the agent itself, designed on your data and your rules, that is the scope of a personalized AI for your business.
FAQ on open source AI agents
What is an open source AI agent?
An open source AI agent is a system that perceives an input, processes it through a language model and acts through tools, built with components under an open source licence. It is the rights granted by the licence that make something open source, not the visibility of the code, and they bear on the framework, not necessarily on the model.
How does an open source AI agent work end to end?
It follows a loop: objective, planning, actions through tools, observation, iteration until a verifiable stop criterion. Its reliability comes from the structure (strict schemas, budgets, limits) and from observability (logs, traces, artefacts), far more than from the model.
Which LLMs can be used with an open source AI agent?
An open source AI agent accepts open self-hosted models as well as models served by API, provided they fit the runtime: function calls, sufficient context, reliable structured outputs. The choice is measured on your scenarios against latency, confidentiality and volume; the licence of the weights, distinct from that of the code, may restrict certain uses.
Which are the best frameworks for building an open source AI agent?
The best framework is the one that matches your observability requirement, your integrations and your operational maturity, not the one at the top of a ranking. Judge it on the traces produced without additional development, the exposure of tools under a strict schema, the handling of budgets and stops, the licence and reversibility.
How do you architect an open source AI agent so that it is observable and auditable?
An observable agent traces the whole chain of every run: versioned prompts, decision log, tools called with their parameters, artefacts and the diffs of any change. Run identifiers correlated across the logs make it possible to reconstruct a task, and human validations frame the risky actions.
Which reliability tests should be set up for an open source AI agent?
Reliability is proven through representative scenarios, outages and inconsistent data included, a set of golden prompts replayed at every change, and a sample of runs reviewed in production. Four metrics are watched, success rate, accuracy, latency and fallback frequency, each with an alert threshold and a rollback procedure written in advance.
How do you prevent agentic loops in an open source AI agent?
A loop is prevented first through measurable objectives and verifiable stop criteria, because it almost always comes from a badly defined notion of success. Add budgets of actions and duration, a depth limit on planning and a mandatory artefact at each iteration, then validations before and after the action and human escalation outside the normal scope.
How do you choose between an open source AI agent and a proprietary AI agent?
The choice is made on four axes: total cost of ownership, sovereignty and confidentiality, speed to production and the need for auditability. When control and compliance dominate, openness is justified, provided you take on the operations and check the licences. When the goal is a quick result on a limited scope, a proprietary solution makes sense, provided you assess dependency and reversibility.
.png)
.jpeg)

.jpeg)
%2520-%2520blue.jpeg)
.avif)