-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy path06_disable_tools.py
More file actions
25 lines (22 loc) · 766 Bytes
/
Copy path06_disable_tools.py
File metadata and controls
25 lines (22 loc) · 766 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from praisonai import Agent, ManagedAgent, ManagedConfig
# Disable specific tools: web access disabled, everything else stays on
managed = ManagedAgent(
config=ManagedConfig(
name="No Web Agent",
model="claude-haiku-4-5",
system="You are a coding assistant. You cannot access the web.",
tools=[
{
"type": "agent_toolset_20260401",
"configs": [
{"name": "web_fetch", "enabled": False},
{"name": "web_search", "enabled": False},
],
},
],
),
)
agent = Agent(name="no-web-agent", backend=managed)
result = agent.start("Write a hello world Python script and run it")
print(result)
print("\nAgent finished.")