The Legal Alignment Series

Making AI Follow The Law

December 1, 202610 min readDownload PDF

Executive summary

AI agents now answer customers, automate workflows, prepare decisions and take actions inside regulated companies. Despite existing protections, an agent can pass every safety and security guardrail and still break the law.

Figure 01

Four nested rings of rules for AI agents: safety and security on the outside, then the law, corporate policy, and business requirements at the center. The law and corporate policy are marked as legal alignment.

Why can an AI agent pass every guardrail and still break the law? Because safety and security guardrails check only one of the four rings of rules that an AI agent must follow. Safety and security form the outer ring, and the law forms the second. Corporate policy sits inside the law, and the business requirements of one agent are at the center.

Most effort today goes to the outer ring and to the center. Guardrails against harmful content and jailbreaks protect the outer ring, and teams test the center before launch. The two middle rings receive the least attention, even though they define the rules that a licensed professional applies every day.

Legal alignment covers the two middle rings. The industry has largely left this layer of AI alignment unsolved. The problem covers hundreds of regulations in many jurisdictions and languages, with different interpretations and frequent updates. Solving it would let organizations deploy agents in more parts of their workflows, with higher productivity and less complexity, while they stay within the law.

The bottleneck for legal alignment is not the law. The law is generally a sound reference for the behavior of agents, because it is written down, institutions interpret it and violating it has clear consequences. The difficulty lies with the models. Frontier labs build increasingly capable models, which are generalists by design. The law changes from one country and one industry to the next, so a universal model misses the specifics of every local regulatory environment.

