Files
MervinPraison 0c37498118 feat(managed-agents): add examples for agent management features
Added multiple examples demonstrating the creation and management of agents,
environments, sessions, and custom tools in the managed agents architecture.
This comprehensive set of examples now includes functionalities such as
tool selection, disabling tools, and updating agent configurations, providing
users with clear guidance on utilizing the framework effectively.
2026-04-11 13:20:11 +01:00

28 lines
902 B
Python

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.")