# Mastra vs TradingAgents

> Mastra scores 74.2 (BB) to TradingAgents's 61.4 (C) for agent frameworks. Prices, MCP, x402, uptime and agent notes side by side.

- Canonical: https://www.anchorterminal.com/compare/mastra-vs-tradingagents
- Markdown: https://www.anchorterminal.com/compare/mastra-vs-tradingagents.md (~5,000 tokens)
- Site index for agents: https://www.anchorterminal.com/llms.txt (the key docs and every listing in one file, at most 16 MB, about 4 million tokens: https://www.anchorterminal.com/llms-full.txt)
- API: https://www.anchorterminal.com/api/v1/index.json
- MCP: https://www.anchorterminal.com/mcp (the whole catalogue as tools, no key)
- DNS: dig +short TXT <slug>.grade.anchorterminal.com (the grade as a DNS TXT record, for a sandbox with no HTTP where names still resolve; also top., best.<category>. and <a>.vs.<b>. under the zone, and the same under grade.letme.dev)
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)
- Updated: 2026-11-07

Mastra scores 74.2 (BB) on agent readiness against TradingAgents's 61.4 (C), and leads in 6 of 7 scored categories. Both do agent frameworks.

- Mastra: grade BB, 74.2/100, rank #91 of 1510. Markdown https://www.anchorterminal.com/tools/mastra.md · JSON https://www.anchorterminal.com/api/v1/tools/mastra.json
- TradingAgents: grade C, 61.4/100, rank #617 of 1510. Markdown https://www.anchorterminal.com/tools/tradingagents.md · JSON https://www.anchorterminal.com/api/v1/tools/tradingagents.json
- Best agent frameworks and SDKs: https://www.anchorterminal.com/best/frameworks/index.md
- All 171 frameworks comparisons: https://www.anchorterminal.com/compare/frameworks/index.md

## Which one, for what

### Mastra (BB)

Good for: TypeScript teams that want agents, workflows, memory, evals and a local Studio in one framework.

Ahead on:
- Reliability, 87 against 52
- Schema & documentation, 98 against 61
- Agent ergonomics, 92 against 61
- Security & auth, 67 against 62
- Maintenance & community, 96 against 78

Also in its favour:
- Agent-ready, a grade of BB or better

Watch for: Malicious versions of Mastra npm packages, including @mastra/core 1.42.1, were published on 17 June 2026

### TradingAgents (C)

Good for: Researchers who want a fixed multi-agent analysis of one listed instrument or crypto pair on a date, with point-in-time data for backtests, and who will run Python.

Also in its favour:
- No incidents deducted, where Mastra loses 8 points for them

Watch for: No MCP client or MCP server, so an agent drives it only through Python or the CLI


## Why the edge

### Schema & documentation: Mastra +37

- Mastra (98): Typed TypeScript API with a reference section (25). llms.txt with a when-to-use list and condensed instructions for coding agents (10). The docs say when to use durable agents, and point multi-agent users from `.network()` to supervisor agents (20). Tools take Zod schemas (15). Examples on every page, and MastraError with ids and categories documented, though errors are spread across pages (13). Per-package changelogs and migration guides (15).
- TradingAgents (61): Framework reading. No API reference or docs site. Typed interfaces exist in the source, Pydantic models for the research manager's, trader's and portfolio manager's outputs and Annotated signatures on the twelve data tools, with no py.typed marker (10 of 25). The README and changelog are Markdown in the repository; no llms.txt (4 of 10). The README states limits plainly, that runs vary, which statements past-dated runs withhold and why, and that it is a research tool, not advice (15 of 20). Configuration is a plain dict of string keys, though environment overrides are coerced to the default's type and fail loudly on a bad value (8 of 15). Runnable Python and CLI examples throughout the README; the vendor error hierarchy is documented only in source docstrings (9 of 15). Dated changelog for every release from 0.1.0 with upgrade notes (15).

### Reliability: Mastra +35

