mirror of
https://github.com/agno-agi/agno.git
synced 2026-10-12 02:10:54 +00:00
bce27a9ef0cdb0502c728006b52fa814e1d32a7e
13
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
bce27a9ef0 |
chore: release 2.3.3 (#5524)
# Changelog ## New Feature: - **Context Compression**: Introducing compression of tool call results in a running context. Context Compression allows you to manage your agent context while it is running, helping the agent stay within its context window and avoid rate limits or decreases in response quality. This is still a **beta** feature. See the [docs](https://docs.agno.com/basics/context-compression/overview) - **Memory Optimisation:** Added the ability to summarize a user’s memories. This adds `optimize_memories` and `aoptimize_memories` to the `MemoryManager` as a way to summarize memories outside of agent runs. Only one strategy is currently supported, but this will be extended in future. Thie is still a **beta** feature. See the [docs](https://docs.agno.com/basics/memory/working-with-memories/memory-optimization). - **Gemini File Search Support**: Added support for [Gemini File Search](https://blog.google/technology/developers/file-search-gemini-api/). - File Search Store Management: Create, list, get, and delete document stores - File Upload & Import: Direct upload with custom chunking configuration and metadata - Document Management: List, get, delete, and update documents with metadata filtering - Citation Extraction: Helper methods to extract and format source citations from responses - Async Support: Full async/await support for production workloads - Docs coming soon! In the mean time check out these cookbooks: - `cookbook/models/google/gemini/file_search_basic.py` - `cookbook/models/google/gemini/file_search_advanced.py` - `cookbook/models/google/gemini/file_search_rag_pipeline.py` ## Improvements: - **`output_schema` on run/arun**: override `output_schema` at runtime via the `run()` and `arun()` methods for both `Agent` and `Team`, as well as AgentOS API endpoints. - **API Key for AWS Bedrock**: Added `api_key` support for AWS Bedrock. See the [documentation](https://docs.agno.com/integrations/models/cloud/aws-claude/overview). - **AWS Bedrock Claude**: It is now more compatible with native Claude, which adds support for thinking models and caching. - **VertexAI Claude**: It is now more compatible with native Claude, which adds support for thinking models and caching. - **Gemini 3 Thinking Level**: Added support for `thinking_level` on `Gemini` ## Bug Fixes: - **Async Knowledge Retriever:** Fixed a bug where async knowledge retrieving would break due to missing async versions of `get_user_message` functions on Agent and Team - **Team Member Events**: Ensure that member events are streamed if `stream_member_events=True` but `stream_events=False` on `Team`. - **MigrationManager Improvements:** Fixed an issue preventing migrations from being applied for versions older than 2.3.0. Also adds support for a force migration flag - **StopAgentRun**: Fixed the `StopAgentRun` exception from not correctly ending the agent run. - **PDF Image Reader:** Fixed PDF Image Reader generating ID’s based on filename instead of using UUID. - **MCP `tool_name_prefix`:** Made the `tool_name_prefix` parameter `None` by default to prevent it from adding `_` by default as a prefix. - **AGUI:** - Duplicate value for `tool_call_id` fixed - Missing assistant messages for tool calls fixed --------- Co-authored-by: Dirk Brand <[email protected]> Co-authored-by: Mustafa Esoofally <[email protected]> |
||
|
|
255869358b |
feat: add google gemini file search support. (#5381)
## Summary Adds complete integration for Google Gemini's File Search Tool. Docs: - https://blog.google/technology/developers/file-search-gemini-api/ - https://ai.google.dev/gemini-api/docs/file-search fixes: #5365 Key Changes: `libs/agno/agno/models/google/gemini.py` - File Search Store Management: Create, list, get, and delete document stores - File Upload & Import: Direct upload with custom chunking configuration and metadata - Document Management: List, get, delete, and update documents with metadata filtering - Citation Extraction: Helper methods to extract and format source citations from responses - Async Support: Full async/await support for production workloads (If applicable, issue number: #\_\_\_\_) ## Type of change - [ ] Bug fix - [x] New feature - [ ] Breaking change - [ ] Improvement - [ ] Model update - [ ] Other: --- ## Checklist - [ ] Code complies with style guidelines - [ ] Ran format/validation scripts (`./scripts/format.sh` and `./scripts/validate.sh`) - [ ] Self-review completed - [ ] Documentation updated (comments, docstrings) - [ ] Examples and guides: Relevant cookbook examples have been included or updated (if applicable) - [ ] Tested in clean environment - [ ] Tests added/updated (if applicable) --- ## Additional Notes Add any important context (deployment instructions, screenshots, security considerations, etc.) --------- Co-authored-by: manu <[email protected]> Co-authored-by: Dirk Brand <[email protected]> Co-authored-by: Dirk Brand <[email protected]> |
||
|
|
c164576b0e |
chore: Release 2.2.0 (#5146)
# Changelog ## New Features: - **Filter tool calls from History**: Add ability to load fixed number of tool calls from history using `max_tool_calls_from_history`. Helps manage context size and reduce tokens. ## Improvements: - **Update** **workflows arun to return AsyncIterator:** The ****`.arun` method of Workflow now returns an async iterator, similar to Agent and Team. [Example](https://docs.agno.com/examples/concepts/workflows/01-basic-workflows/async_events_streaming)in our docs. - **New Events on Agent/Team**: - `PostHookStarted`, `PostHookCompleted` for both `Agent` and `Team` events - `SessionSummaryCreationStarted`, `SessionSummaryCreationCompleted` for both `Agent` and `Team` events - `RunContentCompleted` for both `Agent` and `Team` → This signals that the content stream has ended, which is useful for building UIs using the events - **Concurrent Memory Creation**: Automatic memory creation is now started on a thread/task at the start of an Agent/Team run, which significantly improves runtime performance where memory generation is enabled. - **Get Run Output on Members**: Improved `get_run_output` and `get_last_run_output` on `Agent`/`Team` to allow retrieval of runs from members. Therefore after a team has executed you can get the last run straight from the member agent. - **Team History Updates:** - Adds `add_team_history_to_members` to share team-level request/response history with team members. - Improved how `share_member_interactions` work to make sharing interactions during a run more accurate. - Here are the related [docs](https://docs.agno.com/concepts/teams/chat_history) - **`stream_events` flag**: Add a `stream_events` flag to Agent, Team, Workflow and all run methods to emit all events whens streaming a response. - **Session State Updating**: Added `update_session_state` and `aupdate_session_state` functions on `Agent` and `Team` to allow direct updating of the session state that is persisted in the DB. - **AgentOS Session Endpoints:** Added new endpoints: - `POST /sessions` → Create a new empty session ([reference](https://docs.agno.com/reference-api/schema/sessions/create-new-session)) - `GET /sessions/{id}/runs/{id}` → Get a run by its ID ([reference](https://docs.agno.com/reference-api/schema/sessions/get-run-by-id)) - `PATCH /sessions/{id}` → Update existing session ([reference](https://docs.agno.com/reference-api/schema/sessions/update-session)) ## Bug Fixes: - **`None` values in Ollama metrics**: Fix a problem calculating metrics with Ollama when certain values were `None` instead of `0`. - **Only-media inputs**: The Memory and Summary features now work with inputs containing only media - **Input media with Teams:** Fix a problem with input media being ignored when streaming a Team’s response. ## Breaking Changes and Deprecations - `Workflow.arun(..., stream=True)` now return an `AsyncIterator`, i.e. which means `await` is not required, but instead `async for event in workflow.arun(...)` is the correct syntax. - All events besides `RunContent` events (the actual model content chunks) are now behind the `stream_events` flag and will only be yielded where `stream_events=True` . Previously tool-call events were yielded regardless. - Removed `expected_output` as a default parameter on the `delegate_task_to_member` tool call for `Team`. This is done to increase flexibility with teams and to avoid incorrect behaviour on the team leader. - `stream_intermediate_steps` has been deprecated in favour of `stream_events` |
||
|
|
5e40a2d10b |
chore: Release 2.1.0 (#4856)
# Changelog ## New Features: - **AgentOS Custom Middleware:** Allow setting of any custom FastAPI-compatible middleware on the AgentOS. See the [docs](https://docs.agno.com/agent-os/customize/middleware/overview). - **AgentOS JWT Middleware:** We have a built-in JWT Middleware that can validate tokens, extract claims to pass into AgentOS endpoints, and more. See the [docs](https://docs.agno.com/agent-os/customize/middleware/jwt). - **Pre/Post Hooks:** Configure a custom hook that runs at the start or end of an agent/team run. This is useful for input/output validation, or transforming the input/output of the agent. See the [docs](https://docs.agno.com/concepts/agents/pre-hooks-and-post-hooks). - **Guardrails**: Guardrails are specific built-in pre-hooks that you can configure. See the docs. We have added support for: - Prompt Injection checks ([docs](https://docs.agno.com/concepts/agents/guardrails/prompt-injection)) - PII detections (SSN, credit cards, phone numbers, emails) ([docs](https://docs.agno.com/concepts/agents/guardrails/pii)) - [OpenAI Moderation](https://platform.openai.com/docs/guides/moderation?example=images) ([docs](https://docs.agno.com/concepts/agents/guardrails/openai-moderation)) - You can create your own custom guardrails ([docs](https://docs.agno.com/concepts/agents/guardrails/overview)) - **Requesty LLM Gateway:** Added support for [Requesty](https://www.requesty.ai), an affordable LLM gateway with advanced governance. ## Improvements: - **AgentOS Updates for Clarity**: - None of the below deprecated parameters have been removed, only new attributes added. It will likely be removed in v2.3.0 and after. - Deprecated `fastapi_app` and added `base_app` → For configuring a custom FastAPI app for the AgentOS. - Deprecated `replace_routes` and added `on_route_conflict` → For how to handle conflicting routes when you set `base_app`. - Deprecated `enable_mcp` and added `enable_mcp_server` → For converting the AgentOS into an MCP server. - Deprecated `os_id` and added `id` → The ID of the OS. - **Async Tool Execution In Streaming**: For tools that are AsyncGenerators (i.e. they are `async` and `yield` content or events), they are now executed in parallel. - **Team Async Member Execution:** Because of the above update, member execution during async team execution with streaming (i.e. `Team.arun(..., stream=True)`) is now also concurrent. - Note: This means member events are received concurrently and the order is not guaranteed. If you previously depended on the order of events of team members, take note of this. - **Whatsapp Interface Sessions:** The user’s unique phone number is now used as the session ID by default. This would enable session history for Whatsapp conversations. - **Update Workflows to not swallow exceptions:** workflows now raise exceptions where necessary so that they can be correctly caught in the front end. - **Batch Embeddings:** Support for batch embeddings to speed up embedding process and reduce API calls to embeddings providers. See the docs. - Removed unused `use_batch` parameter from PGVectorDB class ## Bug Fixes: - **Team History in Context**: Fixed issues where team history was not correctly added to team context. - **Gemini Metrics Calculation Fix For Gemini 2.5 Models:** Fixed a bug where thought tokens count were added later to output tokens before total token calculation - **Fix for workflow async pipeline to correctly accept file input:** Updated the Workflow class to include a parameter `files` in the async pipeline input creation, enhancing the flexibility of input handling. - **`InMemoryDb` mutable references**: Fixes a bug where some DB methods unexpectedly returned shared object references. - **Fix `tool_choice` bug on Gemini**: Agno now convert `tool_choice` values for `none` and `auto` correctly to what Gemini expects. - **Fix for a bug on Agent OS when output schema includes a non serializable type:** - in [**fix: agentos datetime serialization #4783**](https://github.com/agno-agi/agno/pull/4783) it was fixed but the `to_json` method was being overridden in the `BaseWorkflowRunOutputEvent` class which is not really required. --------- Co-authored-by: Kaustubh <[email protected]> Co-authored-by: manuhortet <[email protected]> |
||
|
+7 |
9342086712 |
feat: V2.0.0 (#4226)
Changelog TBD --------- Co-authored-by: Willem Carel de Jongh <[email protected]> Co-authored-by: Nancy Chauhan <[email protected]> Co-authored-by: manu <[email protected]> Co-authored-by: Mustafa Esoofally <[email protected]> Co-authored-by: Kaustubh <[email protected]> Co-authored-by: ysolanky <[email protected]> Co-authored-by: Harshith VH <[email protected]> Co-authored-by: Ayush <[email protected]> Co-authored-by: Monalisha Mishra <[email protected]> Co-authored-by: Yash Pratap Solanky <[email protected]> Co-authored-by: Ashpreet <[email protected]> Co-authored-by: yarin-tradezbird <[email protected]> Co-authored-by: yarinbass <[email protected]> Co-authored-by: Anurag <[email protected]> Co-authored-by: Adi Berkowitz <[email protected]> Co-authored-by: Adi Berkowitz <[email protected]> |
||
|
|
b746ccf9cf |
[chore] firecrawl dependency upgrade (#4369)
## Summary - Firecrawl dependency upgrade ## Type of change - [ ] Bug fix - [ ] New feature - [ ] Breaking change - [x] Improvement - [ ] Model update - [ ] Other: --- ## Checklist - [x] Code complies with style guidelines - [x] Ran format/validation scripts (`./scripts/format.sh` and `./scripts/validate.sh`) - [x] Self-review completed - [ ] Documentation updated (comments, docstrings) - [ ] Examples and guides: Relevant cookbook examples have been included or updated (if applicable) - [x] Tested in clean environment - [ ] Tests added/updated (if applicable) --- ## Additional Notes Add any important context (deployment instructions, screenshots, security considerations, etc.) --------- Co-authored-by: Yash Pratap Solanky <[email protected]> |
||
|
|
43b9bbcf4d |
fix: transcript function from YouTube API (#4280)
## Summary - Replaced the deprecated `get_transcript()` with `fetch()` method fixes: #4273 ## Type of change - [x] Bug fix - [ ] New feature - [ ] Breaking change - [ ] Improvement - [ ] Model update - [ ] Other: --- ## Checklist - [ ] Code complies with style guidelines - [ ] Ran format/validation scripts (`./scripts/format.sh` and `./scripts/validate.sh`) - [ ] Self-review completed - [ ] Documentation updated (comments, docstrings) - [ ] Examples and guides: Relevant cookbook examples have been included or updated (if applicable) - [ ] Tested in clean environment - [ ] Tests added/updated (if applicable) --- ## Additional Notes Add any important context (deployment instructions, screenshots, security considerations, etc.) --------- Co-authored-by: Dirk Brand <[email protected]> |
||
|
|
1a11436aa9 |
chore: Release 1.5.9 (#3478)
# Changelog
## New Features:
- **AG-UI App**: Expose your Agno Agents and Teams with an AG-UI
compatible FastAPI APP.
- **vLLM Support**: Added support for running vLLM models via Agno.
- **Serper Toolkit:** Added `SerperTools` toolkit to search Google
- **LangDB Support**: Added LangDB AI Gateway support into Agno.
- **LightRAG server support:** Added LightRAG support which provides a
fast, graph-based RAG system that enhances document retrieval and
knowledge querying capabilities.
- **Parser Model:** Added ability to use an external model to apply a
structured output to a model response
- **Pdf Bytes Knowledge: I**ntroduced a new knowledge base class:
`PDFBytesKnowledgeBase`, which allows the ingestion of in-memory PDF
content via bytes or IO streams instead of file paths.
- **Qdrant Mcp Server:** Added MCP support for Qdrant
- **Expand URL addition in Crawl4ai: I**ntroduced a new URL expansion
feature directly into the Crawl4ai toolkit. Our agents frequently
encounter shortened URLs that crawl4ai cannot scrape effectively,
leading to incomplete data retrieval. With this update, shortened URLs
are expanded to their final destinations before being processed by the
crawler.
## Improvements:
- **FastAPIApp Update**: FastAPIApp was updated and `agent` was replaced
with `agents`, `team` with `teams` and `workflows` was added. This also
now requires you to specify which agent/team/workflow to run.
- E.g. `http://localhost:8001/runs?agent_id=my-agent`
- **ZepTools Updates**: Updated `ZepTools` to remove deprecated
features.
- **GmailTools Attachments**: `GmailTools` now support attachments.
- **Improve code reusability by using fetch with retry and
async_fetch_with_retry:** updated
`fetch_with_retry` and `async_fetc_with_retry` to be reused
in`url_reader.py`
## Bug Fixes:
- **Claude Prompt Tokens**: Fixed a bug with prompt tokens not
propagating in Claude model class
- **Add type in base App class for registry:** Can have different types
of app like- `slack`, `whatsapp`, etc
- **Accept empty array of pdf urls:** Fixed an issue where empty PDF URL
arrays were not accepted, preventing knowledge base queries without
adding new documents
- **Add name to evaluation examples:** Included name param in evaluation
examples
- **Anthropic cache metrics propagation:** Fixed a bug where Anthropic's
prompt caching metrics were not propagating to Agent responses, despite
the raw Anthropic API working correctly. This minimal fix ensures cache
performance metrics are properly captured and reported.
- **Handle non serializable objects on RunResponse dict parsing:**
- Updated `RunResponse.to_dict()` instead of `.to_json()` to try
handling non-serializable fields asap
---------
Co-authored-by: Dirk Brand <[email protected]>
Co-authored-by: Yash Pratap Solanky <[email protected]>
Co-authored-by: ysolanky <[email protected]>
Co-authored-by: Dirk Brand <[email protected]>
|
||
|
|
15dc022221 | fix validation | ||
|
|
2d13a9c117 | fix: validation | ||
|
|
193f2a83ad |
Teams 2.0 (#2246)
## Description A complete revamp of teams. |
||
|
|
626db7e12c |
Add json_response_mode instead of structured_output (#2355)
## Description This addresses a confusing DX point where users often have to set response_model and structured_output. This changes the behaviour to default to structured output if supported. json_response_mode can be activated if needed. --- ## Type of change Please check the options that are relevant: - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [x] Model update (Addition or modification of models) - [ ] Other (please describe): --- ## Checklist - [ ] Adherence to standards: Code complies with Agno’s style guidelines and best practices. - [ ] Formatting and validation: You have run `./scripts/format.sh` and `./scripts/validate.sh` to ensure code is formatted and linted. - [ ] Self-review completed: A thorough review has been performed by the contributor(s). - [ ] Documentation: Docstrings and comments have been added or updated for any complex logic. - [ ] Examples and guides: Relevant cookbook examples have been included or updated (if applicable). - [ ] Tested in a clean environment: Changes have been tested in a clean environment to confirm expected behavior. - [ ] Tests (optional): Tests have been added or updated to cover any new or changed functionality. --- ## Additional Notes Include any deployment notes, performance implications, security considerations, or other relevant information (e.g., screenshots or logs if applicable). |
||
|
|
e67ee57766 |
Phidata -> Agno (#1935)
# Changelog
This is a major refactor to be coupled with the launch of Agno AI.
## Interface Changes:
- `phi.model.x` → `agno.models.x`
- `phi.knowledge_base.x` → `agno.knowledge.x` (applies to all knowledge
bases)
- `phi.document.reader.xxx` → `agno.document.reader.xxx_reader` (applies
to all document readers)
- All Agno toolkits are now suffixed with `Tools`. E.g. `DuckDuckGo` →
`DuckDuckGoTools`
- Multi-modal interface updates:
- `agent.run(images=[])` and `agent.print_response(images=[])` is now of
type `Image`
```python
class Image(BaseModel):
url: Optional[str] = None # Remote location for image
filepath: Optional[Union[Path, str]] = None # Absolute local location
for image
content: Optional[Any] = None # Actual image bytes content
detail: Optional[str] = None # low, medium, high or auto (per OpenAI
spec
https://platform.openai.com/docs/guides/vision?lang=node#low-or-high-fidelity-image-understanding)
id: Optional[str] = None
```
- `agent.run(audio=[])` and `agent.print_response(audio=[])` is now of
type `Audio`
```python
class Audio(BaseModel):
filepath: Optional[Union[Path, str]] = None # Absolute local location
for audio
content: Optional[Any] = None # Actual audio bytes content
format: Optional[str] = None
```
- `agent.run(video=[])` and `agent.print_response(video=[])` is now of
type `Video`
```python
class Video(BaseModel):
filepath: Optional[Union[Path, str]] = None # Absolute local location
for video
content: Optional[Any] = None # Actual video bytes content
```
- `RunResponse.images` is now a list of type `ImageArtifact`
```python
class ImageArtifact(Media):
id: str
url: str # Remote location for file
alt_text: Optional[str] = None
```
- `RunResponse.audio` is now a list of type `AudioArtifact`
```python
class AudioArtifact(Media):
id: str
url: Optional[str] = None # Remote location for file
base64_audio: Optional[str] = None # Base64-encoded audio data
length: Optional[str] = None
mime_type: Optional[str] = None
```
- `RunResponse.videos` is now a list of type `VideoArtifact`
```python
class VideoArtifact(Media):
id: str
url: str # Remote location for file
eta: Optional[str] = None
length: Optional[str] = None
```
- `RunResponse.response_audio` is now of type `AudioOutput`
```python
class AudioOutput(BaseModel):
id: str
content: str # Base64 encoded
expires_at: int
transcript: str
```
- Models:
- `Hermes` → `OllamaHermes`
- `AzureOpenAIChat` → `AzureOpenAI`
- `CohereChat` → `Cohere`
- `DeepSeekChat` → `DeepSeek`
- `GeminiOpenAIChat` → `GeminiOpenAI`
- `HuggingFaceChat` → `HuggingFace`
- Embedders now all take `id` instead of `model` as a parameter. For
example
```python
db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai"
knowledge_base = PDFUrlKnowledgeBase(
urls=["https://phi-public.s3.amazonaws.com/recipes/ThaiRecipes.pdf"],
vector_db=PgVector(
table_name="recipes",
db_url=db_url,
embedder=OllamaEmbedder(id="llama3.2", dimensions=3072),
),
)
knowledge_base.load(recreate=True)
```
- Agent Storage class
- `PgAgentStorage` → `PostgresAgentStorage`
- `SqlAgentStorage` → `SqliteAgentStorage`
- `MongoAgentStorage` → `MongoDbAgentStorage`
- `S2AgentStorage` → `SingleStoreAgentStorage`
- Workflow Storage class
- `SqlWorkflowStorage` → `SqliteWorkflowStorage`
- `PgWorkflowStorage` → `PostgresWorkflowStorage`
- `MongoWorkflowStorage` → `MongoDbWorkflowStorage`
- Knowledge Base
- `phi.knowledge.pdf.PDFUrlKnowledgeBase` →
`agno.knowledge.pdf_url.PDFUrlKnowledgeBase`
- `phi.knowledge.csv.CSVUrlKnowledgeBase` →
`agno.knowledge.csv_url.CSVUrlKnowledgeBase`
- Readers
- `phi.document.reader.arxiv` → `agno.document.reader.arxiv_reader`
- `phi.document.reader.docx` → `agno.document.reader.docx_reader`
- `phi.document.reader.json` → `agno.document.reader.json_reader`
- `phi.document.reader.pdf` → `agno.document.reader.pdf_reader`
- `phi.document.reader.s3.pdf` → `agno.document.reader.s3.pdf_reader`
- `phi.document.reader.s3.text` → `agno.document.reader.s3.text_reader`
- `phi.document.reader.text` → `agno.document.reader.text_reader`
- `phi.document.reader.website` → `agno.document.reader.website_reader`
## Improvements:
- **Dataclasses** - Changed various instances of Pydantic models to
dataclasses to improve the speed.
## Removals
- Removed all references to `Assistant`
- Removed all references to `llm`
- Removed the `PhiTools` tool
- …
## Bug Fixes:
- Fixed semantic chunking by replacing `similarity_threshold` param with
`threshold` param
---------
Co-authored-by: Ashpreet <[email protected]>
Co-authored-by: Yash Pratap Solanky <[email protected]>
Co-authored-by: Willem Carel de Jongh <[email protected]>
Co-authored-by: Anurag <[email protected]>
Co-authored-by: Ayush <[email protected]>
Co-authored-by: Manthan Gupta <[email protected]>
Co-authored-by: ysolanky <[email protected]>
Co-authored-by: ansub <[email protected]>
Co-authored-by: Manthan Gupta <[email protected]>
|