Short answer: In practice, ownership of AI-written code is decided by three things: copyright law (in the US, purely AI-generated material isn't protected, but human selection, arrangement and modification can be), the AI tool's terms (many business terms assign outputs to the customer, but they vary), and your contracts (between you and your clients or employer). Just as important is control: code in your own repository and apps on your own infrastructure. This article is general information, not legal advice.

What US copyright guidance says
In January 2025, the US Copyright Office published Part 2 of its report on copyright and AI, on copyrightability. Its main conclusions:
- Human authorship is required. AI outputs can be protected only where a human has determined sufficient expressive elements.
- Prompts alone aren't enough. Providing prompts doesn't make you the author of the output.
- Human selection, arrangement and modification can qualify. Creative choices a person makes about AI output can be protected.
- Using AI doesn't disqualify a work. AI-assisted work, or AI material inside a larger human-made work, can still be protected.
In March 2025, a US federal appeals court (Thaler v. Perlmutter) upheld the Office's refusal to register a work listing an AI system as its sole author, confirming that the Copyright Act requires a human author.
Other countries treat this differently, so check the rules where you and your clients operate.
Step by step: protecting ownership in practice
Step 1: Read the AI tool's terms
Check who owns the outputs, whether your code or prompts are used for training, and whether the vendor offers IP indemnity on your plan. Business and enterprise plans often differ from consumer plans.
Step 2: Put ownership in your contracts
For agencies and outsourcers, the client contract should say who owns deliverables, that AI tools may be used, and how. For employees, employment agreements usually assign work product to the employer.
Step 3: Keep human authorship visible
Record the human decisions: the spec, the approved plan, review comments and edits. They show the human selection and arrangement that copyright guidance points to, and they're good practice anyway.
Step 4: Keep code in your own repository
The simplest protection against losing access is control: code in a repository you or your client own, not only inside a tool's platform.
Step 5: Deploy to infrastructure you control
If the app only runs on a vendor's hosting, leaving can mean rebuilding. Deploy to your own or your client's servers or cloud.
Step 6: Check licences of what the AI pulls in
AI tools may add open-source dependencies or reproduce common code patterns. Run licence and dependency scanning as you would for any code.
How Devfab handles ownership and control
When you create a project in Devfab, it asks where the repository should live: your own GitHub account or an organisation you belong to. Devfab creates the repository there, agents commit to it, and apps deploy to your own server.
The human decisions are recorded too: the description, the plan you approve in the Planner, and the tickets and reviews.
Common mistakes
- Assuming the tool's free-tier terms match its business terms.
- No AI clause in client contracts.
- Code that only lives inside a builder's platform.
- No record of human review and decisions.
- Skipping licence checks on AI-added dependencies.
Checklist
- [ ] AI tool terms checked: output ownership, training use, indemnity
- [ ] Client and employment contracts cover AI-assisted work
- [ ] Spec, plan approvals and reviews recorded
- [ ] Code in a repository you or your client own
- [ ] App deployed to infrastructure you control
- [ ] Licence and dependency scanning in place
- [ ] Legal advice sought for high-value or regulated work
FAQ
Can AI-generated code be copyrighted?
In the US, not purely AI-generated material. Code where a person made meaningful creative choices, by selecting, arranging or modifying it, can be protected for those human contributions.
Does the AI company own the code it writes for me?
Many business terms say the customer owns the outputs, but terms vary by vendor and plan. Read them.
Who owns code an agency builds for me with AI?
Whatever your contract says. Make sure it covers AI-assisted work and transfers ownership of deliverables to you.
Read next
- Bubble alternatives for teams that ship to production
- The AI-native software agency
- What is an AI software factory?
Sources: US Copyright Office, Copyright and Artificial Intelligence, Part 2: Copyrightability (January 2025) and NewsNet summary; Thaler v. Perlmutter, D.C. Cir. (March 2025).
Frequently asked questions
Can AI-generated code be copyrighted?
In the US, not purely AI-generated material. Code where a person made meaningful creative choices, by selecting, arranging or modifying it, can be protected for those human contributions.
Does the AI company own the code it writes for me?
Many business terms say the customer owns the outputs, but terms vary by vendor and plan. Read them.
Who owns code an agency builds for me with AI?
Whatever your contract says. Make sure it covers AI-assisted work and transfers ownership of deliverables to you.