- Mastra (87): Official npm packages, Node 22.13 or newer (20). Public CI workflows for unit, store, workspace and e2e tests; on 6 November the newest runs on main (Version Packages, Trigger Cloud Integration Tests) succeeded, while the test workflows themselves run on pull requests (22). 436 open issues and 795 open issues and pull requests on 6 November from GitHub's API, with 2,077 issues opened in the 90 days to 3 November; all 50 newest had a comment and 24 were closed, with issue-triage automation (18). A changesets CHANGELOG per package, a CI gate that needs approval for any major bump and migration guides, but no written versioning policy found, and `.network()` is deprecated without a removal date (12). 1.82.0 (15). 20+22+18+12+15 = 87, up from 74 on 6 October, when GitHub couldn't be read.
- TradingAgents (52): Read with the local-software lines, because the owner runs it. Python 3.11 or later is stated and CI tests 3.11 to 3.14, but the project publishes no PyPI package. No workflow uploads one, and the README installs from a clone or Docker Compose. From 0.7.0 a release workflow builds a wheel and source archive from each tag and attaches them to the GitHub release (12 of 20). Public CI on every push and pull request runs the test suite (about 1,009 test functions at v0.7.1) on four Python versions and once in America/New_York, a clean-install import check and Ruff. The 25 October check read the pass state from shields.io, a third-party copy of GitHub data this run doesn't use, so that reading is struck, and the pass state on main is unread (15, as berth and agentvfs). Issue counts came from the same source and are struck too. On the clone, 0.7.1 (27 October) fixes 22 numbered issues, 17 of them above #1518, the newest fixed in 0.7.0 on 16 October, and credits 15 outside contributors; open crash or regression issues and reply times are unread (15, as berth on the same pattern). The changelog follows Keep a Changelog and Semantic Versioning and lists breaking changes under "Upgrading from", but 0.5.1, a patch release, moved import paths and removed classes (10 of 15). Version 0.7.1 with no stability statement (0). 12+15+15+10+0 = 52.

### Agent ergonomics: Mastra +31

- Mastra (92): An MCP client in about ten lines with listTools() for static or listToolsets() for per-request tools, and ToolSearchProcessor for loading tools on demand (25). Step limits, memory windows and processors such as a token limiter control what reaches the model (20). MastraError with ids and categories, and processors can abort with a reason the caller can read (17). Workflow step retries, snapshots and durable agents for resuming (20). create-mastra scaffolds a project and the model router takes a plain string, but it's TypeScript only (10).
- TradingAgents (61): Framework reading, scored on what an outside agent needs to call it. No MCP client or server, so it can't be attached as tools; a run is four lines of Python (`TradingAgentsGraph(config=...).propagate(ticker, date)`) or one headless CLI command with flags (10 of 25). Analyst selection, debate and risk rounds (default 1), `max_tool_rounds` (20), `max_recur_limit` (100), article limits and `--no-html` size a run (14 of 20). A typed vendor error hierarchy separates unavailable from absent data, the headless CLI names the missing flag before a run starts, and an unparseable decision returns REVIEW rather than Hold (15 of 20). Checkpoint resume is opt-in, a backtest rerun with the same `run_id` skips finished cells, and settlement writes each decision once; nothing writes to an outside system (15 of 20). Sensible defaults, but the default provider is OpenAI's GPT-6 models with a key, and Python only (7 of 15).

### Maintenance & community: Mastra +18

- Mastra (96): @mastra/core 1.82.0 on 2026-11-04 (30). 27 stable releases in the 90 days to 6 November, 8 of them since 6 October (20). 436 open issues on 6 November, all 50 newest issues commented and 24 of them closed (22). Client, MCP and store packages are current, and @mastra/mcp 1.x stays supported beside 2.x (15). Renovate and CI configured, with the newest runs on main passing (9). 30+20+22+15+9 = 96.
- TradingAgents (78): 0.7.1 on 27 October 2026 (30). Seven releases in the 90 days to 2 November, 0.4.0 (31 August), 0.5.0, 0.5.1, 0.5.2, 0.6.0, 0.7.0 and 0.7.1 (20). The earlier issue and pull request counts came from shields.io and are struck. On the clone, fixes cite issue numbers and each release credits the people who reported or fixed them (15 outside contributors in 0.7.1), but 251 of the 258 commits since 4 August are by one maintainer's accounts and reply times couldn't be read (13 of 25, as pipecat on clone evidence). No PyPI package; versions ship as GitHub releases with a wheel since 0.7.0 (8 of 15). CI with tests, lint and a clean-install check; dependencies set lower bounds only and no Dependabot configuration is in the repository (7 of 10). 30+20+13+8+7 = 78.

