Compilearn: learn how AI works by defending one

Compilearn teaches you how language models actually behave by putting you on the defending side. Write the system prompt that guards an AI, watch real attacks try to break it, then build the projects and work through the AP Computer Science curriculum behind it. Free, in your browser, no signup to start.

Learn to Build AI Apps

Learn to build AI apps by actually building them: prompting, RAG, tool use, agents, and evaluation, hands-on in your browser.

Live LLM Playground

Write a system prompt, run it against a live model over adversarial inputs, and get graded on what the model actually does. No sign-in required.

AI Build Projects

Guided, hands-on projects for building real AI-powered applications, with live code execution in the browser.

Coding Challenges

Graded coding challenges that run in the browser.

Competitive Programming

Competitive programming problems with a real in-browser judge.

AP Computer Science

AP CS Principles and A curriculum with interactive, runnable lessons.

Privacy

Privacy policy.

Terms

Terms of service.

Accessibility

How Compilearn works with a keyboard, a screen reader, enlarged text, and reduced motion, plus the problems we know about.