- model
Either a LanguageModelV1 object, or a string ID like "openai:gpt-4o".
- prompt
A character string prompt, or a list of messages.
- system
Optional system prompt.
- temperature
Sampling temperature (0-2). Default 0.7.
- max_tokens
Maximum tokens to generate.
- tools
Optional list of Tool objects for function calling.
- max_steps
Maximum number of generation steps (tool execution loops).
Default 1 (single generation, no automatic tool execution).
Set to higher values (e.g., 5) to enable automatic tool execution.
- sandbox
Logical. If TRUE, enables R-native programmatic sandbox mode.
All tools are bound into an isolated R environment and replaced by a single
execute_r_code meta-tool. The LLM writes R code to batch-invoke tools,
filter data with dplyr/purrr, and return only summary results, dramatically
reducing token usage and latency. Default FALSE.
- skills
Optional path to skills directory, or a SkillRegistry object.
When provided, skill tools are auto-injected and skill summaries are added
to the system prompt.
- session
Optional ChatSession object. When provided, tool executions
run in the session's environment, enabling cross-agent data sharing.
- hooks
Optional HookHandler object for intercepting events.
- registry
Optional ProviderRegistry to use (defaults to global registry).
- ...
Additional arguments passed to the model.