### Security & auth: Mastra +5

- Mastra (67): The CLI sends PostHog analytics, server startup sends token counts per model and a count of registered agents, tools and MCP servers, and Studio sends browser analytics, all on by default and documented, with one opt-out, MASTRA_TELEMETRY_DISABLED=1. Since #26986 (16 October 2026) each server process also reports token use per provider and model every 15 minutes, and the telemetry reference read on 6 November says server events carry a project identifier that is a raw Platform UUID or a hash of the Git origin remote, so they "aren't anonymous" (12). requireToolApproval on agents and MCP servers, allowedHosts for MCP HTTP, a curated environment for stdio servers, and sandboxed workspaces (20). PromptInjectionDetector, PII and moderation processors, and docs that call tool results untrusted model input (15). Built-in tracing with OpenTelemetry and other exporters (15). No SECURITY.md, no security.txt and no bug bounty found. A blog post says Mastra is SOC 2 Type II audited, which isn't scored for a framework, and we found no public advisory from Mastra about the June incident (5). Framework reading. 15+20+15+15+5 = 70 on 6 October, 12+20+15+15+5 = 67 on 6 November.
- TradingAgents (62): Framework reading. 30 for what leaves the machine and how credentials are held, 20 for least privilege and approvals, 15 for prompt injection, 15 for audit and 20 for the security programme. Keys are read from the environment, and the package loads the nearest .env on import by walking up from the working directory. The ChatGPT sign-in uses PKCE and dynamic client registration, keeps tokens in a 0600 file and revokes them on logout. The only calls of its own are the interactive CLI's daily release and notice check, with no run data, off without a terminal or with TRADINGAGENTS_NO_UPDATE_CHECK=1. SEC EDGAR gets a placeholder contact address unless one is set (24 of 30). It places no orders and holds no broker credentials, the data tools only read, and every ticker is validated before it is used in a file path. No approval hooks, which nothing in it needs (14 of 20). News, Reddit and StockTwits text goes into prompts. The source names prompt injection as the reason for path validation, but no guidance on injection was found in the README (5 of 15). Saved reports record the run's settings and each agent's report, the memory log keeps every decision, and `debug=True` streams the graph (11 of 15). Security reports go to GitHub private vulnerability reporting per the issue template, and the changelog has Security sections for a langchain-core patch and a dependency removed over CVE-2026-22218. No SECURITY.md, no security.txt on tauric.ai (404 on 2 November), no bounty, and the repository's advisories page wasn't read (8 of 20). 24+14+5+11+8 = 62.

## Score by category

| Category | Weight | Mastra | TradingAgents | Edge |
| --- | --- | --- | --- | --- |
| Reliability | 16% (20 this run) | 87 | 52 | Mastra +35 |
| Performance | 10%, pending | pending | pending | not scored in this run |
| Schema & documentation | 13% (16.2 this run) | 98 | 61 | Mastra +37 |
| Agent ergonomics | 13% (16.2 this run) | 92 | 61 | Mastra +31 |
| Security & auth | 14% (17.5 this run) | 67 | 62 | Mastra +5 |
| Payments & pricing | 10% (12.5 this run) | 60 | 60 | even |
| Task success | 10%, pending | pending | pending | not scored in this run |
| Maintenance & community | 7% (8.8 this run) | 96 | 78 | Mastra +18 |
| Transparency & trust | 7% (8.8 this run) | 72 | 68 | Mastra +4 |
| Negative events | ≤15 | -8 | 0 | |
| **Total** | | **74.2 · BB** | **61.4 · C** | |

## Facts side by side

