Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/tools/built-in-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ to use built-in tools with other tools by using multiple agents:
instruction="""
You're a specialist in Code Execution
""",
code_executor=[BuiltInCodeExecutor],
code_executor=BuiltInCodeExecutor(),
)
root_agent = Agent(
name="RootAgent",
Expand Down Expand Up @@ -204,7 +204,7 @@ to use built-in tools with other tools by using multiple agents:
model="gemini-2.0-flash",
description="Root Agent",
tools=[custom_function],
executor=[BuiltInCodeExecutor] # <-- not supported when used with tools
code_executor=BuiltInCodeExecutor() # <-- not supported when used with tools
)
```

Expand Down Expand Up @@ -244,7 +244,7 @@ is **not** currently supported:
instruction="""
You're a specialist in Code Execution
""",
executor=[BuiltInCodeExecutor],
code_executor=BuiltInCodeExecutor(),
)
root_agent = Agent(
name="RootAgent",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
code_agent = LlmAgent(
name=AGENT_NAME,
model=GEMINI_MODEL,
executor=[BuiltInCodeExecutor],
code_executor=BuiltInCodeExecutor(),
instruction="""You are a calculator agent.
When given a mathematical expression, write and execute Python code to calculate the result.
Return only the final numerical result as plain text, without markdown or code blocks.
Expand All @@ -39,9 +39,9 @@

# Session and Runner
session_service = InMemorySessionService()
session = session_service.create_session(
session = asyncio.run(session_service.create_session(
app_name=APP_NAME, user_id=USER_ID, session_id=SESSION_ID
)
))
runner = Runner(agent=code_agent, app_name=APP_NAME, session_service=session_service)


Expand Down