@@ -10,7 +10,7 @@ The experimental `AgentConfig` provides a declarative way to create configuratio
1010` AgentConfig ` allows you to:
1111
1212- Create configuration-based agents from JSON files or dictionaries
13- - Use the ` toAgent ()` method for clean agent instantiation
13+ - Use the ` to_agent ()` method for clean agent instantiation
1414- Integrate with ToolBox for advanced tool management
1515- Use standardized configuration interfaces
1616
@@ -28,7 +28,7 @@ config = AgentConfig({
2828})
2929
3030# Create agent instance (uses default tools from strands_tools)
31- agent = config.toAgent ()
31+ agent = config.to_agent ()
3232```
3333
3434### Using Default Tools
@@ -44,7 +44,7 @@ config = AgentConfig({
4444 " prompt" : " You are a helpful assistant with file and web capabilities"
4545})
4646
47- agent = config.toAgent ()
47+ agent = config.to_agent ()
4848
4949# Agent now has access to default tools
5050response = agent(" Read the contents of README.md and summarize it" )
@@ -64,7 +64,7 @@ config = AgentConfig({
6464 " tools" : [" file_read" , " editor" ] # Only file operations, no web/shell
6565})
6666
67- agent = config.toAgent ()
67+ agent = config.to_agent ()
6868```
6969
7070!!! warning "Requires strands_tools"
@@ -77,7 +77,7 @@ Configuration files must use the `file://` prefix:
7777``` python
7878# Load from JSON file
7979config = AgentConfig(" file:///path/to/config.json" )
80- agent = config.toAgent ()
80+ agent = config.to_agent ()
8181```
8282
8383Example ` config.json ` :
@@ -105,7 +105,7 @@ config = AgentConfig({
105105 " prompt" : " You are a helpful assistant with access to tools"
106106})
107107
108- agent = config.toAgent (tools = tools)
108+ agent = config.to_agent (tools = tools)
109109```
110110
111111## Configuration Options
@@ -118,14 +118,14 @@ agent = config.toAgent(tools=tools)
118118
119119### Method Parameters
120120
121- The ` toAgent ()` method accepts:
121+ The ` to_agent ()` method accepts:
122122
123123- ` tools ` : Optional ToolBox instance to override the configured tools
124124- ` **kwargs ` : Additional Agent constructor parameters that override config values
125125
126126``` python
127127# Override config values
128- agent = config.toAgent (
128+ agent = config.to_agent (
129129 tools = my_tools,
130130 temperature = 0.7 ,
131131 max_tokens = 1000
@@ -181,7 +181,7 @@ config = AgentConfig({
181181 " tools" : [" calculator" , " web_search" ] # Only these will be available
182182}, tool_box = platform_tools)
183183
184- agent = config.toAgent () # Agent has only calculator and web_search
184+ agent = config.to_agent () # Agent has only calculator and web_search
185185```
186186
187187## File Path Requirements
287287 }, tool_box = tools)
288288
289289 # Create agent with selected tools
290- agent = config.toAgent (temperature = 0.3 )
290+ agent = config.to_agent (temperature = 0.3 )
291291
292292 # Use the agent
293293 response = agent(" Calculate the compound interest on $1000 at 5% f or 3 years" )
0 commit comments