Local AI Guy Collingwood · Ontario Book a 15 minute call
Playbook

Playbook · who owns your ai agent code

Who owns your AI agent code? In Ontario, the person who wrote it, until you sign

A contractor who builds your AI agent owns the code until a signed assignment moves it to you. What you can own, what you license, and what to put in writing.

Lasse Pettersen

Laptop showing lines of code on a wooden desk beside a steaming mug, with a snowy backyard visible through the window.

The person who wrote the code owns it, unless they are your employee or they signed a written assignment to you. That is the default under Canada’s Copyright Act, and it applies in Ontario whether the developer works in Toronto or Thunder Bay. A consultant who builds your AI agent owns the code until the contract moves it. Paying the invoice doesn’t. You can never own some parts, such as the model. Nobody may own other parts. The contract and the accounts decide what you actually hold.

This is the reading the AI consultant NDA basics post set aside for the service agreement. The NDA keeps your information private. This is the other half. Is the thing you paid for yours when the work ends?

The default rule, and the exception that does not cover contractors

The Copyright Act treats a computer program as a literary work, so the code behind an agent is protected the same way a book is. Section 13(1) says the author is the first owner of the copyright.

Section 13(3) gives ownership to the employer when the author is an employee and wrote the work in the course of the job. The wording is a contract of service, which is employment. An outside consultant or development firm isn’t normally your employee. The exception doesn’t reach them, and without an agreement the author keeps it.

Section 13(4) says how ownership moves: an assignment is not valid unless it is in writing and signed by the owner of the right. A verbal “it’s all yours” doesn’t meet that test. A clause in a signed agreement does.

One more right doesn’t travel with the code. Moral rights, which include the right to be named as the author, cannot be assigned under section 14.1(2). They can be waived in whole or in part. I’d ask for a waiver clause next to the assignment.

An agent is five things, and you can own only some of them

“The code” sounds like one file. It isn’t. An AI agent for a small business is closer to five pieces. Each one has a different answer.

PieceWho owns it by defaultWhat to get
Code, configuration and prompts written for youThe authorA signed written assignment to your business
The consultant’s reusable library or templateThe consultantA written licence that lets you use, change and keep it running
The model it callsThe providerNothing to own. Run it on an account in your name
The workflow platform or hostingThe vendorA subscription in your name, not the consultant’s
Your documents, rules and transcript logYou, alreadyCopies in a place you control, and a retention rule

Why is “Do I own the code?” too narrow a question? Only the top row is code written for you. The rest is licensed, rented, or yours already.

The account decides more than the contract

Model providers write their own terms about outputs, and those terms are an agreement with whoever signed up for the account. Anthropic’s commercial terms, for example, say that the customer owns its outputs and that Anthropic assigns to the customer its right, title and interest, if any, in them.

If the agent runs on your consultant’s account, the consultant is the party to those terms. If it runs on yours, you are. The same goes for the workflow platform the agent uses to read your calendar or write into your CRM. When a supplier holds those accounts, moving to another supplier can mean a rebuild.

Your documents and transcripts were never theirs

The document set an agent is grounded in is your return policy, your service area, your price list. You owned that before anybody started. The transcript log is different. It holds what customers typed or said, which is personal information.

PIPEDA expects a business to protect all the personal information it holds. That duty stays with you when an outside firm processes the log for you. Owning the log matters less than controlling it. Where is it stored? Who can read it? When is it deleted? How that works with AI tools is set out in how PIPEDA AI compliance works in Canada.

Code that a model wrote

Some developers use AI coding tools for part of a build, so ask whether yours does. It raises a question Canadian law hasn’t settled.

The federal consultation on copyright in the age of generative AI says Canadian case law suggests authorship must be attributed to a natural person who exercises skill and judgment. It adds that a human may contribute enough to be the author of an AI-assisted work. It says this is far less probable for works produced by generative AI from short instructions. The government is still considering whether the Act fits these works.

