Career Path

AI Security or Safety Engineer

Finds and fixes the ways AI systems can be attacked, misused or go wrong.

  • 151 Free Lessons
  • 13 Seasons
  • 10 Interview Questions

What The Job Is

An AI security or safety engineer looks for the ways an AI system can be attacked, misused or go wrong: prompt injection, data leaks, unsafe actions by agents, and harmful or wrong outputs.

The job is to prevent and catch them: threat modeling, guardrails, red teaming, privacy controls and evaluations that run before and after every release.

At a Glance

  • 6 of 151lessons out now
  • 10interview questions
  • 8key skills explained

Job Titles to Search

  • Security Engineer
  • Trust and Safety Engineer

The Job in Detail

Why Companies Hire for It

Language models can be tricked by text hidden in a document, a web page or an email, and agents that act in systems can be pushed into unsafe actions. Classic security teams were not trained for these attacks. Companies hire AI security engineers to find these weaknesses before attackers do, and to design defences that let AI features launch safely.

A Typical Week

  1. 1Test AI features for prompt injection, data leaks and unsafe actions before they launch.
  2. 2Model threats for a new agent or assistant: what it can reach, and what an attacker could make it do.
  3. 3Design defences such as input checks, output filters, permissions and human approval steps.
  4. 4Run red team exercises and write clear reports that engineers can act on.
  5. 5Follow new attack techniques and update the team's guidance and tests.

Tools and Terms You Will Meet

Prompt injection
Hiding instructions in content so a model follows them instead of its rules.
OWASP Top 10 for LLMs
A widely used list of the main security risks in LLM applications.
Threat modelling
A structured way to find how a system could be attacked.
Red teaming
Attacking your own system on purpose to find weaknesses first.
Guardrails
Checks around a model that block unsafe inputs or outputs.

Who Moves Into This Job

AI security engineers usually come from application security, penetration testing or security engineering, and learn how language models and agents work. A smaller group comes from ML engineering and adds security. Curiosity about how things break is the shared trait.

Industry Example: Pharma

In pharma, AI security work protects patient data, trial data and intellectual property such as molecule designs. Assistants connected to regulated systems must not leak data or take unapproved actions, and security findings feed into validation and quality records.

A Common Mix-Up

AI security is not the same as AI governance. Security engineers test and defend the systems technically; governance teams set the policies, risk assessments and evidence required by law. The two work closely together.

Is This Job for You?

A good fit if

  • You enjoy breaking things to make them safer.
  • You like reading about new attacks and trying them.
  • You write clearly, because findings must convince engineers.

Maybe not if

  • You prefer building features to testing them.
  • You find documentation and reports a burden.
  • You want a field that changes slowly.

Where the Job Leads

The job leads to senior and principal security roles, AI red team lead, security architect for AI, or head of AI security. It is a young field, so experienced people often shape company standards.

How to Get In

  1. 1Learn web security basics, Python and how LLM apps and agents are built.
  2. 2Attack your own small LLM app with prompt injection and document what worked and how you fixed it.
  3. 3Study the OWASP list for LLM applications and write up one test case for each risk.
See the 151 Free Lessons

What Employers Ask For

Real lines from real job ads for this role, each with the lesson that teaches it.

  • propio

    AI/LLM Safety Engineer, Overland Park, KS

    Perform threat modeling for agentic scenarios: tool-call boundaries, sandbox isolation, and least-privilege access, with particular attention to preventing agents from exfiltrating data or executing irreversible actions through chained tool calls.

    Taught InS14 · #163Securing Agents and MCP

  • Technergetics

    AI/ML Engineer III, Rome, NY

    Grounding in AI safety and assurance practices, including guardrails, input and output filtering, prompt injection mitigation, and human-in-the-loop design

    Taught InS14 · #162AI Security Threats

  • EA Pharma

    Data & AI Architect, Mougins

    Awareness of GDPR, data quality and security

    Translated from French.

    Taught InS14 · #166Data Privacy

  • propio

    AI/LLM Safety Engineer, Overland Park, KS

    Design and maintain a safety evaluation framework: adversarial prompt sets, scenario-based test suites, and regression suites, so that every model and agent update is validated before it ships.

    Taught InS14 · #172Red Teaming

