mirror of
https://github.com/Shubhamsaboo/awesome-llm-apps.git
synced 2026-03-11 17:48:31 -05:00
fix: restore compatibility with latest agno version
This commit is contained in:
@@ -14,7 +14,7 @@ A terminal-based Notion Agent for interacting with your Notion pages using natur
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Python 3.9+
|
||||
- Python 3.10+
|
||||
- A Notion account with admin permissions
|
||||
- A Notion Integration token
|
||||
- An OpenAI API key
|
||||
|
||||
@@ -7,7 +7,7 @@ from textwrap import dedent
|
||||
from agno.agent import Agent
|
||||
from agno.models.openai import OpenAIChat
|
||||
from agno.tools.mcp import MCPTools
|
||||
from agno.memory.v2 import Memory
|
||||
from agno.db.sqlite import SqliteDb
|
||||
from mcp import StdioServerParameters
|
||||
from dotenv import load_dotenv
|
||||
|
||||
@@ -68,7 +68,7 @@ async def main():
|
||||
# Start the MCP Tools session
|
||||
async with MCPTools(server_params=server_params) as mcp_tools:
|
||||
print("Connected to Notion MCP server successfully!")
|
||||
|
||||
db = SqliteDb(db_file="agno.db") # SQLite DB for memory
|
||||
# Create the agent
|
||||
agent = Agent(
|
||||
name="NotionDocsAgent",
|
||||
@@ -97,10 +97,10 @@ async def main():
|
||||
The user's current page ID is: {page_id}
|
||||
"""),
|
||||
markdown=True,
|
||||
show_tool_calls=True,
|
||||
retries=3,
|
||||
memory=Memory(), # Use Memory v2 for better multi-session support
|
||||
add_history_to_messages=True, # Include conversation history
|
||||
db=db,
|
||||
enable_user_memories=True, # This enables Memory for the Agent
|
||||
add_history_to_context=True, # Include conversation history
|
||||
num_history_runs=5, # Keep track of the last 5 interactions
|
||||
)
|
||||
|
||||
|
||||
@@ -2,3 +2,4 @@ agno
|
||||
python-dotenv
|
||||
mcp
|
||||
openai
|
||||
sqlalchemy
|
||||
Reference in New Issue
Block a user