Agno's ClaudeAgent takes the SDK's own ClaudeAgentOptions through options, and CodexAgent takes ThreadOptions and TurnOptions, typed dictionaries exported from agno.agents.codex that use the Codex SDK's parameter names. Named fields on the agent, such as allowed_tools or sandbox, win over the same setting in those options whenever they are set.
from claude_agent_sdk import ClaudeAgentOptions
from agno.agents.claude import ClaudeAgent
from agno.agents.codex import CodexAgent
claude = ClaudeAgent(
name="Claude",
allowed_tools=["Read"],
options=ClaudeAgentOptions(max_turns=3),
)
codex = CodexAgent(
name="Codex",
sandbox="read-only",
thread_options={"personality": "pragmatic"},
turn_options={"effort": "high"},
)ClaudeAgent also gains named fields for tools, setting_sources, strict_mcp_config, skills and plugins, and CodexAgent for model_provider, service_tier, mcp_servers and client_options. The old dictionaries keep working and warn on construction.
# real output
DeprecationWarning: options_kwargs is deprecated; use options=ClaudeAgentOptions(...) or named parameters. Named parameters override options; options_kwargs retains legacy precedence.
DeprecationWarning: thread_kwargs is deprecated; use thread_options. Named settings take precedence.Both constructors are keyword-only now. Earlier releases read ClaudeAgent("Claude") as the agent's name, and this release refuses it.
# real output
TypeError: ClaudeAgent.__init__() takes 1 positional argument but 2 were givenagent.sdk names the SDK an adapter wraps ("claude-agent-sdk" or "codex"), and the agents and session APIs report only sdk. The older agent.framework attribute stays on the Python object as an alias.
print_response and aprint_response return the final RunOutput and raise once a failed or cancelled run has printed, so a failing script stops at the failure. Pass raise_on_error=False to get the run back and check its status yourself. We ran it on both releases with a Claude Agent SDK stand-in whose subprocess exits with code 1.
# real output, summarised: ClaudeAgent(name="Claude").print_response("hi", stream=False)
Before: returned None, no exception
Now: AgentRunException: Command failed with exit code 1See the cookbook, and learn more about configuring Claude and Codex in the documentation.
Frequently asked questions
Build a ClaudeAgentOptions from claude_agent_sdk and pass it as options=. Named ClaudeAgent fields such as allowed_tools or model win over the same setting in options whenever they are not None.
Yes, with a DeprecationWarning. Move them to options, thread_options and turn_options. Passing both the old and the new form on one agent raises a ValueError.
The final RunOutput. A failed run raises AgentRunException and a cancelled one raises RunCancelledException after the output is printed. Pass raise_on_error=False to get the unsuccessful RunOutput back without an exception.
Read agent.sdk, which is "claude-agent-sdk" for ClaudeAgent and "codex" for CodexAgent. agent.framework returns the same value for older code.



