{"slug": "do-you-really-need-python-to-build-ai-agents-and-test-their-security", "title": "Do You Really Need Python to Build AI Agents and Test Their Security?", "summary": "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.", "body_md": "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.\n\nSo is Python *indispensable*? The honest answer: **not for building, almost for breaking.** Let's look at why.\n\nAn 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.\n\nPython 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.\n\n**Verdict for building:** Python is the default, not a requirement. Pick the language your product already runs on.\n\nThis 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/).\n\nSo you *can* start without Python. But the moment you go beyond off-the-shelf probes, Python becomes hard to avoid.\n\nReal [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.\n\nAnd 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.\n\n**Verdict for security:** you can scan without Python. You can't really *red team* without it.\n\nA 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/).\n\nTools 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/).\n\nPython 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.\n\n*More on offensive AI security at [Wasa Confidence](https://wasaconf.org/).*", "url": "https://wpnews.pro/news/do-you-really-need-python-to-build-ai-agents-and-test-their-security", "canonical_source": "https://dev.to/wasa-confidence/do-you-really-need-python-to-build-ai-agents-and-test-their-security-4kn6", "published_at": "2026-09-22 22:18:57+00:00", "updated_at": "2026-09-22 22:22:40.568006+00:00", "lang": "en", "topics": ["ai-agents", "ai-safety", "ai-tools", "developer-tools", "artificial-intelligence"], "entities": ["Python", "TypeScript", "LangChain", "LangGraph", "LlamaIndex", "CrewAI", "AutoGen", "OWASP"], "alternates": {"html": "https://wpnews.pro/news/do-you-really-need-python-to-build-ai-agents-and-test-their-security", "markdown": "https://wpnews.pro/news/do-you-really-need-python-to-build-ai-agents-and-test-their-security.md", "text": "https://wpnews.pro/news/do-you-really-need-python-to-build-ai-agents-and-test-their-security.txt", "jsonld": "https://wpnews.pro/news/do-you-really-need-python-to-build-ai-agents-and-test-their-security.jsonld"}}