Skip to content
BENIBIX Learn

ClaudeAgentOptions

AI🧩 Claude Agent SDKAgent SDK Basics

Also known as Options (TypeScript), Agent SDK options object

The one object that holds all the settings for a session.

Think of it like

It is like the list of house rules you give a sitter.

Example

Leo wants a safe agent that only reads code. He sets allowed_tools to Read and Glob in ClaudeAgentOptions.

Why it matters

It is where you decide what the agent may do, how far it may go and what it costs.

Definition

ClaudeAgentOptions is the Python type that holds the settings for a session. In TypeScript it is called Options. Each field is optional. They cover the model, the tools, the permission mode, the system prompt, the limits, MCP servers and hooks. With no options, the session runs on the defaults.

Example code

python
options = ClaudeAgentOptions(
    allowed_tools=["Read", "Glob"],
    max_turns=5,
)
A read-only agent that stops after five turns.

Common mistake

Looking for temperature or max tokens here. They are not options. Set the effort or a budget.

Key takeaways

  1. 1
    All fields optional. Defaults apply.
  2. 2
    Options in TypeScript. Same fields, camelCase.
  3. 3
    No temperature. Use effort.