Skip to content

Commit e9d640f

Browse files
dirkbrndkausmeows
andauthored
chore: Release 1.7.1 (#3740)
# Changelog ## New Features: - **Debug Level:** Added `debug_level` to both `Agent` and `Team`. This is an `int` value of either `1` (default) or `2` (more verbose logging). Currently this only enables more verbose model logs, but will be used more widely in future. ## Improvements: - **Parser Model on Teams**: Added `parser_model` support for `Team`. See docs [here](https://docs.agno.com/teams/structured-output#using-a-parser-model). - **Support for Gemini Thinking**: Added `thinking_budget` and `include_thoughts` parameters for `Gemini` model class. - **Serper Tools**: Made updates to the toolkit to include new tools `search_news` , `search_scholar` and `scrape_webpage`. - **Valyu Tools:** New Valyu toolkit for Deep Search capabilities of academic sources. - **Oxylabs:** Added `OxylabsTools` for adding more web-scraping capabilities to agents. ## Bug Fixes: - **DuckDB CSV parsing error:** For CSV files use the custom `read_csv` method for improved CSV parsing - **Full Team Metrics**: Fixed an issue with calculation of the `full_team_session_metrics` on Teams. --------- Co-authored-by: Kaustubh <shuklakaustubh84@gmail.com>
1 parent a726e80 commit e9d640f

File tree

19 files changed

+214
-63
lines changed

19 files changed

+214
-63
lines changed

.github/workflows/test_on_release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,7 @@ jobs:
629629
env:
630630
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
631631
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
632+
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
632633
steps:
633634
- uses: actions/checkout@v3
634635
- name: Set up Python ${{ matrix.python-version }}

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,19 @@ Agno agents are designed for performance and while we do share some benchmarks a
226226

227227
Given that each framework is different and we won't be able to tune their performance like we do with Agno, for future benchmarks we'll only be comparing against ourselves.
228228

229-
## Cursor Setup
229+
## Complete Documentation Index
230+
231+
For LLMs and AI assistants to understand and navigate Agno's complete documentation, we provide an [LLMs.txt](https://docs.agno.com/llms.txt) or [LLMs-Full.txt](https://docs.agno.com/llms-full.txt) file.
232+
233+
This file is specifically formatted for AI systems to efficiently parse and reference our documentation.
234+
235+
### Cursor Setup
230236

231237
When building Agno agents, using Agno documentation as a source in Cursor is a great way to speed up your development.
232238

233-
1. In Cursor, go to the settings or preferences section.
234-
2. Find the section to manage documentation sources.
235-
3. Add `https://docs.agno.com` to the list of documentation URLs.
239+
1. In Cursor, go to the "Cursor Settings" menu.
240+
2. Find the "Indexing & Docs" section.
241+
3. Add `https://docs.agno.com/llms-full.txt` to the list of documentation URLs.
236242
4. Save the changes.
237243

238244
Now, Cursor will have access to the Agno documentation.

cookbook/examples/streamlit_apps/agentic_rag/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def display_tool_calls(tool_calls_container, tools: List[ToolExecution]):
9494
if _metrics:
9595
st.markdown("**Metrics:**")
9696
st.json(
97-
_metrics if isinstance(_metrics, dict) else _metrics._to_dict()
97+
_metrics if isinstance(_metrics, dict) else _metrics.to_dict()
9898
)
9999

100100

cookbook/examples/streamlit_apps/parallel_world_builder/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,5 @@ def display_tool_calls(tool_calls_container, tools: List[ToolExecution]):
9898
if _metrics:
9999
st.markdown("**Metrics:**")
100100
st.json(
101-
_metrics if isinstance(_metrics, dict) else _metrics._to_dict()
101+
_metrics if isinstance(_metrics, dict) else _metrics.to_dict()
102102
)

libs/agno/agno/agent/agent.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,9 +1243,10 @@ async def _arun_stream(
12431243
yield event
12441244

12451245
# If a parser model is provided, structure the response separately
1246-
await self._aparse_response_with_parser_model_stream(
1246+
async for event in self._aparse_response_with_parser_model_stream(
12471247
run_response=run_response, stream_intermediate_steps=stream_intermediate_steps
1248-
)
1248+
):
1249+
yield event
12491250

12501251
# 3. Add the run to memory
12511252
self._add_run_to_memory(
@@ -7381,7 +7382,9 @@ async def aprint_response(
73817382
# Check if we have any response content to display
73827383
response_content = (
73837384
response_content_stream
7384-
if response_content_stream and isinstance(response_content_stream, str) and len(response_content_stream) > 0
7385+
if response_content_stream
7386+
and isinstance(response_content_stream, str)
7387+
and len(response_content_stream) > 0
73857388
else response_content_batch
73867389
)
73877390
if response_content:

libs/agno/agno/embedder/fastembed.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
from dataclasses import dataclass
22
from typing import Dict, List, Optional, Tuple
3+
34
from agno.embedder.base import Embedder
45
from agno.utils.log import logger
56

67
try:
78
import numpy as np
89

910
except ImportError:
10-
raise ImportError("numpy not installed, use pip install numpy")
11+
raise ImportError("numpy not installed, use `pip install numpy`")
1112

1213

1314
try:

libs/agno/agno/embedder/sentence_transformer.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
except ImportError:
1111
raise ImportError("`sentence-transformers` not installed, please run `pip install sentence-transformers`")
1212

13+
try:
14+
import numpy as np
15+
16+
except ImportError:
17+
raise ImportError("numpy not installed, use `pip install numpy`")
18+
1319

1420
@dataclass
1521
class SentenceTransformerEmbedder(Embedder):
@@ -26,6 +32,9 @@ def get_embedding(self, text: Union[str, List[str]]) -> List[float]:
2632
model = self.sentence_transformer_client
2733
embedding = model.encode(text, prompt=self.prompt, normalize_embeddings=self.normalize_embeddings)
2834
try:
35+
if isinstance(embedding, np.ndarray):
36+
return embedding.tolist()
37+
2938
return embedding # type: ignore
3039
except Exception as e:
3140
logger.warning(e)

libs/agno/agno/models/message.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class MessageMetrics:
7373

7474
timer: Optional[Timer] = None
7575

76-
def _to_dict(self) -> Dict[str, Any]:
76+
def to_dict(self) -> Dict[str, Any]:
7777
metrics_dict = asdict(self)
7878
metrics_dict.pop("timer")
7979
metrics_dict = {
@@ -267,7 +267,7 @@ def to_dict(self) -> Dict[str, Any]:
267267
if self.references:
268268
message_dict["references"] = self.references.model_dump()
269269
if self.metrics:
270-
message_dict["metrics"] = self.metrics._to_dict()
270+
message_dict["metrics"] = self.metrics.to_dict()
271271
if not message_dict["metrics"]:
272272
message_dict.pop("metrics")
273273

libs/agno/agno/models/response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def is_paused(self) -> bool:
5050
def to_dict(self) -> Dict[str, Any]:
5151
_dict = asdict(self)
5252
if self.metrics is not None:
53-
_dict["metrics"] = self.metrics._to_dict()
53+
_dict["metrics"] = self.metrics.to_dict()
5454

5555
if self.user_input_schema is not None:
5656
_dict["user_input_schema"] = [field.to_dict() for field in self.user_input_schema]

libs/agno/agno/team/team.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1445,9 +1445,10 @@ async def _arun_stream(
14451445
yield event
14461446

14471447
# If a parser model is provided, structure the response separately
1448-
await self._aparse_response_with_parser_model_stream(
1448+
async for event in self._aparse_response_with_parser_model_stream(
14491449
run_response=run_response, stream_intermediate_steps=stream_intermediate_steps
1450-
)
1450+
):
1451+
yield event
14511452

14521453
# 3. Add the run to memory
14531454
self._add_run_to_memory(

0 commit comments

Comments
 (0)