When an agent breaks the law, it is a systemic failure of three components. These components are the model, the system prompt and the harness. The model has been aligned in its post-training phase to follow a specific set of social rules (the “dos and don'ts” of an educated person). The system prompt contains the instructions that the deploying company writes for the model, and the harness is the software around the model. Security standards already show that a system prompt is not an adequate mechanism for control. Thus, embedding legal rules as model instructions is not sufficient for an AI agent to follow the law. In addition, each legal requirement and each internal policy needs its own evaluation outside the model.

01

An example case study

Figure 02

A corporate AI agent is asked which five of thirty CVs to call. It names five candidates, and a general guardrail marks the answer as passed, although it is a high-risk hiring decision.

A recruiter asks a company's AI agent to review thirty CVs for a sales representative role and to say which five candidates to call. The agent names five candidates and adds that they have the strongest sales track record. A general guardrail reviews the answer and lets it pass, because the answer contains no harmful content.

In the EU and the UK, data protection law restricts hiring decisions that no person meaningfully reviews, and the EU classifies AI tools that filter job applications as high-risk [1][2][3]. The choice of whom to interview belongs to the recruiter. In this scenario, the agent selected five candidates and there was no control to capture that type of high risk behavior.

The same answer can also break the law in the US. If the agent's choices put candidates of one age, race or sex at a disadvantage, the employer can be liable, even when nobody intended it [4][5]. A federal court has already allowed job applicants to bring this kind of claim over an AI screening tool [6]. The answer itself cannot show whether this happened, because five names do not explain how the agent chose them. The only way to know is to review and monitor how the AI agent makes each decision.

Is anyone responsible for that at your organization?

02

The four rings of AI control

Every AI agent should be aligned with four rings of rules. From the outside in, these rings are safety and security, the law, corporate policy and the business requirements of one agent:

Safety and security

Harmful content, must resist attacks such as jailbreaks and must not leak data.

Law

Jurisdiction specific requirements mandated by local states and regulators.

Corporate policy

Internal set of rules and processes guiding professional behavior and due diligence of employees in specific business workflows, aligned with the law.

Business requirements

Set of behavioral specifications aligned with business KPIs.

Each ring is narrower than the one around it and makes requirements more specific to one organization. Safety rules apply to almost every AI system in the world, while business requirements apply to one specific agent in a specific organization.

Effort across the rings

Figure 03

The four rings shaded by effort: safety and security get the most, business requirements are tested before launch, and the law and corporate policy in between stay open.

Effort today is uneven across the rings. The outer ring receives most of it, because model providers train their models for safety and vendors sell guardrails that detect harmful content and jailbreaks. The center ring receives the next largest share, because teams write their requirements down and test them before launch. The law and corporate policy are located between these two areas of effort, and they receive the least attention from companies. The latter seems counterintuitive in light of the regulatory momentum. Sector regulators and legislators are addressing the risks of AI agents in highly regulated industries such as financial services, for example the UK FCA [7], the Bank of England [8], the US OCC [9] and the Parliament of Australia [10]. Horizontal regulation points in the same direction. The EU AI Act lists creditworthiness assessment and life and health insurance pricing as high-risk use cases in Annex III, points 5(b) and 5(c) [2].

AI alignment is the goal of making an AI system reliably do what it ought to do: acting on the real intentions of the people who direct it, while protecting the interests and values of everyone it affects [11]. Model providers have invested heavily in safety alignment, which aims to keep AI systems from producing harmful outputs or actions [12], covering the outer ring. Legal alignment covers the two middle rings: it makes an agent behave according to the law and to the policies of the organization that deploys it.

In cybersecurity, a firewall at the edge of a network is necessary. However, security standards no longer treat a perimeter alone as enough [13]. A general guardrail plays the same role for AI, and it covers one ring of four. If an organization treats its guardrail as its whole control, it protects the perimeter and leaves everything else inside uncontrolled.

03

The law as reference point

Figure 04

The law drawn as a building: what an agent may and may not do rests on three columns. The law is written down, interpreted by institutions and backed by consequences, and together these properties make an AI agent's behavior testable against the law.

Legal alignment uses the law as its reference point. When people discuss how AI should behave, they often propose new ethical principles. Most companies now write such principles for AI, yet few turn them into practice. A 2026 analysis of 1,000 companies found that 71% of those with an AI strategy included principles such as ethical, safe or trustworthy AI. Only 41% made their AI policies accessible to employees or required employees to acknowledge them [14]. In 2026, McKinsey rated the average maturity of responsible AI practices at 2.3 on a four-level scale. The same survey found that active mitigation lags behind risk awareness for nearly every type of AI risk [15]. For most of what an agent does at work, there is no need to invent new principles, because the law already defines acceptable behavior. Societies have refined it over thousands of years, and it records what they have agreed is fair, safe and beneficial.

The law is written down, courts and regulators interpret it, and violating it has consequences. These three properties make it a practical reference for AI agents, because they make AI alignment testable. A team can take a legal requirement, turn it into concrete cases and check whether an agent respects it.

Nobody argues that AI agents should be allowed to break the law. Yet the industry has accepted a situation in which agents reach production without any check against the law, and few people question it. Legal research has started to do so. In 2025, O’Keefe et al. argued that AI agents should be designed to comply rigorously with a broad set of legal requirements [16]. In 2026, a group of legal and AI researchers described legal alignment as an emerging research field [17]; in April 2026, Hacker and Holweg proposed a statutory list of legal acts that cannot be delegated to AI agents, together with a “traffic light” system that authorizes tasks according to their operational risk [18].

04

Universal models and local laws

Figure 05

How US, UK and EU law classify an AI assistant in a paid investing app that recommends a fund for a customer's retirement savings. All three treat it as regulated advice: it needs registration in the US and authorization in the UK and the EU. Only the UK and EU tests require the advice to be personal to the client, and only the US test requires the adviser to be paid.

For a professional, the regulatory environment where they work is clear. A financial adviser in London learns the rules on financial advice, applies them every day and knows when to refuse a request. The difficulty appears when the same task goes to a general AI model.

Frontier labs build general models in their race toward superintelligence, and they train these models to help everyone. A company may put one of these models in front of its customers. When a customer asks for something that a local professional would refuse, the model still tries to help. It knows the rules that apply but only in general terms. A little insistence or a plausible reason is often enough to persuade it. There is an inherent tension between model sycophancy and the law. Pleasing everyone is not possible. Pleasing everyone while aligning to specific laws and languages in multiple jurisdictions is close to impossible.

The law works locally. Countries and industries set it, so the same answer can be legal in one place and prohibited in another. This can even happen in different environments inside the same country or jurisdiction. In many places a shop may decide to refuse cash, but New York City has prohibited this since 2020, and New York State has prohibited it since March 2026 [19][20]. If an agent tells a shop owner “Yes, you can go cashless”, the advice is correct in many places and illegal in New York.

Investment advice follows the same pattern in a less visible way. The US, the UK and the EU each define regulated advice with a different test. In the US, the Investment Advisers Act of 1940 covers anyone in the business of advising others about securities for compensation [21]. In the UK, article 53 of the Regulated Activities Order 2001 covers advice to a person as an investor on the merits of buying or selling a particular investment [22]. In the EU, MiFID II defines investment advice as a personal recommendation to a client about transactions in financial instruments [23]. In the UK and the EU, advice counts as regulated advice only when the recommendation is personal to the client [22][23]. The US definition has no such condition. A personal recommendation, such as which fund fits a client's retirement savings, is regulated advice in all three jurisdictions. In the US the adviser needs to register, while in the UK and the EU the firm needs authorization. If an agent tells every user that a fund is a good investment, the answer may fall inside the US definition and outside the UK and EU definitions of advice, although marketing rules may still apply there.

Each organization knows which laws apply to it, because it operates in specific countries and industries. Legal alignment is hard for frontier labs, because their models are universal and general, while the law is local and specialized. For this reason, the organizations that deploy agents are best placed to define and check legal alignment for their own use cases.

05

Anatomy of a failure

Figure 06

Controls today: the four rings against the model, the system prompt and the harness. Safety is covered at every layer; the law and corporate policy are weak in the model and prompt and have no runtime check in the harness.

An agent has three layers where a control should be enforced. When the agent breaks the law, it is because the system made of these three layers has failed.

The first layer is the model. Its training gives it general knowledge of the law and teaches it to be helpful. It does not hold the specific rules of one jurisdiction and one industry, and it knows nothing about the internal policies of the company that deploys it.

The second layer is the system prompt, which holds the instructions that the deploying company writes for the model. Teams often add restrictions such as “Do not give financial advice.” These instructions are simple, and a user can persuade a model to ignore them in a single message or over several turns of a conversation. The OWASP Foundation, which publishes security guidance for software, states that a system prompt should not be used as a control [24].

The third layer is the harness. In current industry use, the harness is the software around the model that turns it into a working system [25]. It includes the tools, permissions, memory, guardrails and audit trails of the agent. The harness is the natural place for independent controls. Today, most guardrails cover only the outer ring.

Safety is covered at all three layers, and business requirements are covered by instructions and by tests. The law and corporate policy are weak in the model and in the prompt, and they have no control in place in the harness. A legal failure passes through all three gaps. It is a failure of legal alignment at every layer.

06

Zero trust for AI agents

Figure 07

Zero trust for AI agents: each of the four rings has its own check, and no check relies on the model or the prompt.

For years, networks trusted everything inside a strong perimeter, and zero trust replaced that approach once attackers learned to get inside. The US National Institute of Standards and Technology describes zero trust as a set of approaches that move defenses away from fixed perimeters around the network [13]. Under zero trust, no user and no device gets access by default.

AI agents need the same principle. The model cannot be relied on to know the law, and the system prompt cannot be relied on to enforce it. When a team says “We already have that in our system prompt,” it describes an intention and gives no assurance. OWASP makes the same point for security: it states that critical controls must not be delegated to the model, and it recommends guardrails that run outside the model itself [24].

Zero trust for AI agents gives each ring its own independent control. The safety control looks for harmful content and attacks, while the legal control tests the behavior of the agent against each legal requirement that applies to it. The policy control does the same for each internal policy, and a fourth check confirms that the agent meets its business requirements. None of these controls relies on the model or on the prompt to behave as intended.

07

A sound control stack

Figure 08

Controls needed: the same grid, with the harness gap for the law and corporate policy filled by independent checks for each legal requirement and each policy.

Legal alignment needs a control stack with four properties.

1

Every ring has its own control mechanism

Safety guardrails remain necessary. The law and corporate policy also need controls designed for them, and these controls must exist explicitly in the stack.

2

Each control is independent of the model running

A model cannot do the homework and grade it as well. If a check depends on the model or on its instructions, it fails in the same way as the model.

3

Each control covers one requirement for one jurisdiction and one industry

A general check for legal risk cannot capture the difference between the US and UK definitions of investment advice, but a specific control can.

4

Each control creates a record that an auditor can evaluate

When a regulator or an internal auditor asks how an organization knows that its agent follows the law, the organization can show clear evidence.

Better models and clearer prompts still help, because they reduce how often a control has to stop an answer. They do not replace the control. A 2026 working paper by two researchers at the Spanish securities regulator (CNMV) shows this pattern. For ten months, the authors asked four AI assistants to pick stocks with simple prompts, with structured prompts, and with step-by-step reasoning that a person reviewed. Better prompts improved the results. Even so, the models made recurring errors of reasoning and calculation, and the authors concluded that they are not yet robust enough to work without supervision in high-stakes finance [26].

08

The end state

Figure 09

Today and the end state. Today, AI agents for investment advice, lending, life insurance, HR and clinical trials act alone, and nobody can show that each action follows the law where the agent operates. In the end state, every action is checked against the law of its use case and country, and one human expert oversees the agents and steps in for critical cases.

People follow the law because they learned it, because institutions interpret it and because breaking it has consequences. AI agents have already started to work next to people in the same organizations, under the same laws. The goal is a future in which people and organizations deploy autonomous AI systems with confidence, because those systems stay within the law. We are building the control infrastructure that guarantees that agents do good work for the people they serve, and the organizations that deploy them avoid legal consequences and ultimately societal harm.

Legal alignment is how AI agents earn the same trust that people have by following the law.

Sources

[1]

General Data Protection Regulation (EU) 2016/679, Article 22(1).

https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX%3A02016R0679-20160504
[2]

Regulation (EU) 2024/1689 (Artificial Intelligence Act), as amended by Regulation (EU) 2026/1744, Article 26 and Annex III, points 4(a), 5(b) and 5(c).

https://eur-lex.europa.eu/eli/reg/2024/1689/2026-07-27/eng
[3]

UK GDPR, Articles 22A(1)(a) and 22C(2), as substituted by the Data (Use and Access) Act 2025, section 80.

https://www.legislation.gov.uk/ukpga/2025/18/section/80
[4]

Title VII of the Civil Rights Act of 1964, 42 U.S.C. § 2000e-2(k)(1)(A)(i).

https://www.law.cornell.edu/uscode/text/42/2000e-2
[5]

Age Discrimination in Employment Act of 1967, 29 U.S.C. § 623(a)(2).

https://www.law.cornell.edu/uscode/text/29/623
[6]

Mobley v. Workday, Inc., No. 3:23-cv-00770-RFL (N.D. Cal.), order granting conditional certification, May 16, 2025. Summary in Proskauer, "AI Bias Lawsuit Against Workday Reaches Next Stage as Court Grants Conditional Certification of ADEA Claim", June 11, 2025.

https://www.proskauer.com/blog/ai-bias-lawsuit-against-workday-reaches-next-stage-as-court-grants-conditional-certification-of-adea-claim
[7]

UK Financial Conduct Authority, "Our approach to Agentic AI", November 24, 2026.

https://www.fca.org.uk/firms/innovation/ai-approach/agentic-ai
[8]

Bank of England, Prudential Regulation Authority and Financial Conduct Authority, "Effective practices: Cyber risk and resilience management relating to artificial intelligence (AI)", November 19, 2026.

https://www.bankofengland.co.uk/prudential-regulation/publication/2026/november/effective-practices-cyber-risk-and-resilience-management-relating-to-artificial-intelligence
[9]

Office of the Comptroller of the Currency, "OCC Issues Supervisory Framework on Bank Use of Super Intelligence", News Release 2026-97, November 4, 2026.

https://www.occ.gov/news-issuances/news-releases/2026/nr-occ-2026-97.html
[10]

Parliament of Australia, Joint Select Committee on Artificial Intelligence, "Report: Artificial Intelligence - the Australian Way", November 2026.

https://www.aph.gov.au/Parliamentary_Business/Committees/Joint/Artificial_Intelligence/ArtificialIntelligence/Report
[11]

Iason Gabriel, "Artificial Intelligence, Values, and Alignment", Minds and Machines 30(3), 411–437, October 1, 2020.

https://doi.org/10.1007/s11023-020-09539-2
[12]

Yuntao Bai, Andy Jones, Kamal Ndousse, et al., "Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedback", arXiv:2204.05862, April 12, 2022.

https://arxiv.org/abs/2204.05862
[13]

Scott Rose, Oliver Borchert, Stu Mitchell and Sean Connelly, "Zero Trust Architecture", NIST Special Publication 800-207, August 2020.

https://csrc.nist.gov/pubs/sp/800/207/final
[14]

Katie Fowler, "New data reveals AI governance gap between policy and practice, creating ESG risks", Thomson Reuters Foundation, published by the Thomson Reuters Institute, February 23, 2026.

https://www.thomsonreuters.com/en/institute/articles/ai-governance-gap-esg-risks
[15]

Gabriel Morgan Asaftei, Roger Roberts, Abby Sticha and Cécile Prinsen, "State of AI trust in 2026: Shifting to the agentic era", McKinsey & Company, March 25, 2026.

https://mckinsey.com/capabilities/tech-and-ai/our-insights/tech-forward/state-of-ai-trust-in-2026-shifting-to-the-agentic-era
[16]

Cullen O'Keefe, Ketan Ramakrishnan, Janna Tay and Christoph Winter, "Law-Following AI: Designing AI Agents to Obey Human Laws", 94 Fordham Law Review 57 (2025).

https://ir.lawnet.fordham.edu/flr/vol94/iss1/2
[17]

Noam Kolt, Nicholas Caputo, et al., "Legal Alignment for Safe and Ethical AI", arXiv:2601.04175, January 7, 2026.

https://arxiv.org/abs/2601.04175
[18]

Philipp Hacker and Matthias Holweg, "A pragmatic approach to regulating AI agents", arXiv:2604.22819, April 16, 2026.

https://arxiv.org/abs/2604.22819
[19]

New York City Local Law 34 of 2020, prohibiting food stores and retail establishments from refusing payment in cash.

https://intro.nyc/local-laws/2020-34
[20]

PYMNTS, "New York Requires Retailers to Accept Cash Payments", March 23, 2026.

https://www.pymnts.com/cash/2026/new-york-requires-retailers-to-accept-cash-payments/
[21]

Investment Advisers Act of 1940, section 202(a)(11), as summarized in SEC staff, "Regulation of Investment Advisers by the U.S. Securities and Exchange Commission", March 2013.

https://sec.gov/about/offices/oia/oia_investman/rplaze-042012.pdf
[22]

The Financial Services and Markets Act 2000 (Regulated Activities) Order 2001, Article 53.

https://www.legislation.gov.uk/uksi/2001/544/article/53
[23]

Directive 2014/65/EU (MiFID II), Article 4(1)(4), ESMA Interactive Single Rulebook.

https://www.esma.europa.eu/publications-and-data/interactive-single-rulebook/mifid-ii/article-4-definitions
[24]

OWASP, "LLM07:2025 System Prompt Leakage", OWASP Top 10 for LLM Applications 2025.

https://genai.owasp.org/llmrisk/llm072025-system-prompt-leakage/
[25]

Alice Li, "What Is an Agent Harness, and Why Do You Need to Understand It?", Built In, September 21, 2026.

https://builtin.com/articles/agent-harness
[26]

Ricardo Crisóstomo and Diana Mykhalyuk, "Large Language Models and Stock Investing: Is the Human Factor Required?", CNMV Working Paper No. 96, March 2026.

https://www.cnmv.es/DocPortal/Publicaciones/MONOGRAFIAS/DT_96_Large_Language_Modelsen.pdf
Get started

Run AI like your reputation depends on it. Because it does.

See how Alinia helps regulated firms keep the AI that speaks for them inside their own rules.

​
Adheres to specific policies
Not a generic filter that treats every firm the same — models are customized on the firm’s own policies and legal provisions.
​
Every jurisdiction and language
Alinia AI judges span across all the jurisdictions, systems, and languages you operate in.
​
Research and legal expertise
Built on legal and AI research and expert annotation.
​
Provider and platform independent
AI provider and platform independent — works with whatever stack you run.

Tell us about your use case

Fields marked with an asterisk are required.

Thank you! Your submission has been received!