Do You Really Need Python to Build AI Agents and Test Their Security? A developer argues that Python is not strictly required to build AI agents, since any language capable of making HTTP requests and parsing JSON can implement the model-tool-action loop, with TypeScript, visual orchestration tools, and YAML-driven security scanners as viable alternatives. However, the piece concludes that Python remains effectively indispensable for serious AI red teaming, because adversarial testing requires custom scorers, multi-turn replay, bulk analysis with pandas and notebooks, and reproducing published attack research that ships as Python code. Ask anyone how to get started with AI agents and you'll hear the same answer: "Learn Python." It's good advice, but it's not the whole story. In 2026 you can build a working agent in TypeScript, orchestrate one visually without writing much code, and run a serious security assessment driven mostly by YAML files. So is Python indispensable ? The honest answer: not for building, almost for breaking. Let's look at why. An agent is a loop: a model receives a goal, decides on an action, calls a tool, reads the result, and decides again. That loop can be written in any language that can make an HTTP request and parse JSON. Python still has the deepest ecosystem: LangChain, LangGraph, LlamaIndex, CrewAI, AutoGen, and most vendor SDKs ship Python first. Local inference tooling transformers, vLLM, llama-cpp bindings is Python-native. If you want to fine-tune a small model or plug a custom embedding pipeline into your agent's memory, Python is the path of least resistance. Verdict for building: Python is the default, not a requirement. Pick the language your product already runs on. This is where the picture changes. Agents are a bigger attack surface than chatbots: they read untrusted content, hold credentials and take actions. A successful prompt injection https://wasaconf.org/attaques-llm-genai/ against a chatbot produces a bad answer; against an agent, it can produce a bad action . See the attack surface breakdown in AI agent security https://wasaconf.org/securite-agents-ia/ . So you can start without Python. But the moment you go beyond off-the-shelf probes, Python becomes hard to avoid. Real AI red teaming https://wasaconf.org/red-teaming-ia/ is not running a scanner once. It's an adversarial loop: generate an attack, send it, score the response, mutate, repeat. Increasingly, one model attacks another https://wasaconf.org/ia-contre-ia/ . Building that loop, writing custom scorers, replaying multi-turn scenarios and analyzing results in bulk pandas, notebooks is where Python's ecosystem pays off. And there's a practical reason: most published research, proof-of-concept attacks and datasets in adversarial ML come as Python code. If you can't read it, you can't reproduce it. Verdict for security: you can scan without Python. You can't really red team without it. A classic pentest checks the application around the agent: authentication, APIs, permissions, secrets handling. Language-agnostic, standard AppSec tooling. Red teaming targets the model's behavior itself. Most agent deployments need both. Here is a breakdown of pentest vs red teaming for AI systems https://wasaconf.org/pentest-vs-red-teaming/ . Tools find vulnerabilities; frameworks tell you what to test and how to report it. OWASP's Top 10 for LLM Applications, MITRE ATLAS, NIST AI RMF and the EU AI Act all shape what a credible assessment looks like. An overview of the AI security frameworks https://wasaconf.org/referentiels-securite-ia/ helps you scope an AI audit https://wasaconf.org/audit-ia/ . And always test within a written mandate: see ethical AI hacking https://wasaconf.org/hacking-ethique-ia/ . Python isn't a gate to building AI agents: any language that speaks JSON can do it. But securing agents is an adversarial, experimental discipline, and that discipline lives in Python. Build in whatever you like. Learn Python to break it. More on offensive AI security at Wasa Confidence https://wasaconf.org/ .