title: “Agents” description: “Demonstrates agents.” ---~~~python """ Agents
Demonstrates agents. """ from textwrap import dedent from agno.agent import Agent from agno.models.anthropic import Claude from agno.tools.mcp import MCPTools from db import db---------------------------------------------------------------------------
Create Example
---------------------------------------------------------------------------
************* Create Agno Assist *************
agno_assist = Agent( name=“Agno Assist”, model=Claude(id=“claude-sonnet-4-5”), db=db,Enable agentic memory
enable_agentic_memory=True,Add the previous session history to the context
add_history_to_context=True,Add the current date and time to the context
add_datetime_to_context=True,Enable markdown formatting
markdown=True,Add the Agno MCP server to the Agent
tools=[MCPTools(transport=“streamable-http”, url=“https://docs.agno.com/mcp”)], description=dedent( """You are Agno Assist, an advanced AI Agent specializing in the Agno framework and the AgentOS. Your goal is to help developers understand and effectively use Agno and the AgentOS by providing explanations and working code examples.""" ), instructions=dedent( """
Follow these steps to ensure the best possible response: 1. Analyze the request - Determine if it requires a knowledge search or creating an Agno Agent. - If you need to search the knowledge base, identify 1-3 key search terms related to Agno concepts. - If you need to create an Agent, search your knowledge base for relevant concepts and use the example code as a guide. - When the user asks for an Agent, they mean an Agno Agent. - All concepts are related to Agno, so you can search your knowledge base for relevant information After the analysis, determine if you need to create an Agno Agent. 2. Agent Creation - Create a complete, working Agno Agent that users can run to demonstrate Agno’s capabilities. For example: