Use Cases/Legal Agents

Legal AI Agent Guardrails

Runtime authorization for legal AI agents. Protect client confidentiality, enforce document access controls, and maintain billing integrity with policies that cannot be bypassed by the model.

Legal AI agent guardrailsLaw AI securityLegal research agent authorization

The stakes are different in legal

Legal AI agents handle privileged communications, case strategies, and billing records. A breach in client confidentiality can trigger malpractice claims, bar disciplinary action, and irreparable harm to clients. Unlike other domains, legal errors carry professional and ethical consequences that extend beyond business risk.

An agent that inadvertently accesses the wrong client file, sends privileged information to opposing counsel, or bills incorrect hours creates liability. Authentication tells you which agent made the request. Authorization ensures that request was permitted in the first place.

Core risks for legal agents

Document access control

Agents accessing case files outside their matter, viewing privileged documents without authorization, or exposing confidential information to unauthorized parties.

Client isolation

Cross-client contamination where agents access or reference documents from unrelated matters, creating conflicts of interest and confidentiality breaches.

Billing integrity

Agents logging time to incorrect matters, creating duplicate entries, or generating inaccurate billing records that could constitute billing fraud.

Ethical compliance

Violations of professional conduct rules around confidentiality, competence, and supervision of non-lawyer assistants including AI systems.

Client isolation policies

The most critical authorization pattern for legal agents: ensure each agent operates only within the bounds of its assigned matter. Client isolation policies prevent cross-contamination and protect privileged information.

veto-policy.yaml
# Client isolation policies for legal AI agents
policies:
  document_access:
    description: "Control access to case documents"
    rules:
      - name: "matter_isolation"
        condition:
          tool: "read_document"
        allow:
          matter_id: "{current_matter_id}"
        deny:
          matter_id: "*"
        error_message: "Access denied: document belongs to a different matter"

      - name: "privileged_document_protection"
        condition:
          tool: "read_document"
          document_type: "privileged"
        allow:
          user_role: ["partner", "associate"]
          matter_access: "granted"
        deny:
          user_role: ["paralegal", "assistant"]

  client_communication:
    description: "Control outgoing communications"
    rules:
      - name: "opposing_counsel_block"
        condition:
          tool: "send_email"
        deny:
          recipient_domain: "{opposing_counsel_domains}"
        require_approval:
          recipient_domain: "{opposing_counsel_domains}"
          approver_role: "partner"

      - name: "client_communication_scope"
        condition:
          tool: "send_email"
        allow:
          recipient: "{client_contacts}"
          matter_id: "{current_matter_id}"
        deny:
          recipient: "*"
          not_matter_id: "{current_matter_id}"

  billing_operations:
    description: "Protect billing integrity"
    rules:
      - name: "matter_billing_only"
        condition:
          tool: "log_time"
        allow:
          matter_id: "{current_matter_id}"
        deny:
          matter_id: "*"
        error_message: "Cannot log time to a different matter"

      - name: "time_entry_validation"
        condition:
          tool: "log_time"
          hours: {greater_than: 8}
        require_approval: true
        approver_role: "partner"

      - name: "duplicate_entry_check"
        condition:
          tool: "log_time"
        deny:
          duplicate_within_hours: 24
          same_task: true

How it works

Matter Context

Each tool call includes matter ID, user role, and client context for policy evaluation.

Policy Engine

Rules enforce client isolation, document access, and billing boundaries before execution.

Audit Trail

Every decision logged with full context for compliance reporting and ethical review.

Real-world scenarios

Document access breach prevented

A research agent attempting to access case files from Matter A while working on Matter B is blocked. The policy evaluates matter_id in the tool arguments against the agent's current context and denies access with an audit log entry.

Opposing counsel communication

An agent drafting an email to opposing counsel is intercepted. The policy recognizes the recipient domain matches the opposing counsel list and routes to a partner for approval before sending.

Billing integrity enforcement

An agent logging 12 hours for a single task triggers the time entry validation rule. The entry is held for partner review, preventing potential billing disputes and maintaining accurate records.

Privilege protection

A paralegal's agent attempting to access privileged communications is denied based on user role restrictions. The document remains protected while the denial is logged for compliance tracking.

Compliance and ethical requirements

Legal AI agents must comply with professional conduct rules. Veto policies map directly to ethical obligations, creating enforceable boundaries that protect both clients and attorneys.

Key regulatory considerations

ABA Model Rule 1.6: Confidentiality

Policies prevent unauthorized disclosure by controlling document access, communications, and data flows. Every access is logged for compliance verification.

ABA Model Rule 5.3: Supervision

Human approval workflows ensure partner oversight of significant agent actions. Audit trails demonstrate supervision and due diligence.

ABA Model Rule 1.1: Competence

Authorization boundaries ensure agents operate within their designed scope, preventing unauthorized practice areas and maintaining service quality.

State-specific requirements

Policies adapt to jurisdiction-specific rules around AI use in legal practice, including disclosure requirements and client consent tracking.

Frequently asked questions

How do client isolation policies work with multiple matters?
Each agent session is bound to a specific matter context. Policies evaluate the matter_id in tool arguments against the session's current_matter_id. If they don't match, the action is denied. This prevents accidental cross-matter access without requiring separate agent instances per matter.
Can policies distinguish between different document types?
Yes. Policies can evaluate document metadata including type (privileged, work product, client communication), sensitivity level, and access restrictions. Rules can grant different access levels based on user role, matter involvement, and document classification.
How are partner approvals handled?
When a policy requires approval, the tool call is held in a queue. Designated partners receive notifications and can review the full context before approving or denying. The agent receives the decision and proceeds accordingly. All approvals are logged with timestamps and rationale.
What audit capabilities are available for compliance?
Every policy decision is logged with the tool name, arguments, context (matter, user, role), decision (allow/deny/approval), and timestamp. Logs can be exported for compliance audits, ethical review, or billing verification. Retention periods are configurable per firm policy.
Can Veto integrate with existing practice management systems?
Veto operates at the tool-call layer and is agnostic to your practice management system. Matter IDs, client lists, and user roles can be injected as context when initializing the agent. Integration with Clio, MyCase, or custom systems is straightforward through the SDK's context parameter system.

Related use cases

Protect client privilege. Enforce ethical boundaries. Maintain billing integrity.