By Shiva Mangal, Grail Computer Labs. Published 28 October 2026.
Owning your AI agent's codebase means your organisation holds the source code, the cloud accounts it runs in, the models and prompts it depends on, and the documentation, so a third party could run and change the agent without the original vendor. Buyers usually ask what it means to own your AI agent's codebase only after a vendor has failed them. The worry is widespread: 94% of IT professionals surveyed were concerned about vendor lock-in (Parallels, 2026), though that survey covers cloud and end-user computing, not AI agents alone. We define ownership here as four layers a buyer can verify, give a test an engineer can run, and show where regulators already expect an exit path.
Key Takeaways
Owning an AI agent's codebase means holding four layers in the buyer's own name: code, cloud, models and documentation.
A signed IP assignment is not enough. Possession of repositories, billing, credentials and runbooks is what makes ownership real.
A six-step handover test, run by the buyer's own engineer, turns a vendor's "no lock-in" promise into a pass or fail result.
Regulators in Singapore and Australia already expect regulated firms to stay accountable for third-party AI and to plan an exit.
What does it mean to own your AI agent's codebase?
Owning an AI agent's codebase means the buyer holds four things in its own accounts: the source code, the cloud environment, the models, prompts and evaluation sets, and the documentation needed to operate them. Ownership is proven by possession and a tested exit, not by a contract clause. In a 2026 survey, 94% of IT professionals were concerned about vendor lock-in (Parallels, 2026).
Four distinct brass keys on a steel ring lying on a pale grey desk
Code ownership is the right to use, change and distribute the source code of a system, backed by actual access to that code. The second half matters as much as the first. A contract can say the buyer owns the code while the repository sits in the vendor's account.
Ownership is not the same as control
Owning an undocumented system is not control. If nobody outside the vendor knows how to deploy the agent, the buyer holds a legal right to something it cannot run. Documentation and runbooks therefore belong inside the definition. They let another engineer step in.
Why the definition needs four layers
A vendor can satisfy one layer and fail the others. It can hand over the code and keep the cloud account. It can give the buyer the cloud account and keep the prompts. Each gap is a place where the vendor still decides whether the agent keeps running. We treat ownership as complete only when all four layers pass.
Why does vendor lock-in follow every failed-vendor conversation?
Vendor lock-in is a dependency on one supplier that makes leaving too slow or too costly. It follows failed-vendor conversations because the buyer has just learned what that dependency costs. In a survey of 540 IT professionals, 94% were concerned about vendor lock-in (Parallels, 2026), and 57% said fears over future support play a larger role in platform decisions.
A heavy padlock closed around a chain link with a loose key lying nearby
The same survey, of IT professionals in the US, UK and Germany run in November 2025, found that 46% cited uncertain product roadmaps (Parallels, 2026). Fear of future support and fear of an unclear roadmap are both fears of being stuck with a supplier that cannot be replaced.
Lollipop chart: Vendor lock-in concern and decision drivers (IT leaders, US/UK/Germany). Highest: Concerned about vendor lock-in at 94%.
These numbers measure sentiment about cloud and end-user computing, not AI agents specifically. We use them as a signal of how buyers feel, not as a measure of agent-specific risk. The feeling is still useful. A buyer who has lived through one failed project will test the next vendor's ownership claim harder, and should.
Which four layers does a buyer need to hold?
A buyer needs to hold four layers: code (repositories and build pipelines), cloud (accounts, billing and credentials), models (orchestration, prompts, evaluation sets and API keys) and documentation (architecture notes and runbooks). Each layer has a check that passes or fails. If any layer sits in the vendor's name, the vendor still decides whether the agent keeps running.
Server rack cables labelled with blue and grey tags in a tidy data room
Agent runs in the vendor's tenancy and is invoiced as a service
Models
Orchestration, prompts, evaluation sets, model API keys
Agent keeps working after the model is swapped
Prompts and evaluations stay in the vendor's tooling
Documentation
Architecture notes, runbooks, release process, access list
A new engineer deploys from the docs alone
Knowledge lives in the vendor's team, not on paper
Models: own the agent layer, not the weights
The model layer is where buyers are most often vague. The weights of a third-party frontier model stay with its provider. What a buyer can own is the model-agnostic agent layer: the orchestration, prompts, tool definitions and evaluation sets that decide how the agent behaves, written so the underlying model can change.
Buyers already hedge against model dependency. Only 8% of respondents use a single model provider, and 24% use five or more (Stacklok, 2026). The survey covered 520 technical leaders at North American enterprises with 500 or more employees, fielded in September 2026 by Dimensional Research. Half use two or three providers.
Horizontal Bar chart: How many model providers enterprises use. Highest: Two or three providers at 50%.
Scale changes the picture. Among companies with more than 10,000 employees, 37% run five or more providers, against 12% in the 500 to 2,500 range (Stacklok, 2026). Integrations follow the same pattern. Of enterprises running five or more models, 76% have built integrations to internal systems or MCP servers, against 42% of those on one or two providers (Stacklok, 2026).
Model Context Protocol (MCP) is an open protocol that lets AI agents connect to tools and data sources through a standard interface. Integrations built on open protocols travel with the buyer. Integrations built on a vendor's proprietary connector do not. Stacklok argues that lock-in lives in the agent layer rather than the model. That is a vendor's argument, so test it against your own stack, but the logic holds.
How can a buyer test a vendor's ownership claim?
A buyer tests a vendor's ownership claim by running a handover test with the company's own engineer, not by reading the contract. A third party builds and deploys the agent from a fresh clone, every key can be rotated, and the agent keeps working after the model is swapped. That last test is realistic: only 8% of enterprises use a single model provider (Stacklok, 2026).
An engineer's hands typing a command on a laptop in a small meeting room
Why a signed IP assignment is not enough
An IP assignment is a contract clause that transfers intellectual property rights from the builder to the buyer. Without one, the party that wrote the software may keep the rights, depending on the jurisdiction. With one, the buyer still needs possession. An assignment does not stop a vendor from holding the admin credentials, the billing relationship or the only copy of the runbooks. A lawyer checks the assignment. An engineer checks possession.
Run the six-step handover test
A handover test is a pass or fail exercise in which the buyer's own engineer proves the agent can be built, run and changed without the vendor. Run it before the final payment, not after.
Clone and build. An engineer who has never seen the project clones the repository and builds it using only the documentation. Pass: the build finishes green.
Deploy to a clean environment. Deploy into a cloud account the buyer controls. Pass: the agent runs and passes its tests without vendor credentials.
Rotate every key. Replace all API keys, tokens and secrets. Pass: the agent works and the vendor's old keys no longer do.
Swap the model. Point the agent at a different model through the buyer's gateway. Pass: the evaluation set still runs and the results are readable.
Check the bill. Confirm cloud and model usage is invoiced to the buyer's organisation. Pass: no vendor-resold usage sits between the buyer and the provider.
Make a small change. The engineer changes one prompt and one tool, and releases it. Pass: the change ships without the vendor's help.
Our data: Grail Computer Labs' case study of an Australian healthcare platform shows what a transferable codebase looks like in practice. The platform had been stuck in development for 8 months. GC Labs inherited 1.5 million lines of code and rebuilt it, and the platform went live in production within 30 days. By day 40, 100 business customers had been onboarded.
A codebase one team can inherit is a codebase someone documented and handed over. GC Labs applies a 10-point vendor handover checklist so that a client can exit cleanly. The six tests above are a general method any buyer can run, not a reproduction of that checklist.
What do regulators expect from AI vendor exit arrangements?
Regulators in Singapore and Australia expect regulated firms to stay accountable for the AI they buy and to be able to leave a provider. The Monetary Authority of Singapore said in October 2026 that "FIs remain accountable for AI used in the services they deliver" (MAS, 2026). Australia's APRA expects substitution, portability or exit arrangements for critical AI providers to be assessed.
A printed policy document with a pen resting on a highlighted paragraph
FIs are financial institutions. MAS issued its final Guidelines on AI Risk Management on 7 October 2026. They say institutions should consider limiting, suspending or replacing a service whose risk cannot be brought within appetite. A firm cannot replace a service when it does not hold the code, cloud and documentation.
Organisations stay legally accountable for agents, built in-house or by third parties
Who holds the agent's logic, permissions and logs?
APRA's letter was part of a wider push. In its words, "APRA has called for a step-change in how banks, insurers and superannuation trustees manage AI-related risks" (APRA, 2026). A law-firm analysis says contracts now need change notices, audit rights and termination or portability terms, and notes alignment of key AI providers to CPS 230, APRA's operational risk standard that treats them as material service providers. CPS 230 took effect on 1 July 2025 (MinterEllison, 2026).
Singapore's Infocomm Media Development Authority (IMDA) launched its Model AI Governance Framework for Agentic AI on 22 January 2026. It is voluntary, but organisations remain legally accountable for their agents, and it applies whether the agents are built in-house or by third parties (Bird & Bird, 2026). None of this is legal advice. It shows the direction: an exit plan a team can actually run is becoming a supervisory expectation.
Who is this not for, and what does ownership not give a buyer?
Owning an AI agent's codebase does not give a buyer every asset the agent touches. The weights of third-party frontier models stay with their providers, and a vendor may legitimately keep reusable background tooling under a licence. Only 8% of enterprises rely on one model provider (Stacklok, 2026), so owning the agent layer matters more than owning weights.
The limits are worth writing into the contract before work starts:
Background IP stays with the vendor.Background IP is the reusable code, tools and know-how a vendor owned before the project began. Ask for a permanent licence to anything the agent needs to run.
Frontier model weights stay with their providers. The buyer owns the agent layer around them, and its evaluation sets show whether a replacement model performs.
Ownership is not the same as doing the work. Most teams do not want to become the implementation team. Ownership gives leverage and an exit, and continuous delivery from a partner can still do the building.
A legal right that cannot be exercised is weak. If the buyer's team cannot read the documentation, the handover test fails at step one. That is useful information.
Frequently Asked Questions
Do I automatically own the code if I pay a vendor to build my AI agent?
No. Payment alone does not transfer ownership. In many jurisdictions the party that writes software keeps the rights unless the contract assigns them to the buyer. Even with a written assignment, the buyer still needs possession: the repositories, cloud accounts, credentials and documentation in its own name. A lawyer checks the assignment and an engineer checks possession.
Who should hold the cloud account, repository and model API keys during an AI agent build?
The client should hold them from day one. The cloud account, the source repository, the billing relationship and the model API keys should all sit under the client's organisation, with the vendor given scoped access. Nothing then needs transferring at the end, and the client can revoke access at any time.
Can I swap the underlying LLM without rebuilding the agent?
Yes, if the agent layer is model-agnostic. Prompts, tool definitions, evaluation sets and integrations must live in the client's repository and call models through a gateway the client controls. Only 8% of enterprises surveyed by Stacklok in September 2026 use a single model provider, so a swap test is a reasonable acceptance criterion.
Does the client own the code and models after an engagement with Grail Computer Labs?
Yes. With Grail Computer Labs, the client owns the code, cloud, models and documentation, and there is no vendor lock-in. GC Labs also applies a 10-point vendor handover checklist so that a client can exit cleanly. The handover test in this guide is a general method any buyer can run on any vendor.
Conclusion
Ownership is something a buyer can check, not something to take on trust. Five points to keep:
Define ownership as four layers: code, cloud, models and documentation.
Treat a signed assignment as necessary but not sufficient. Possession is the proof.
Run the six-step handover test with your own engineer before the final payment.
Own the agent layer and its evaluation sets, and accept that frontier model weights stay with their providers.
If the firm is regulated, keep an exit plan it can run, because MAS, APRA and IMDA all expect accountability for third-party AI.
If a vendor has already let your team down and you want to see what an inheritable, documented codebase looks like, Book a call ↗ and we will walk through your current setup against the four layers.