Tools
List Tools For Agent
Attach Tool To Agent
Detach Tool From Agent
Update Approval For Tool
Run Tool For Agent
ModelsExpand Collapse
class ToolExecutionResult: …
Deprecatedagent_state: Optional[AgentState]
Representation of an agent’s state. This is the state of the agent at a given time, and is persisted in the DB backend. The state has all the information needed to recreate a persisted agent.
Deprecated: Use model field instead. The LLM configuration used by the agent.
model_endpoint_type: Literal["openai", "anthropic", "google_ai", 27 more]
The endpoint type for the model.
enable_reasoner: Optional[bool]
Whether or not the model should use extended thinking if it is a ‘reasoning’ style model
frequency_penalty: Optional[float]
Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model’s likelihood to repeat the same line verbatim. From OpenAI: Number between -2.0 and 2.0.
max_reasoning_tokens: Optional[int]
Configurable thinking budget for extended thinking. Used for enable_reasoner and also for Google Vertex models like Gemini 2.5 Flash. Minimum value is 1024 when used with enable_reasoner.
max_tokens: Optional[int]
The maximum number of tokens to generate. If not set, the model will use its default value.
Deprecatedparallel_tool_calls: Optional[bool]
Deprecated: Use model_settings to configure parallel tool calls instead. If set to True, enables parallel tool calling. Defaults to False.
put_inner_thoughts_in_kwargs: Optional[bool]
Puts ‘inner_thoughts’ as a kwarg in the function call if this is set to True. This helps with function calling performance and also the generation of inner thoughts.
response_format: Optional[ResponseFormat]
return_logprobs: Optional[bool]
Whether to return log probabilities of the output tokens. Useful for RL training.
return_token_ids: Optional[bool]
Whether to return token IDs for all LLM generations via SGLang native endpoint. Required for multi-turn RL training with loss masking. Only works with SGLang provider.
strict: Optional[bool]
Enable strict mode for tool calling. When true, tool schemas include strict: true and additionalProperties: false, guaranteeing tool outputs match JSON schemas.
temperature: Optional[float]
The temperature to use when generating text with the model. A higher temperature will result in more random text.
tool_call_parser: Optional[str]
SGLang tool call parser name (e.g. ‘glm47’, ‘qwen25’, ‘hermes’). Used by the SGLang native adapter to parse tool calls from raw model output.
Deprecatedmemory: Memory
Deprecated: Use blocks field instead. The in-context memory of the agent.
file_blocks: Optional[List[MemoryFileBlock]]
Deprecatedsources: List[Source]
The tools used by the agent.
default_requires_approval: Optional[bool]
Default value for whether or not executing this tool requires approval.
enable_parallel_execution: Optional[bool]
If set to True, then this tool will potentially be executed concurrently with other tools. Default False.
compaction_settings: Optional[CompactionSettings]
Configuration for conversation compaction / summarization.
Per-model settings (temperature, max tokens, etc.) are derived from the default configuration for that handle.
clip_chars: Optional[int]
The maximum length of the summary in characters. If none, no clipping is performed.
model: Optional[str]
Model handle to use for sliding_window/all summarization (format: provider/model-name). If None, uses lightweight provider-specific defaults.
model_settings: Optional[CompactionSettingsModelSettings]
Optional model settings used to override defaults for the summarizer model.
class OpenAIModelSettings: …
response_format: Optional[ResponseFormat]
class CompactionSettingsModelSettingsSgLangModelSettings: …
SGLang model configuration (OpenAI-compatible runtime with SGLang-specific parsing).
response_format: Optional[CompactionSettingsModelSettingsSgLangModelSettingsResponseFormat]
class AnthropicModelSettings: …
response_format: Optional[ResponseFormat]
strict: Optional[bool]
Enable strict mode for tool calling. When true, tool outputs are guaranteed to match JSON schemas.
class GoogleAIModelSettings: …
class GoogleVertexModelSettings: …
class AzureModelSettings: …
class XaiModelSettings: …
class CompactionSettingsModelSettingsMoonshotModelSettings: …
Moonshot/Kimi model configuration (OpenAI-compatible).
response_format: Optional[CompactionSettingsModelSettingsMoonshotModelSettingsResponseFormat]
class CompactionSettingsModelSettingsZaiModelSettings: …
Z.ai (ZhipuAI) model configuration (OpenAI-compatible).
class CompactionSettingsModelSettingsMoonshotCodingModelSettings: …
Kimi Code model configuration (Anthropic-compatible).
response_format: Optional[CompactionSettingsModelSettingsMoonshotCodingModelSettingsResponseFormat]
strict: Optional[bool]
Enable strict mode for tool calling. When true, tool outputs are guaranteed to match JSON schemas.
class GroqModelSettings: …
class DeepseekModelSettings: …
class TogetherModelSettings: …
class BedrockModelSettings: …
class CompactionSettingsModelSettingsBasetenModelSettings: …
Baseten model configuration (OpenAI-compatible).
class CompactionSettingsModelSettingsOpenRouterModelSettings: …
Deprecatedembedding_config: Optional[EmbeddingConfig]
enable_sleeptime: Optional[bool]
If set to True, memory management will move to a background agent thread.
identities: Optional[List[Identity]]
Deprecatedidentity_ids: Optional[List[str]]
Deprecated: Use identities field instead. The ids of the identities associated with this agent.
last_run_completion: Optional[datetime]
The timestamp when the agent last completed a run.
managed_group: Optional[ManagedGroup]
The multi-agent group that this agent manages
max_message_buffer_length: Optional[int]
The desired maximum length of messages in the context window of the convo agent. This is a best effort, and may be off slightly due to user/assistant interleaving.
max_files_open: Optional[int]
Maximum number of files that can be open at once for this agent. Setting this too high may exceed the context window, which will break the agent.
message_buffer_autoclear: Optional[bool]
If set to True, the agent will not remember previous messages (though the agent will still retain state via core memory blocks and archival/recall memory). Not recommended unless you have an advanced use case.
model_settings: Optional[ModelSettings]
The model settings used by the agent.
class OpenAIModelSettings: …
response_format: Optional[ResponseFormat]
class ModelSettingsSgLangModelSettings: …
SGLang model configuration (OpenAI-compatible runtime with SGLang-specific parsing).
response_format: Optional[ModelSettingsSgLangModelSettingsResponseFormat]
class AnthropicModelSettings: …
response_format: Optional[ResponseFormat]
strict: Optional[bool]
Enable strict mode for tool calling. When true, tool outputs are guaranteed to match JSON schemas.
class GoogleAIModelSettings: …
class GoogleVertexModelSettings: …
class AzureModelSettings: …
class XaiModelSettings: …
class ModelSettingsMoonshotModelSettings: …
Moonshot/Kimi model configuration (OpenAI-compatible).
response_format: Optional[ModelSettingsMoonshotModelSettingsResponseFormat]
class ModelSettingsZaiModelSettings: …
class ModelSettingsMoonshotCodingModelSettings: …
Kimi Code model configuration (Anthropic-compatible).
response_format: Optional[ModelSettingsMoonshotCodingModelSettingsResponseFormat]
strict: Optional[bool]
Enable strict mode for tool calling. When true, tool outputs are guaranteed to match JSON schemas.
class GroqModelSettings: …
class DeepseekModelSettings: …
class TogetherModelSettings: …
class BedrockModelSettings: …
class ModelSettingsOpenRouterModelSettings: …
Deprecatedmulti_agent_group: Optional[MultiAgentGroup]
Deprecated: Use managed_group field instead. The multi-agent group that this agent manages.
max_message_buffer_length: Optional[int]
The desired maximum length of messages in the context window of the convo agent. This is a best effort, and may be off slightly due to user/assistant interleaving.
pending_approval: Optional[ApprovalRequestMessage]
A message representing a request for approval to call a tool (generated by the LLM to trigger tool execution).
Args: id (str): The ID of the message date (datetime): The date the message was created in ISO format name (Optional[str]): The name of the sender of the message tool_call (ToolCall): The tool call
otid: Optional[str]
The offline threading id (OTID). Set by the client to deduplicate requests. Used for idempotency in background streaming mode — each message in a request must have a unique OTID. Retries of the same request should reuse the same OTIDs.
tool_calls: Optional[ToolCalls]
The tool calls that have been requested by the llm to run, which are pending approval
List[ToolCall]
per_file_view_window_char_limit: Optional[int]
The per-file view window character limit for this agent. Setting this too high may exceed the context window, which will break the agent.
response_format: Optional[ResponseFormat]
tool_rules: Optional[List[ToolRule]]
The list of tool rules.
class ChildToolRule: …
class InitToolRule: …
Represents the initial tool rule configuration.
args: Optional[Dict[str, object]]
Optional prefilled arguments for this tool. When present, these values will override any LLM-provided arguments with the same keys during invocation. Keys must match the tool’s parameter names and values must satisfy the tool’s JSON schema. Supports partial prefill; non-overlapping parameters are left to the model.
class ConditionalToolRule: …
A ToolRule that conditionally maps to different child tools based on the output.
class RequiredBeforeExitToolRule: …
Represents a tool rule configuration where this tool must be called before the agent loop can exit.
class MaxCountPerStepToolRule: …
class ParentToolRule: …
A ToolRule that only allows a child tool to be called if the parent has been called.
Skip to content