Skip to content

Commit 5173e19

Browse files
committed
Init Agent Api
1 parent 1900dfa commit 5173e19

File tree

4 files changed

+26
-27
lines changed

4 files changed

+26
-27
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Agent api AWS
1+
## Agent Api
22

33
This repo contains the code for a production-grade agentic system built with:
44

agents/scholar.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from agno.models.openai import OpenAIChat
66
from agno.storage.agent.postgres import PostgresAgentStorage
77
from agno.tools.duckduckgo import DuckDuckGoTools
8-
from agno.tools.exa import ExaTools
98

109
from db.session import db_url
1110

@@ -29,25 +28,23 @@ def get_scholar(
2928
session_id=session_id,
3029
model=OpenAIChat(id=model_id),
3130
# Tools available to the agent
32-
tools=[DuckDuckGoTools(), ExaTools()],
31+
tools=[DuckDuckGoTools()],
3332
# Storage for the agent
3433
storage=PostgresAgentStorage(table_name="scholar_sessions", db_url=db_url),
3534
# Description of the agent
3635
description=dedent("""\
3736
You are Scholar, a cutting-edge Answer Engine built to deliver precise, context-rich, and engaging responses.
3837
You have the following tools at your disposal:
3938
• DuckDuckGoTools for real-time web searches to fetch up-to-date information.
40-
• ExaTools for structured, in-depth analysis.
4139
4240
Your response should always be clear, concise, and detailed. Blend direct answers with extended analysis,
4341
supporting evidence, illustrative examples, and clarifications on common misconceptions. Engage the user
4442
with follow-up questions, such as asking if they'd like to save the answer.
4543
4644
<critical>
47-
- You must search both DuckDuckGo and ExaTools to generate your answer. If you don't, you will be penalized.
45+
- You must search DuckDuckGo to generate your answer. If you don't, you will be penalized.
4846
- You must provide sources, whenever you provide a data point or a statistic.
4947
- When the user asks a follow-up question, you can use the previous answer as context.
50-
- If you don't have the relevant information, you must search both DuckDuckGo and ExaTools to generate your answer.
5148
</critical>\
5249
"""),
5350
# Instructions for the agent
@@ -57,10 +54,8 @@ def get_scholar(
5754
1. Gather Relevant Information
5855
- First, carefully analyze the query to identify the intent of the user.
5956
- Break down the query into core components, then construct 1-3 precise search terms that help cover all possible aspects of the query.
60-
- Then, search using BOTH `duckduckgo_search` and `search_exa` with the search terms. Remember to search both tools.
61-
- Combine the insights from both tools to craft a comprehensive and balanced answer.
62-
- If you need to get the contents from a specific URL, use the `get_contents` tool with the URL as the argument.
63-
- CRITICAL: YOU MUST SEARCH BOTH DuckDuckGo and Exa to generate your answer, otherwise you will be penalized.
57+
- Then, search the web using `duckduckgo_search`.
58+
- Combine the insights to craft a comprehensive and balanced answer.
6459
6560
2. Construct Your Response
6661
- **Start** with a succinct, clear and direct answer that immediately addresses the user's query.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ readme = "README.md"
66
authors = [{ name = "Agno", email = "[email protected]" }]
77

88
dependencies = [
9-
"agno[aws]==1.1.13",
9+
"agno[aws]==1.2.3",
1010
"alembic",
1111
"beautifulsoup4",
1212
"duckduckgo-search",

requirements.txt

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# This file was autogenerated by uv via the following command:
2-
# ./scripts/generate_requirements.sh
3-
agno==1.1.13
2+
# ./scripts/generate_requirements.sh upgrade
3+
agno==1.2.3
44
agno-aws==0.0.1
55
agno-docker==0.0.1
66
alembic==1.15.1
77
altair==5.5.0
88
annotated-types==0.7.0
9-
anyio==4.8.0
9+
anyio==4.9.0
1010
attrs==25.3.0
1111
beautifulsoup4==4.13.3
1212
blinker==1.9.0
13-
boto3==1.37.13
14-
botocore==1.37.13
13+
boto3==1.37.19
14+
botocore==1.37.19
1515
cachetools==5.5.2
1616
certifi==2025.1.31
1717
charset-normalizer==3.4.1
@@ -20,10 +20,10 @@ distro==1.9.0
2020
dnspython==2.7.0
2121
docker==7.1.0
2222
docstring-parser==0.16
23-
duckduckgo-search==7.5.2
23+
duckduckgo-search==7.5.3
2424
email-validator==2.2.0
25-
exa-py==1.9.0
26-
fastapi==0.115.11
25+
exa-py==1.9.1
26+
fastapi==0.115.12
2727
fastapi-cli==0.0.7
2828
gitdb==4.0.12
2929
gitpython==3.1.44
@@ -32,6 +32,7 @@ httpcore==1.0.7
3232
httptools==0.6.4
3333
httpx==0.28.1
3434
idna==3.10
35+
iniconfig==2.1.0
3536
jinja2==3.1.6
3637
jiter==0.9.0
3738
jmespath==1.0.1
@@ -42,15 +43,16 @@ mako==1.3.9
4243
markdown-it-py==3.0.0
4344
markupsafe==3.0.2
4445
mdurl==0.1.2
45-
narwhals==1.30.0
46-
numpy==2.2.3
47-
openai==1.66.3
46+
narwhals==1.32.0
47+
numpy==2.2.4
48+
openai==1.68.2
4849
packaging==24.2
4950
pandas==2.2.3
50-
pgvector==0.3.6
51+
pgvector==0.4.0
5152
pillow==11.1.0
53+
pluggy==1.5.0
5254
primp==0.14.0
53-
protobuf==5.29.3
55+
protobuf==5.29.4
5456
psycopg==3.2.6
5557
psycopg-binary==3.2.6
5658
pyarrow==19.0.1
@@ -59,10 +61,12 @@ pydantic-core==2.27.2
5961
pydantic-settings==2.8.1
6062
pydeck==0.9.1
6163
pygments==2.19.1
64+
pytest==8.3.5
65+
pytest-mock==3.14.0
6266
python-dateutil==2.9.0.post0
63-
python-dotenv==1.0.1
67+
python-dotenv==1.1.0
6468
python-multipart==0.0.20
65-
pytz==2025.1
69+
pytz==2025.2
6670
pyyaml==6.0.2
6771
referencing==0.36.2
6872
regex==2024.11.6
@@ -87,7 +91,7 @@ tornado==6.4.2
8791
tqdm==4.67.1
8892
typer==0.15.2
8993
typing-extensions==4.12.2
90-
tzdata==2025.1
94+
tzdata==2025.2
9195
urllib3==2.3.0
9296
uvicorn==0.34.0
9397
uvloop==0.21.0

0 commit comments

Comments
 (0)