LangChain Agent Testing Guide Tool (Free) Hey HN,
If you're building LangChain agents, you've probably seen them break in creative ways - prompt injection bypassing your chain logic, tools getting called with bad parameters, or cascading failures when an API times out mid-chain. I built Khaos to test these failure modes before production. Example LangChain agent: ```python from langchain.agents import AgentExecutor, create_openai_functions_agent from khaos import khaosagent
Test it:
pip install khaos-agent
khaos discover
khaos run research-agent --pack securityKhaos injects: - 242+ security attacks - Prompt injection variations that bypass LangChain's prompt templates - Tool misuse - Malicious parameters in tool calls (e.g., os.system injection in code execution tools) - Chain failures - What happens when your 3rd step in a 5-step chain times out? - LLM faults - Rate limits, token overflows, model unavailability |
No comments yet