| Fact | Mastra | TradingAgents |
| --- | --- | --- |
| Kind | Agent framework | Agent framework |
| Vendor | Kepler Software, Inc. | Tauric Research |
| Hosted endpoint | no (local only) | no (local only) |
| Transports |  |  |
| Auth | API key | API key |
| Pricing | Free | Free |
| x402 | no | no |
| Licence | Apache-2.0 for the core. Code under ee/ directories is source-available under the Mastra Enterprise License, free for development and testing | Apache-2.0 |
| Read-only variant documented | no | no |
| llms.txt | yes | no |
| Last release | 2026-11-04 | 2026-10-27 |
| Terms last updated | 2026-10-26 | 2026-10-23 |
| Privacy policy last updated | no date given | 2026-10-23 |
| Customer content may train models | yes | not found in the text |
| Terms restrict automated access | yes | not found in the text |
| Terms restrict benchmarking | not found in the text | not found in the text |
| Terms or service can change without notice | yes | not found in the text |
| Arbitration or class-action waiver | yes | not found in the text |
| Popularity | 29k stars, 3.1M npm/wk | none |

## How the scores have moved

### Mastra

No score change since it was listed.

### TradingAgents

- -3.3 on 2 November 2026 (B to C): correction
- -0.1 on 30 October 2026: checklist
- +0.1 on 27 October 2026: checklist

## Verdicts

**Mastra.** A TypeScript framework with agents, workflows with suspend and resume, memory, an MCP client and server, per-server tool approval and built-in guardrail processors including a prompt-injection detector. On 17 June 2026 malicious versions of its npm packages were published, and the CLI, server and Studio send usage analytics by default, with token counts every 15 minutes.

**TradingAgents.** An Apache 2.0 LangGraph framework at 0.7.1 with seven releases in 90 days, a dated changelog with upgrade notes, a public test matrix and point-in-time rules for historical runs. It has no MCP client or server, no PyPI package and no documentation beyond the README, and its output is a model-written rating that places no orders.

## Before you call either

### Mastra

1. Set MASTRA_TELEMETRY_DISABLED=1 in every environment that runs the CLI, the server or Studio
2. Pin exact versions with a lockfile, and make sure no 17 June 2026 release such as @mastra/core 1.42.1 is installed
3. Set requireToolApproval on MCP servers that write, and allowedHosts when server URLs come from configuration
4. Add PromptInjectionDetector as an input processor when tools return web or user content
5. Use supervisor agents through generate() or stream(). `.network()` is deprecated

### TradingAgents

1. Run headless with `tradingagents --ticker <T> --date <YYYY-MM-DD> --analysts market,news,fundamentals --save --no-show`; a missing answer stops the run and names the flag
2. Guard on the REVIEW signal before mapping `propagate()`'s decision to a rating; it means no rating could be parsed
3. Set SEC_EDGAR_USER_AGENT to the operator's own name and address before fetching US fundamentals
4. Keep provider keys out of the working directory tree unless intended, since the package loads the nearest .env on import
5. Treat the rating as model output for research; the framework places no orders and its results vary between runs

## Questions

### Which is better for AI agents, Mastra or TradingAgents?

Mastra scores 74.2 (BB) on agent readiness against TradingAgents's 61.4 (C), and leads in 6 of 7 scored categories.

### Are Mastra and TradingAgents open source?

Yes. Mastra is open source (Apache-2.0 for the core. Code under ee/ directories is source-available under the Mastra Enterprise License, free for development and testing). TradingAgents is open source (Apache-2.0).


## For agents

- This comparison as JSON: https://www.anchorterminal.com/compare/mastra-vs-tradingagents.json, and with the fewest tokens: https://www.anchorterminal.com/compare/mastra-vs-tradingagents.min.md
- Over MCP at https://www.anchorterminal.com/mcp (no key): `compare_tools {"a": "mastra", "b": "tradingagents"}`. From a terminal: `anchor compare mastra tradingagents`
- Each listing in full: https://www.anchorterminal.com/api/v1/tools/mastra.json and https://www.anchorterminal.com/api/v1/tools/tradingagents.json

## Other comparisons with Mastra or TradingAgents