The practical point is simple. Copyright may not protect every line of your agent. Don’t make it your only protection. Get the assignment for whatever rights exist, and get possession of every file. I think a business that holds the files, the prompts and the accounts is in a far better position to keep the agent running. That holds whatever is later decided about authorship.

What the agreement should say

You don’t need a long contract. You need a few sentences in the service agreement. Read them before the build starts, not at handover.

  • An assignment. Code, configuration, prompts and documentation written for your business are assigned to your business, in writing, signed by the consultant or their firm.
  • A moral rights waiver. Next to the assignment, in the same document.
  • A licence for their reusable parts. Use, change and run forever for your own business, surviving the end of the engagement and any dispute about fees.
  • Accounts in your name. The model provider, the workflow platform, the hosting and the phone number, billed to your card.
  • A delivery list. What you receive at handover, named file by file, with the date it arrives.
  • Delivery tied to payment stages. Each payment releases the files built so far, so a dispute near the end does not cost you everything built before it.

If a supplier won’t assign code built only for your business, ask why. A supplier may offer to keep ownership and grant a broad licence instead. I’d accept that only if the licence is perpetual and can’t be withdrawn. It’s a commercial point to read, not an automatic red flag. A blank where ownership should be is the problem.

A quote that leaves ownership out isn’t cheaper. It’s incomplete. Ownership belongs in the same row as the price. That is one reason the method for how to compare AI consultant quotes puts every quote in one table first. Two quotes with the same total can leave you holding very different things.

Possession is the test

Here is a check for handover. Could another developer keep the agent running next month without calling the person who built it? If yes, you own what matters. If no, the paperwork isn’t finished, whatever the contract says about copyright.

On this site, AI agent development across Ontario is priced at $4,000 to $15,000 per agent, plus a monthly running cost usually between $80 and $600 depending on volume. The handover list on that page covers the accounts, the document set and the transcript log, which are three of the five rows in the table above. Whoever you hire, ask for all five in writing.

Agents aren’t a niche purchase any more. Statistics Canada counted virtual agents and chatbots as 28.2% of AI use among Canadian businesses in the second quarter of 2026. The cheaper time to find out who owns yours is before the build starts. The costly time is the day you try to change supplier.

I’m not a lawyer, and this isn’t legal advice. The assignment and licence clauses are worth an hour of an Ontario lawyer’s time before you sign. They decide what you hold for the life of the agent.

Questions on this

If I paid for the AI agent, do I own the code?

Not automatically. Under the Copyright Act the author is the first owner, and the exception that hands ownership to the business covers employees. An outside contractor is normally not one. Paying the invoice does not move copyright. A written assignment signed by the owner does, so ask for one in the agreement before the build starts.

Can I own the AI model my agent runs on?

No. The model belongs to the provider and you use it under their terms, the same way you use your accounting software. What you can control is the account it runs on. If the account is in your name, you are the party to the provider's terms, and changing consultants does not mean rebuilding.

Who owns code that an AI tool wrote?

Canadian law has not settled it. The federal government's consultation paper on copyright and generative AI says authorship has been tied to a natural person using skill and judgment, and that a short instruction to a generative tool is far less likely to meet that bar. Do not lean on copyright alone. Get the assignment in writing and keep a copy of every file.

What if the consultant reuses parts of the build for other clients?

That can be reasonable for general tools, such as a library for connecting to a calendar. Ask for a written licence that lets you use, change and keep running those parts for your business, forever, even after the engagement ends. The parts built only for you, and your documents, should be assigned to you outright.

You are here

Before you spend anything

Tell me how many people work there, what the busiest hour of the week looks like, and which task everybody complains about. That is usually enough to say on a first call whether an assessment is worth your $999 or whether you have one obvious problem that needs one obvious fix.

Reply within one business day · Mon to Fri, 9am to 5pm Eastern

Book a 15 minute call Call (249) 493-3170