AI use cases Automation & agent frameworks Build AI agents in Python or TypeScript
Build AI agents in Python or TypeScript
Pick a code-first agent framework for Python or TypeScript: tools, structured output, evaluation and deployment. Workflow and ranked frameworks.
- Tools compared
- 6
- Open source
- 6of 6
- Reviewed
- 16 Oct
For: Developers
- 1LangChainAgent framework54Caution
- 2Pydantic AIAgent framework46Caution
- 3MastraAgent framework44No issues found
- 4Agent Development Kit (ADK, Python)Agent framework43Caution
- 5OpenAI Agents SDK (Python)Agent framework39Caution
- 6smolagentsAgent framework30No dependencies scanned
What the score and shapes mean
Score = public maintenance, adoption and docs signals, as a percentile of 52 tools. Nobody here tested these hands-on. Shapes are the separate safety label: No issues found, No dependencies scanned, Caution.
What it does for you
Developers adding agent features to a product or building internal automation.
- Give a model tools (functions, APIs) and let it decide when to call them
- Return validated, typed output
- Run multi-step agents with state and retries
- Trace and evaluate agent runs
- Deploy an agent as a service
More about this job
Agent frameworks provide the loop that calls a model, runs tools and returns structured results. The differences that matter are language, how much they abstract, typing, observability and how they handle evaluation and deployment.
Workflow in 5 steps
- Write the task as a plain function first.
- Choose a framework that matches your language and that you can read the source of.
- Start with one tool and typed output.
- Create a small evaluation set of realistic inputs and expected behaviour.
- Add tracing and cost limits before deploying.
Full steps
- Write the task as a plain function first; decide what truly needs a model.
- Choose a framework that matches your language and that you can read the source of.
- Start with one tool and typed output; add tools one at a time.
- Create a small evaluation set of realistic inputs and expected behaviour.
- Add tracing and cost limits before deploying.
Prompts to copy
Starting points we wrote, not tested results.
Write a minimal agent with one tool, get_weather(city), that returns typed output. Include the code to run it and one test with a stubbed tool.
2 more prompts
Add a retry and a timeout around the tool call, and log each step with its inputs and outputs.
List the failure modes of this agent (bad tool arguments, empty results, loops) and add a test for each.
Watch out for
- Agent loops can burn through paid API tokens quickly.
- Agents that can run commands can delete or overwrite files.
- AI output can be fluent and wrong.
- Check each tool's licence before commercial use, and check the licence of any code or text the AI reproduces.
- Frameworks change fast.
- Licence to check before commercial use: Mastra (Apache-2.0 (ee/ excluded)).
- CautionLangChain7 critical-severity known vulnerabilities in runtime dependencies (OSV)
- CautionPydantic AI1 critical-severity known vulnerability in runtime dependencies (OSV)
- No issues foundMastraNo issues found in this week’s scan
- CautionAgent Development Kit (ADK, Python)2 critical-severity known vulnerabilities in runtime dependencies (OSV)
- CautionOpenAI Agents SDK (Python)3 critical-severity known vulnerabilities in runtime dependencies (OSV)
- No dependencies scannedsmolagentsCode checks clean, no lockfile to check
Why these warnings?
- Agent loops can burn through paid API tokens quickly. Set spending limits with your model provider and watch the first few runs.
- Agents that can run commands can delete or overwrite files. Work in a branch or sandbox, commit first, and approve destructive commands by hand.
- AI output can be fluent and wrong. Check facts, code and citations yourself before you rely on them or publish them.
- Check each tool's licence before commercial use, and check the licence of any code or text the AI reproduces.
- Frameworks change fast. Pin versions and check release cadence and open issues before committing.
- LangChain: 7 critical-severity known vulnerabilities in runtime dependencies (OSV)
- Pydantic AI: 1 critical-severity known vulnerability in runtime dependencies (OSV)
- Agent Development Kit (ADK, Python): 2 critical-severity known vulnerabilities in runtime dependencies (OSV); Skill/agent file instructs piping a remote script into a shell: .agents/skills/adk-setup/SKILL.md — curl -LsSf https://astral.sh/uv/install.sh | sh
- OpenAI Agents SDK (Python): 3 critical-severity known vulnerabilities in runtime dependencies (OSV)
- smolagents: code and instruction-file checks found nothing, but there is no runtime lockfile or manifest, so dependencies were not checked
Recommended tools
From our ranked data, highest score first. A high score does not mean a clean scan.
- 54LangChainAgent framework · MIT · #23 overall
- 46Pydantic AIAgent framework · MIT · #31 overall
- 44MastraAgent framework · Apache-2.0 (ee/ excluded) · #33 overall
- 43Agent Development Kit (ADK, Python)Agent framework · Apache-2.0 · #36 overall
- 39OpenAI Agents SDK (Python)Agent framework · MIT · #42 overall
- 30smolagentsAgent framework · Apache-2.0 · #47 overall
Related jobs
Sources for tool facts
langchain-ai/langchain · pydantic/pydantic-ai · mastra-ai/mastra · google/adk-python · openai/openai-agents-python · huggingface/smolagents. Data fetched 2 Nov 2026. Scores and labels are automated, relative and not a hands-on test.
Get the board every Monday
One email a week: the new top 10, the biggest score changes and every safety label that changed.
Free. Double opt-in: you confirm by email first, unsubscribe in one click.