- [AgentOS vs Mastra](https://www.anchorterminal.com/compare/agentos-vs-mastra.md)
- [AgentOS vs TradingAgents](https://www.anchorterminal.com/compare/agentos-vs-tradingagents.md)
- [Agno vs Mastra](https://www.anchorterminal.com/compare/agno-vs-mastra.md)
- [Agno vs TradingAgents](https://www.anchorterminal.com/compare/agno-vs-tradingagents.md)
- [BoxLang AI vs Mastra](https://www.anchorterminal.com/compare/boxlang-ai-vs-mastra.md)
- [BoxLang AI vs TradingAgents](https://www.anchorterminal.com/compare/boxlang-ai-vs-tradingagents.md)
- [Claude Agent SDK vs Mastra](https://www.anchorterminal.com/compare/claude-agent-sdk-vs-mastra.md)
- [Claude Agent SDK vs TradingAgents](https://www.anchorterminal.com/compare/claude-agent-sdk-vs-tradingagents.md)
- [CrewAI vs Mastra](https://www.anchorterminal.com/compare/crewai-vs-mastra.md)
- [CrewAI vs TradingAgents](https://www.anchorterminal.com/compare/crewai-vs-tradingagents.md)
- [Cursor Agent SDK vs Mastra](https://www.anchorterminal.com/compare/cursor-agent-sdk-vs-mastra.md)
- [Cursor Agent SDK vs TradingAgents](https://www.anchorterminal.com/compare/cursor-agent-sdk-vs-tradingagents.md)
- [Docker Agent vs Mastra](https://www.anchorterminal.com/compare/docker-agent-vs-mastra.md)
- [Docker Agent vs TradingAgents](https://www.anchorterminal.com/compare/docker-agent-vs-tradingagents.md)
- [Agent Development Kit (ADK) vs Mastra](https://www.anchorterminal.com/compare/google-adk-vs-mastra.md)
- [Agent Development Kit (ADK) vs TradingAgents](https://www.anchorterminal.com/compare/google-adk-vs-tradingagents.md)
- [guilds.run vs Mastra](https://www.anchorterminal.com/compare/guilds-run-vs-mastra.md)
- [guilds.run vs TradingAgents](https://www.anchorterminal.com/compare/guilds-run-vs-tradingagents.md)
- [LangGraph vs Mastra](https://www.anchorterminal.com/compare/langgraph-vs-mastra.md)
- [LangGraph vs TradingAgents](https://www.anchorterminal.com/compare/langgraph-vs-tradingagents.md)
- [LlamaIndex Framework vs Mastra](https://www.anchorterminal.com/compare/llamaindex-vs-mastra.md)
- [LlamaIndex Framework vs TradingAgents](https://www.anchorterminal.com/compare/llamaindex-vs-tradingagents.md)
- [Mastra vs Microsoft Agent Framework](https://www.anchorterminal.com/compare/mastra-vs-microsoft-agent-framework.md)
- [Mastra vs OpenAI Agents SDK](https://www.anchorterminal.com/compare/mastra-vs-openai-agents-sdk.md)
- [Mastra vs Pydantic AI](https://www.anchorterminal.com/compare/mastra-vs-pydantic-ai.md)
- [Mastra vs smolagents](https://www.anchorterminal.com/compare/mastra-vs-smolagents.md)
- [Mastra vs Strands Agents](https://www.anchorterminal.com/compare/mastra-vs-strands-agents.md)
- [Mastra vs AI SDK](https://www.anchorterminal.com/compare/mastra-vs-vercel-ai-sdk.md)
- [Microsoft Agent Framework vs TradingAgents](https://www.anchorterminal.com/compare/microsoft-agent-framework-vs-tradingagents.md)
- [OpenAI Agents SDK vs TradingAgents](https://www.anchorterminal.com/compare/openai-agents-sdk-vs-tradingagents.md)
- [Pydantic AI vs TradingAgents](https://www.anchorterminal.com/compare/pydantic-ai-vs-tradingagents.md)
- [smolagents vs TradingAgents](https://www.anchorterminal.com/compare/smolagents-vs-tradingagents.md)
- [Strands Agents vs TradingAgents](https://www.anchorterminal.com/compare/strands-agents-vs-tradingagents.md)
- [TradingAgents vs AI SDK](https://www.anchorterminal.com/compare/tradingagents-vs-vercel-ai-sdk.md)

---

Query this catalogue directly over MCP: https://www.anchorterminal.com/mcp (Streamable HTTP, no key). How: https://www.anchorterminal.com/agents/#mcp