Skills Checklist

The skills this role is hired for, each with the free lesson that teaches it.

  • 01

    Web security basics: authentication and authorization

    S11 · #130API Security

  • 02

    Threat modeling for LLM systems

    S14 · #162AI Security Threats

  • 03

    Prompt injection and the OWASP LLM Top 10

    S14 · #162AI Security Threats

    What is Prompt Injection?
  • 04

    Agent security and least privilege

    S14 · #163Securing Agents and MCP

    What is an AI Agent?
  • 05

    Guardrail frameworks

    S14 · #164Guardrail Frameworks

    What are Guardrails?
  • 06

    Privacy and PII redaction

    S14 · #166Data Privacy

  • 07

    Red teaming

    S14 · #172Red Teaming

  • 08

    Evaluation of safety behavior

    S13 · #152Evaluation Methods

    What is LLM Evaluation?

Your Path

Every lesson of this path, season by season. Published lessons open their page.

    • S1 · #9How a Computer Works
    • S1 · #10Operating Systems
    • S1 · #11Files, Folders, Paths, Formats
    • S1 · #12The Command Line From Zero
    • S1 · #13Linux Essentials
    • S1 · #14How the Internet Works
    • S1 · #15HTTP From Zero
    • S1 · #16JSON and YAML
    • S1 · #17Your Code Editor
    • S2 · #18Install Python, First Script
    • S2 · #19Variables, Types, Operators
    • S2 · #20Strings and f-strings
    • S2 · #21Lists, Dicts, Tuples, Sets
    • S2 · #22Conditionals and Loops
    • S2 · #23Functions
    • S2 · #24File I/O and Parsing
    • S2 · #25Errors and Exceptions
    • S2 · #26Modules, Packages, Dependencies
    • S2 · #27Classes and Objects
    • S2 · #28Type Hints and Pydantic
    • S2 · #29Reading Code You Didn't Write
    • S2 · #30Calling Web APIs in Python
    • S2 · #31Async Python
    • S2 · #32High-Concurrency Python
    • S2 · #33Testing With pytest
    • S2 · #34Mini-Project: A CLI Tool
    • S3 · #35Version Control and Git
    • S3 · #36Branches and Merges
    • S3 · #37GitHub
    • S3 · #38Pull Requests and Code Review
    • S3 · #39CI/CD Introduction
    • S3 · #40A Portfolio-Grade Repo
    • S4 · #42SQL 1
    • S4 · #43SQL 2
    • S4 · #44SQL 3
    • S4 · #45Database Design and PostgreSQL
    • S4 · #47NumPy
    • S4 · #48pandas
    • S4 · #49Data Visualization
    • S8 · #83Hugging Face Hub
    • S8 · #84Running Pretrained Models
    • S8 · #85Hardware Realities
    • S8 · #86Open Models on Your Own Machine
    • S8 · #87The OpenAI API
    • S8 · #88The Anthropic API
    • S8 · #89Controlling Generation
    • S8 · #90Production-Grade Calls
    • S8 · #91Project: The Summarizer
    • S8 · #92Prompt Engineering Properly
    • S8 · #93Context Engineering
    • S8 · #94Structured Outputs
    • S8 · #95Multimodal APIs
    • S8 · #96Going Provider-Agnostic
    • S9 · #97Why AI Hallucinates, and How RAG Reduces It
    • S9 · #98Embeddings
    • S9 · #99Vector Search
    • S9 · #100Vector Databases
    • S9 · #101RAG From Scratch, No Framework
    • S9 · #102Chunking Strategies
    • S9 · #103Better Retrieval
    • S9 · #104Grounding and Citations
    • S9 · #105LangChain and LlamaIndex
    • S9 · #106Advanced RAG
    • S9 · #107Knowledge Graphs and GraphRAG
    • S9 · #108Building an Enterprise Knowledge Base
    • S9 · #109Search and Recommendation Systems
    • S9 · #110Semantic Caching
    • S9 · #111Text-To-SQL
    • S9 · #112Project: HR Policy Assistant
    • S10 · #113Workflows vs Agents
    • S10 · #114Tool Calling From Scratch
    • S10 · #115The Agent Loop
    • S10 · #116Agent Memory and State
    • S10 · #117Guardrails
    • S10 · #118MCP Explained
    • S10 · #119Build Your Own MCP Server
    • S10 · #120Agent-To-Agent Interoperability
    • S10 · #121Agent Frameworks
    • S10 · #122Multi-Agent Orchestration
    • S10 · #123Human in the Loop
    • S10 · #124Computer-Use and Browser Agents
    • S10 · #125AI Coding Agents for Engineers
    • S10 · #126The Agentic Software Lifecycle
    • S10 · #127Legacy Modernization With AI
    • S10 · #128Project: Data-Analyst Agent
    • S11 · #129FastAPI
    • S11 · #130API Security
    • S11 · #131Quick UIs
    • S11 · #132Web Frontend Basics
    • S11 · #133Beyond Python
    • S11 · #134Scaling the Backend
    • S11 · #135Webhooks and Event-Driven Systems
    • S11 · #136Integrating AI With Enterprise Systems
    • S11 · #137Industrial and Lab Data Systems
    • S12 · #138Cloud Fundamentals
    • S12 · #139Docker 1
    • S12 · #140Docker 2
    • S12 · #141Kubernetes Fundamentals
    • S12 · #142AWS for AI
    • S12 · #143GCP for AI
    • S12 · #144Microsoft Azure for AI
    • S12 · #145Enterprise Data and AI Platforms
    • S12 · #146Sovereign AI and Deployment Choices
    • S12 · #147Infrastructure as Code
    • S12 · #148Full CI/CD
    • S12 · #149Serving Models at Scale
    • S12 · #150Project: Deploy the RAG App
    • S13 · #151Why Evaluation
    • S13 · #152Evaluation Methods
    • S13 · #153Evaluating Agents
    • S13 · #154Observability and Tracing
    • S13 · #155Production Monitoring
    • S13 · #156Product Analytics
    • S13 · #157Cost Governance
    • S13 · #158AI Gateways
    • S13 · #159MLOps, LLMOps, AgentOps
    • S13 · #160Batch Processing
    • S13 · #161Auditing AI You Didn't Build
    • S14 · #162AI Security Threats
    • S14 · #163Securing Agents and MCP
    • S14 · #164Guardrail Frameworks
    • S14 · #165The Agent Trust and Autonomy Ladder
    • S14 · #166Data Privacy
    • S14 · #167The EU AI Act
    • S14 · #168AI and the Law Beyond the AI Act
    • S14 · #169AI in Regulated Industries
    • S14 · #170Governance Frameworks
    • S14 · #172Red Teaming
    • S14 · #173Running an AI Governance Program
    • S17 · #211Choose Your AI Role: Decode Any Job Ad
    • S17 · #212Portfolio Project 1: Deployed RAG Knowledge System
    • S17 · #213Portfolio Project 2: MCP Agent for GitHub and Slack
    • S17 · #214Portfolio Project 3: Evaluated, Observed App With Cost Dashboard
    • S17 · #215Capstone: Enterprise RAG
    • S17 · #216Capstone: Autonomous Multi-Agent Coder
    • S17 · #217Your AI CV
    • S17 · #218Build in Public
    • S17 · #219Networking
    • S17 · #220Certifications Worth Your Time
    • S17 · #221System Design Interviews
    • S17 · #222Coding Interviews in the AI Era
    • S17 · #223Case Study and Business Case Interviews
    • S17 · #224Behavioral Interviews and Negotiation

The Reading Behind This Path

The lessons on this path were researched from these books and official texts. Read them to go deeper:

Never Miss a Lesson

Subscribe on YouTube, or get an email the day each new lesson goes live.