from praisonaiagents import Agent, Task, PraisonAIAgents, MCP
import os
# Set up environment
os.environ["GITHUB_TOKEN"] = "ghp_..."
# Create agent with multiple MCP tools
agent = Agent(
name="DevOps Assistant",
instructions="""You are a DevOps assistant that can:
- Manage files and directories
- Interact with GitHub repositories
- Store and retrieve important information
Use your tools wisely to help with development tasks.""",
tools=[
MCP("npx @modelcontextprotocol/server-filesystem"),
MCP("npx @modelcontextprotocol/server-github"),
MCP("npx @modelcontextprotocol/server-memory")
]
)
# Create tasks
tasks = [
Task(
description="Check the current directory structure",
agent=agent,
expected_output="Directory listing with key files identified"
),
Task(
description="Remember the project structure for future reference",
agent=agent,
expected_output="Confirmation that structure is memorised"
)
]
# Run the system
agents = PraisonAIAgents(agents=[agent], tasks=tasks)
result = agents.start()