-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy path05_select_tools.py
More file actions
27 lines (24 loc) · 902 Bytes
/
Copy path05_select_tools.py
File metadata and controls
27 lines (24 loc) · 902 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
26
27
from praisonai import Agent, ManagedAgent, ManagedConfig
# Select specific tools: only bash, read, write — everything else disabled
managed = ManagedAgent(
config=ManagedConfig(
name="Bash Only Agent",
model="claude-haiku-4-5",
system="You are a helpful assistant that can only use bash commands.",
tools=[
{
"type": "agent_toolset_20260401",
"default_config": {"enabled": False},
"configs": [
{"name": "bash", "enabled": True},
{"name": "read", "enabled": True},
{"name": "write", "enabled": True},
],
},
],
),
)
agent = Agent(name="bash-agent", backend=managed)
result = agent.start("List the current directory contents and show system info using uname -a")
print(result)
print("\nAgent finished.")