Skip to main content
Claude Fable 5 and Mythos 5 are Anthropic’s latest frontier models, and both are supported in Swarms from day one. There are no migrations, no infrastructure changes, and no special configuration — switching to Fable 5 is a single line change:
This tutorial walks through everything you need to build, configure, and scale agents and multi-agent systems on Fable 5.

What’s new

  • Fable 5 — state-of-the-art on nearly all tested benchmarks, with exceptional performance in software engineering, knowledge work, scientific research, and vision. The longer and more complex the task, the larger Fable 5’s lead over earlier Claude models.
  • Mythos 5 — the same underlying model as Fable 5, but with safeguards lifted in some areas. Restricted to Glasswing partners (defensive cybersecurity and biomedical research). For most users, Fable 5 is the right default.
  • Built-in safeguards — Fable 5 detects requests in narrow risk areas (cybersecurity, biology, chemistry, distillation) and quietly falls back to Opus 4.8 on those queries. Fallbacks happen in under 5% of sessions on average, and users are informed when they occur.
Fable 5 is automatically routed through LiteLLM by Swarms. As long as your ANTHROPIC_API_KEY is set, no other configuration is needed.
Two important limitations:
  • Tools / function calling are not supported on Fable 5. Leave tools=None and tools_list_dictionary=None on every Fable 5 agent. If you need tool use, route those calls to a different model (e.g. claude-sonnet-4-6 or gpt-4.1) and use Fable 5 as the reasoning/synthesis layer.
  • temperature is not supported. Always pass temperature=None. Setting a numeric value will be ignored at best and rejected at worst — the model uses its own internal sampling.
top_p should likewise be left as None.

Installation

Environment Setup

Set your Anthropic API key:
Or create a .env file:

Quick Start

The minimum needed to run a Fable 5 agent:
That’s it. Every Swarms feature — tools, streaming, multi-agent orchestration, MCP, vision — works against Fable 5 with no additional setup.

Complete Example: Quantitative Trading Agent

Here is a fully-configured Fable 5 agent tuned for finance research. This is a good template to copy for serious workloads — it uses extended thinking, high reasoning effort, and a detailed system prompt:

Why these parameter choices?

Extended Thinking & Reasoning Effort

Fable 5 supports Anthropic’s extended thinking. Swarms exposes this through two parameters:
  • thinking_tokens — the maximum number of tokens the model can spend on internal reasoning before producing its final answer. Larger budgets help on multi-step problems (proofs, code refactors, deep research) at the cost of latency and tokens.
  • reasoning_effort — a coarse dial. "low" is roughly chat-quality, "medium" is the default for analytical work, "high" is best for hard problems where you want the model to think before answering.
When thinking_tokens is set, Swarms automatically filters the redundant think tool out of its planning tools list (the model is already reasoning). You don’t need to configure anything to get this behavior.

Choosing budgets

Streaming

Stream tokens straight to stdout:
Or pipe tokens to your own callback (useful for dashboards, websockets, or audio synthesis):
For async streaming, use arun_stream:

Tools (Not Supported)

Fable 5 does not support function calling / tool use. Passing tools=[...] or tools_list_dictionary=[...] to a Fable 5 agent will not work. If your workflow needs tools, the recommended pattern is to split responsibilities across two agents — a tool-calling model gathers the data, and Fable 5 does the reasoning over it:
This pattern keeps Fable 5 focused on what it does best — reasoning, synthesis, and writing — while letting another model handle the I/O.

Vision

Fable 5 has strong vision capabilities. Pass an image path, URL, or base64 string to run():

Autonomous Loops

For agents that should plan, execute, and reflect until done, set max_loops="auto":
Fable 5 is particularly well-suited to autonomous loops — the longer the task, the larger its lead. Combine it with persistent_memory=True and context_compression=True for long-running production agents.

Multi-Agent Systems with Fable 5

Every Swarms multi-agent structure works with Fable 5 the same way it works with any other model — just set model_name="anthropic/claude-fable-5" on the agents.
The examples below omit temperature=None, top_p=None, and tools_list_dictionary=None for readability, but every Fable 5 agent you create still needs them. If you want a tool-calling agent in the mix, give that role to a different model (e.g. claude-sonnet-4-6) and let Fable 5 do the reasoning.

Sequential Workflow

Concurrent Workflow

Run several Fable 5 agents in parallel:

Mixture of Agents

Fable 5 also makes an excellent aggregator on top of cheaper worker models — let smaller models propose ideas in parallel and have Fable 5 synthesize the final answer:

Hierarchical Swarm

Make Fable 5 the director and let cheaper models be the workers:

Safety Fallbacks

Fable 5 detects requests in a narrow set of high-risk topic areas (cybersecurity, biology, chemistry, distillation-style extraction) and silently routes those queries to Opus 4.8 instead. Anthropic reports that fallbacks happen in under 5% of sessions on average, and the user is informed whenever a fallback occurs. For Swarms users this means:
  • You don’t need to do anything. Fallback is handled inside the Anthropic API; Swarms surfaces the response normally.
  • Your agent may occasionally return text noting that a different model answered. This is expected behavior, not an error.
  • If your domain is consistently flagged (e.g. legitimate defensive cybersecurity work), apply for access to Mythos 5 — see below.

Mythos 5 (Restricted Access)

Mythos 5 is the same underlying model as Fable 5, but with safeguards lifted in some areas. It is currently restricted to Glasswing partners working on defensive cybersecurity and biomedical research. Anthropic plans to expand access through a broader trusted-access program. If you have access, use it the same way as Fable 5:
If you receive an authentication or access error, your API key is not yet whitelisted for Mythos 5 — contact Anthropic to apply.

Production Best Practices

When deploying Fable 5 agents to production, these defaults work well:

Cost Controls

  • Tier reasoning effort to task complexity"low" for triage and routing, "high" only for the work that needs it.
  • Cap thinking_tokens per agent — start at 1024 and only increase if quality demands it.
  • Use Fable 5 as the aggregator, not every worker — Mixture of Agents and Hierarchical Swarms get most of the benefit when only the top of the hierarchy runs on Fable 5.
  • Set max_loops explicitly — avoid "auto" in production unless you have a hard timeout or token budget elsewhere.

Observability

Set verbose=True and autosave=True during development so you can inspect every loop. In production, prefer your own logging via streaming_callback rather than stdout.

Troubleshooting

AuthenticationError — your ANTHROPIC_API_KEY isn’t set or doesn’t have access to Fable 5. Run echo $ANTHROPIC_API_KEY and confirm. Empty responses on reasoning tasks — if you previously hit a regression where non-OpenAI providers returned empty strings when reasoning_effort was set, this was fixed in Swarms v12. Make sure you’re on the latest release: pip install -U swarms. Slow responses — Fable 5 with thinking_tokens=16000 and reasoning_effort="high" is deliberately slow because the model is reasoning before answering. Drop both to 1024 / "medium" for routine tasks. Mythos 5 returns access errors — your API key isn’t whitelisted for Mythos 5. Apply through Anthropic’s trusted access program or stay on Fable 5.

Next Steps