diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d2418af932..92504ea916 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -81,7 +81,7 @@ Make sure all tests pass before submitting your pull request. If you add new fea - The `VectorDb` interface is defined in `libs/agno/agno/vectordb/base.py` - Import your `VectorDb` Class in `libs/agno/agno/vectordb//__init__.py`. - Checkout the [`libs/agno/agno/vectordb/pgvector/pgvector`](https://github.com/agno-agi/agno/blob/main/libs/agno/agno/vectordb/pgvector/pgvector.py) file for an example. -4. Add a recipe for using your `VectorDb` under `cookbook/07_knowledge/vector_db/`. +4. Add a recipe for using your `VectorDb` under `cookbook/07_knowledge/09_archive/vector_dbs/`. - Checkout [`cookbook/07_knowledge/09_archive/vector_dbs/pgvector_db`](https://github.com/agno-agi/agno/blob/main/cookbook/07_knowledge/09_archive/vector_dbs/pgvector_db.py) for an example. 5. Important: Format and validate your code by running `./scripts/format.sh` and `./scripts/validate.sh`. 6. Submit a pull request. @@ -118,7 +118,7 @@ Make sure all tests pass before submitting your pull request. If you add new fea - CI enforces registration: `test_every_model_subclass_is_registered` statically discovers every concrete `Model` subclass and fails if one is missing. If your class is an abstract base rather than a user-selectable provider, add it to that test's allowlist instead. -6. Add a recipe for using your Model provider under `cookbook/models/`. +6. Add a recipe for using your Model provider under `cookbook/90_models/`. - Checkout [`agno/cookbook/90_models/aws/claude`](https://github.com/agno-agi/agno/tree/main/cookbook/90_models/aws/claude) for an example. - Show both the model class and string syntax in your examples 7. Important: Format and validate your code by running `./scripts/format.sh` and `./scripts/validate.sh`. @@ -128,13 +128,13 @@ Make sure all tests pass before submitting your pull request. If you add new fea 1. Setup your local environment by following the [Development setup](#development-setup). 2. Create a new directory under `libs/agno/agno/tools` for the new Tool. -3. Create a Class for your Tool that inherits the `Toolkit` Class from `libs/agno/agno/tools/toolkit/toolkit.py`. +3. Create a Class for your Tool that inherits the `Toolkit` Class from `libs/agno/agno/tools/toolkit.py`. - Your Class will be in `libs/agno/agno/tools/.py`. - Make sure to register all functions in your class via a flag. - Checkout the [`agno/tools/youtube.py`](https://github.com/agno-agi/agno/blob/main/libs/agno/agno/tools/youtube.py) file for an example. - If your tool requires an API key, checkout the [`agno/tools/serpapi.py`](https://github.com/agno-agi/agno/blob/main/libs/agno/agno/tools/serpapi.py) as well. -4. Add a recipe for using your Tool under `cookbook/tools/`. - - Checkout [`agno/cookbook/91_tools/youtube_tools`](https://github.com/agno-agi/agno/blob/main/cookbook/91_tools/youtube_tools.py) for an example. +4. Add a recipe for using your Tool under `cookbook/91_tools/`. + - Checkout [`agno/cookbook/91_tools/youtube_tools.py`](https://github.com/agno-agi/agno/blob/main/cookbook/91_tools/youtube_tools.py) for an example. 5. Important: Format and validate your code by running `./scripts/format.sh` and `./scripts/validate.sh`. 6. Submit a pull request. diff --git a/cookbook/02_agents/07_knowledge/agentic_rag.py b/cookbook/02_agents/07_knowledge/agentic_rag.py index a44f562ac8..1db0286070 100644 --- a/cookbook/02_agents/07_knowledge/agentic_rag.py +++ b/cookbook/02_agents/07_knowledge/agentic_rag.py @@ -2,7 +2,7 @@ Agentic Rag ============================= -1. Run: `./cookbook/run_pgvector.sh` to start a postgres container with pgvector. +1. Run: `./cookbook/scripts/run_pgvector.sh` to start a postgres container with pgvector. """ from agno.agent import Agent diff --git a/cookbook/02_agents/07_knowledge/traditional_rag.py b/cookbook/02_agents/07_knowledge/traditional_rag.py index 93c4f5b45b..19c8ab2acb 100644 --- a/cookbook/02_agents/07_knowledge/traditional_rag.py +++ b/cookbook/02_agents/07_knowledge/traditional_rag.py @@ -2,7 +2,7 @@ Traditional Rag ============================= -1. Run: `./cookbook/run_pgvector.sh` to start a postgres container with pgvector. +1. Run: `./cookbook/scripts/run_pgvector.sh` to start a postgres container with pgvector. """ from agno.agent import Agent diff --git a/cookbook/02_agents/14_advanced/background_execution.py b/cookbook/02_agents/14_advanced/background_execution.py index e08e619ba1..a443f919cd 100644 --- a/cookbook/02_agents/14_advanced/background_execution.py +++ b/cookbook/02_agents/14_advanced/background_execution.py @@ -10,7 +10,7 @@ Requirements: - OPENAI_API_KEY set Usage: - .venvs/demo/bin/python cookbook/02_agents/other/background_execution.py + .venvs/demo/bin/python cookbook/02_agents/14_advanced/background_execution.py """ import asyncio diff --git a/cookbook/02_agents/14_advanced/background_execution_structured.py b/cookbook/02_agents/14_advanced/background_execution_structured.py index 9889a7763c..eaca4efaee 100644 --- a/cookbook/02_agents/14_advanced/background_execution_structured.py +++ b/cookbook/02_agents/14_advanced/background_execution_structured.py @@ -9,7 +9,7 @@ Requirements: - OPENAI_API_KEY set Usage: - .venvs/demo/bin/python cookbook/02_agents/other/background_execution_structured.py + .venvs/demo/bin/python cookbook/02_agents/14_advanced/background_execution_structured.py """ import asyncio diff --git a/cookbook/02_agents/14_advanced/custom_cancellation_manager.py b/cookbook/02_agents/14_advanced/custom_cancellation_manager.py index a57d161b96..7546e48508 100644 --- a/cookbook/02_agents/14_advanced/custom_cancellation_manager.py +++ b/cookbook/02_agents/14_advanced/custom_cancellation_manager.py @@ -9,7 +9,7 @@ cancellation state to a JSON file, which could be shared across processes via a network filesystem. Usage: - .venvs/demo/bin/python cookbook/02_agents/other/custom_cancellation_manager.py + .venvs/demo/bin/python cookbook/02_agents/14_advanced/custom_cancellation_manager.py """ import json diff --git a/cookbook/03_teams/15_distributed_rag/01_distributed_rag_pgvector.py b/cookbook/03_teams/15_distributed_rag/01_distributed_rag_pgvector.py index f05e1f63b9..46c7156031 100644 --- a/cookbook/03_teams/15_distributed_rag/01_distributed_rag_pgvector.py +++ b/cookbook/03_teams/15_distributed_rag/01_distributed_rag_pgvector.py @@ -138,7 +138,7 @@ async def async_pgvector_rag_demo() -> None: except Exception as e: print(f"Error: {e}") print("Make sure PostgreSQL with pgvector is running!") - print(" Run: ./cookbook/run_pgvector.sh") + print(" Run: ./cookbook/scripts/run_pgvector.sh") def sync_pgvector_rag_demo() -> None: @@ -159,7 +159,7 @@ def sync_pgvector_rag_demo() -> None: except Exception as e: print(f"Error: {e}") print("Make sure PostgreSQL with pgvector is running!") - print(" Run: ./cookbook/run_pgvector.sh") + print(" Run: ./cookbook/scripts/run_pgvector.sh") def complex_query_demo() -> None: @@ -186,7 +186,7 @@ def complex_query_demo() -> None: except Exception as e: print(f"Error: {e}") print("Make sure PostgreSQL with pgvector is running!") - print(" Run: ./cookbook/run_pgvector.sh") + print(" Run: ./cookbook/scripts/run_pgvector.sh") if __name__ == "__main__": diff --git a/cookbook/03_teams/22_metrics/README.md b/cookbook/03_teams/22_metrics/README.md index 451bfd90ae..b02b70b159 100644 --- a/cookbook/03_teams/22_metrics/README.md +++ b/cookbook/03_teams/22_metrics/README.md @@ -16,4 +16,4 @@ Examples for team-level metrics: run metrics, streaming metrics, session metrics - Some examples require PostgreSQL (`./cookbook/scripts/run_pgvector.sh`). ## Run -- `.venvs/demo/bin/python cookbook/03_teams/metrics/.py` +- `.venvs/demo/bin/python cookbook/03_teams/22_metrics/.py` diff --git a/cookbook/06_storage/firestore/firestore_for_agent.py b/cookbook/06_storage/firestore/firestore_for_agent.py index 93d14480b2..29602a9170 100644 --- a/cookbook/06_storage/firestore/firestore_for_agent.py +++ b/cookbook/06_storage/firestore/firestore_for_agent.py @@ -5,7 +5,7 @@ Steps: 1. Ensure your gcloud project is enabled with Firestore. Reference https://cloud.google.com/firestore/docs/create-database-server-client-library ? 2. Run: `uv pip install openai google-cloud-firestore agno` to install dependencies 3. Make sure your gcloud project is set up and you have the necessary permissions to access Firestore -4. Run: `python cookbook/storage/firestore_storage.py` to run the agent +4. Run: `python cookbook/06_storage/firestore/firestore_for_agent.py` to run the agent """ from agno.agent import Agent diff --git a/cookbook/06_storage/in_memory/in_memory_storage_for_team.py b/cookbook/06_storage/in_memory/in_memory_storage_for_team.py index 73cd3f3cf9..764009e0c8 100644 --- a/cookbook/06_storage/in_memory/in_memory_storage_for_team.py +++ b/cookbook/06_storage/in_memory/in_memory_storage_for_team.py @@ -1,6 +1,6 @@ """ 1. Run: `uv pip install openai ddgs newspaper4k lxml_html_clean agno` to install the dependencies -2. Run: `python cookbook/storage/in_memory_storage/in_memory_storage_for_team.py` to run the team +2. Run: `python cookbook/06_storage/in_memory/in_memory_storage_for_team.py` to run the team """ from typing import List diff --git a/cookbook/06_storage/mongo/README.md b/cookbook/06_storage/mongo/README.md index cc6c12a864..d13540b41c 100644 --- a/cookbook/06_storage/mongo/README.md +++ b/cookbook/06_storage/mongo/README.md @@ -19,7 +19,7 @@ docker run -d \ ``` or use our script: ```bash -./scripts/run_mongodb.sh +./cookbook/scripts/run_mongodb.sh ``` ## Configuration diff --git a/cookbook/06_storage/mongo/async_mongo/README.md b/cookbook/06_storage/mongo/async_mongo/README.md index 01da48960e..6dc88224c7 100644 --- a/cookbook/06_storage/mongo/async_mongo/README.md +++ b/cookbook/06_storage/mongo/async_mongo/README.md @@ -19,7 +19,7 @@ docker run -d \ ``` or use our script: ```bash -./scripts/run_mongodb.sh +./cookbook/scripts/run_mongodb.sh ``` ## Examples diff --git a/cookbook/06_storage/mongo/async_mongo/async_mongodb_for_agent.py b/cookbook/06_storage/mongo/async_mongo/async_mongodb_for_agent.py index 4721b22be8..46373a6ac6 100644 --- a/cookbook/06_storage/mongo/async_mongo/async_mongodb_for_agent.py +++ b/cookbook/06_storage/mongo/async_mongo/async_mongodb_for_agent.py @@ -13,7 +13,7 @@ docker run -d \ ``` or use our script: ```bash -./scripts/run_mongodb.sh +./cookbook/scripts/run_mongodb.sh ``` """ diff --git a/cookbook/06_storage/mongo/async_mongo/async_mongodb_for_team.py b/cookbook/06_storage/mongo/async_mongo/async_mongodb_for_team.py index f296cde59e..4276364595 100644 --- a/cookbook/06_storage/mongo/async_mongo/async_mongodb_for_team.py +++ b/cookbook/06_storage/mongo/async_mongo/async_mongodb_for_team.py @@ -14,7 +14,7 @@ docker run -d \ ``` or use our script: ```bash -./scripts/run_mongodb.sh +./cookbook/scripts/run_mongodb.sh ``` """ diff --git a/cookbook/06_storage/mongo/async_mongo/async_mongodb_for_workflow.py b/cookbook/06_storage/mongo/async_mongo/async_mongodb_for_workflow.py index e728cc7476..61e2665b87 100644 --- a/cookbook/06_storage/mongo/async_mongo/async_mongodb_for_workflow.py +++ b/cookbook/06_storage/mongo/async_mongo/async_mongodb_for_workflow.py @@ -1,6 +1,6 @@ """ Run: `pip install openai ddgs pymongo motor` to install dependencies -Run: `python cookbook/db/mongo/async_mongo/async_mongodb_for_workflow.py` to run the workflow +Run: `python cookbook/06_storage/mongo/async_mongo/async_mongodb_for_workflow.py` to run the workflow Run a local MongoDB server using: ```bash @@ -13,7 +13,7 @@ docker run -d \ ``` or use our script: ```bash -./scripts/run_mongodb.sh +./cookbook/scripts/run_mongodb.sh ``` """ diff --git a/cookbook/06_storage/mongo/mongodb_for_agent.py b/cookbook/06_storage/mongo/mongodb_for_agent.py index 89e9151d60..1a54be3741 100644 --- a/cookbook/06_storage/mongo/mongodb_for_agent.py +++ b/cookbook/06_storage/mongo/mongodb_for_agent.py @@ -13,7 +13,7 @@ docker run -d \ ``` or use our script: ```bash -./scripts/run_mongodb.sh +./cookbook/scripts/run_mongodb.sh ``` """ diff --git a/cookbook/06_storage/mongo/mongodb_for_team.py b/cookbook/06_storage/mongo/mongodb_for_team.py index fecfbc6d68..74b5de65fe 100644 --- a/cookbook/06_storage/mongo/mongodb_for_team.py +++ b/cookbook/06_storage/mongo/mongodb_for_team.py @@ -14,7 +14,7 @@ docker run -d \ ``` or use our script: ```bash -./scripts/run_mongodb.sh +./cookbook/scripts/run_mongodb.sh """ from typing import List diff --git a/cookbook/06_storage/postgres/async_postgres/async_postgres_for_team.py b/cookbook/06_storage/postgres/async_postgres/async_postgres_for_team.py index 9d756bbc4a..fe6fc27725 100644 --- a/cookbook/06_storage/postgres/async_postgres/async_postgres_for_team.py +++ b/cookbook/06_storage/postgres/async_postgres/async_postgres_for_team.py @@ -1,6 +1,6 @@ """ 1. Run: `uv pip install openai ddgs newspaper4k lxml_html_clean agno` to install the dependencies -2. Run: `python cookbook/db/async_postgres/async_postgres_for_team.py` to run the team +2. Run: `python cookbook/06_storage/postgres/async_postgres/async_postgres_for_team.py` to run the team """ import asyncio diff --git a/cookbook/06_storage/postgres/postgres_for_team.py b/cookbook/06_storage/postgres/postgres_for_team.py index 21e55df2f4..6d74d52016 100644 --- a/cookbook/06_storage/postgres/postgres_for_team.py +++ b/cookbook/06_storage/postgres/postgres_for_team.py @@ -1,6 +1,6 @@ """ 1. Run: `uv pip install openai ddgs newspaper4k lxml_html_clean agno` to install the dependencies -2. Run: `python cookbook/storage/postgres_storage/postgres_storage_for_team.py` to run the team +2. Run: `python cookbook/06_storage/postgres/postgres_for_team.py` to run the team """ from typing import List diff --git a/cookbook/06_storage/singlestore/singlestore_for_team.py b/cookbook/06_storage/singlestore/singlestore_for_team.py index d705ab718b..9de6f4ba12 100644 --- a/cookbook/06_storage/singlestore/singlestore_for_team.py +++ b/cookbook/06_storage/singlestore/singlestore_for_team.py @@ -1,6 +1,6 @@ """ 1. Run: `uv pip install openai ddgs newspaper4k lxml_html_clean agno` to install the dependencies -2. Run: `python cookbook/storage/singlestore_storage/singlestore_storage_for_team.py` to run the team +2. Run: `python cookbook/06_storage/singlestore/singlestore_for_team.py` to run the team """ from os import getenv diff --git a/cookbook/06_storage/sqlite/async_sqlite/async_sqlite_for_team.py b/cookbook/06_storage/sqlite/async_sqlite/async_sqlite_for_team.py index 5e926fe0d1..71d5da2567 100644 --- a/cookbook/06_storage/sqlite/async_sqlite/async_sqlite_for_team.py +++ b/cookbook/06_storage/sqlite/async_sqlite/async_sqlite_for_team.py @@ -1,6 +1,6 @@ """ 1. Run: `uv pip install openai ddgs newspaper4k lxml_html_clean agno sqlalchemy aiosqlite` to install the dependencies -2. Run: `python cookbook/db/async_sqlite/async_sqlite_for_team.py` to run the team +2. Run: `python cookbook/06_storage/sqlite/async_sqlite/async_sqlite_for_team.py` to run the team """ import asyncio diff --git a/cookbook/06_storage/sqlite/async_sqlite/async_sqlite_for_workflow.py b/cookbook/06_storage/sqlite/async_sqlite/async_sqlite_for_workflow.py index 4923acc794..a5c301873d 100644 --- a/cookbook/06_storage/sqlite/async_sqlite/async_sqlite_for_workflow.py +++ b/cookbook/06_storage/sqlite/async_sqlite/async_sqlite_for_workflow.py @@ -1,6 +1,6 @@ """ Run: `pip install openai ddgs sqlalchemy aiosqlite` to install dependencies -Run: `python cookbook/db/async_sqlite/async_sqlite_for_workflow.py` to run the workflow +Run: `python cookbook/06_storage/sqlite/async_sqlite/async_sqlite_for_workflow.py` to run the workflow """ import asyncio diff --git a/cookbook/06_storage/sqlite/sqlite_for_team.py b/cookbook/06_storage/sqlite/sqlite_for_team.py index 274d6ef1d4..d6d92a8a44 100644 --- a/cookbook/06_storage/sqlite/sqlite_for_team.py +++ b/cookbook/06_storage/sqlite/sqlite_for_team.py @@ -1,6 +1,6 @@ """ 1. Run: `uv pip install openai ddgs newspaper4k lxml_html_clean agno` to install the dependencies -2. Run: `python cookbook/storage/sqlite_storage/sqlite_storage_for_team.py` to run the team +2. Run: `python cookbook/06_storage/sqlite/sqlite_for_team.py` to run the team """ from typing import List diff --git a/cookbook/06_storage/surrealdb/surrealdb_for_agent.py b/cookbook/06_storage/surrealdb/surrealdb_for_agent.py index 6958195b44..a4a9821e6c 100644 --- a/cookbook/06_storage/surrealdb/surrealdb_for_agent.py +++ b/cookbook/06_storage/surrealdb/surrealdb_for_agent.py @@ -14,7 +14,7 @@ surreal start -u root -p root Then, run this test like this: ``` -uv run cookbook/db/surrealdb/surrealdb_for_agent.py +uv run cookbook/06_storage/surrealdb/surrealdb_for_agent.py ``` """ diff --git a/cookbook/06_storage/surrealdb/surrealdb_for_team.py b/cookbook/06_storage/surrealdb/surrealdb_for_team.py index 446a33f16c..1bb620e782 100644 --- a/cookbook/06_storage/surrealdb/surrealdb_for_team.py +++ b/cookbook/06_storage/surrealdb/surrealdb_for_team.py @@ -14,7 +14,7 @@ surreal start -u root -p root Then: 1. Run: `uv pip install anthropic ddgs newspaper4k lxml_html_clean surrealdb agno` to install the dependencies -2. Run: `python cookbook/db/surrealdb/surrealdb_for_team.py` to run the team +2. Run: `python cookbook/06_storage/surrealdb/surrealdb_for_team.py` to run the team """ from typing import List diff --git a/cookbook/06_storage/surrealdb/surrealdb_for_workflow.py b/cookbook/06_storage/surrealdb/surrealdb_for_workflow.py index 6a2bead867..7d497b69b9 100644 --- a/cookbook/06_storage/surrealdb/surrealdb_for_workflow.py +++ b/cookbook/06_storage/surrealdb/surrealdb_for_workflow.py @@ -14,7 +14,7 @@ surreal start -u root -p root Then: 1. Run: `uv pip install anthropic ddgs newspaper4k lxml_html_clean surrealdb agno` to install the dependencies. -2. Run: `python cookbook/db/surrealdb/surrealdb_for_workflow.py` to run the workflow. +2. Run: `python cookbook/06_storage/surrealdb/surrealdb_for_workflow.py` to run the workflow. """ from agno.agent import Agent diff --git a/cookbook/07_knowledge/09_archive/cloud/azure_blob.py b/cookbook/07_knowledge/09_archive/cloud/azure_blob.py index 6d55188b2e..d8cd0e6771 100644 --- a/cookbook/07_knowledge/09_archive/cloud/azure_blob.py +++ b/cookbook/07_knowledge/09_archive/cloud/azure_blob.py @@ -32,7 +32,7 @@ Environment Variables: AZURE_CONTAINER_NAME - Container name Run this cookbook: - python cookbook/07_knowledge/cloud/azure_blob.py + python cookbook/07_knowledge/09_archive/cloud/azure_blob.py """ from os import getenv diff --git a/cookbook/07_knowledge/09_archive/cloud/cloud_agentos.py b/cookbook/07_knowledge/09_archive/cloud/cloud_agentos.py index fbe4669f33..e09d76318d 100644 --- a/cookbook/07_knowledge/09_archive/cloud/cloud_agentos.py +++ b/cookbook/07_knowledge/09_archive/cloud/cloud_agentos.py @@ -9,7 +9,7 @@ Once running, the AgentOS API lets you browse sources, upload content from any configured source, and search the knowledge base. Run: - python cookbook/07_knowledge/cloud/cloud_agentos.py + python cookbook/07_knowledge/09_archive/cloud/cloud_agentos.py Key Concepts: - Each source type has its own config: S3Config, GcsConfig, SharePointConfig, GitHubConfig, AzureBlobConfig diff --git a/cookbook/07_knowledge/09_archive/cloud/github.py b/cookbook/07_knowledge/09_archive/cloud/github.py index 9c764246ca..1a60709d12 100644 --- a/cookbook/07_knowledge/09_archive/cloud/github.py +++ b/cookbook/07_knowledge/09_archive/cloud/github.py @@ -15,7 +15,7 @@ Requirements: - For GitHub App auth: ``pip install PyJWT cryptography`` Run this cookbook: - python cookbook/07_knowledge/cloud/github.py + python cookbook/07_knowledge/09_archive/cloud/github.py """ from os import getenv diff --git a/cookbook/07_knowledge/09_archive/cloud/sharepoint.py b/cookbook/07_knowledge/09_archive/cloud/sharepoint.py index a06a19d093..5247e7d96f 100644 --- a/cookbook/07_knowledge/09_archive/cloud/sharepoint.py +++ b/cookbook/07_knowledge/09_archive/cloud/sharepoint.py @@ -33,7 +33,7 @@ Environment Variables: SHAREPOINT_SITE_ID - Full site ID (hostname,guid,guid format) Run this cookbook: - python cookbook/07_knowledge/cloud/sharepoint.py + python cookbook/07_knowledge/09_archive/cloud/sharepoint.py """ from os import getenv diff --git a/cookbook/07_knowledge/09_archive/custom_retriever/knowledge_tools.py b/cookbook/07_knowledge/09_archive/custom_retriever/knowledge_tools.py index 214742f820..272614d2be 100644 --- a/cookbook/07_knowledge/09_archive/custom_retriever/knowledge_tools.py +++ b/cookbook/07_knowledge/09_archive/custom_retriever/knowledge_tools.py @@ -3,7 +3,7 @@ Here is a tool with reasoning capabilities to allow agents to search and analyze 1. Run: `uv pip install openai agno lancedb sqlalchemy` to install the dependencies 2. Export your OPENAI_API_KEY -3. Run: `python cookbook/07_knowledge/knowledge_tools.py` to run the agent +3. Run: `python cookbook/07_knowledge/09_archive/custom_retriever/knowledge_tools.py` to run the agent """ from agno.agent import Agent diff --git a/cookbook/07_knowledge/09_archive/filters/isolate_vector_search.py b/cookbook/07_knowledge/09_archive/filters/isolate_vector_search.py index e62ad4ed44..00f58e3770 100644 --- a/cookbook/07_knowledge/09_archive/filters/isolate_vector_search.py +++ b/cookbook/07_knowledge/09_archive/filters/isolate_vector_search.py @@ -15,7 +15,7 @@ IMPORTANT: If you have existing production data and want to enable isolation, yo need to re-index your data with isolate_vector_search=True to add the linked_to metadata. Existing documents without linked_to metadata will NOT be found when isolation is enabled. -Run: `python cookbook/07_knowledge/basic_operations/async/05_isolate_vector_search.py` +Run: `python cookbook/07_knowledge/09_archive/filters/isolate_vector_search.py` """ import asyncio diff --git a/cookbook/07_knowledge/09_archive/protocol/file_system.py b/cookbook/07_knowledge/09_archive/protocol/file_system.py index 3881d5d2c4..2f1232c1a1 100644 --- a/cookbook/07_knowledge/09_archive/protocol/file_system.py +++ b/cookbook/07_knowledge/09_archive/protocol/file_system.py @@ -9,7 +9,7 @@ three tools to the agent: - list_files: List files matching a glob pattern - get_file: Read the full contents of a specific file -Run: `python cookbook/07_knowledge/protocol/file_system.py` +Run: `python cookbook/07_knowledge/09_archive/protocol/file_system.py` """ from agno.agent import Agent diff --git a/cookbook/07_knowledge/09_archive/vector_dbs/lance_db_cloud.py b/cookbook/07_knowledge/09_archive/vector_dbs/lance_db_cloud.py index 4516161df5..979522458b 100644 --- a/cookbook/07_knowledge/09_archive/vector_dbs/lance_db_cloud.py +++ b/cookbook/07_knowledge/09_archive/vector_dbs/lance_db_cloud.py @@ -6,7 +6,7 @@ Requires environment variables: - LANCE_DB_API_KEY or LANCEDB_API_KEY: LanceDB Cloud API key Run from repo root with env loaded (e.g. direnv): - .venvs/demo/bin/python cookbook/07_knowledge/vector_db/lance_db_cloud/lance_db_cloud.py + .venvs/demo/bin/python cookbook/07_knowledge/09_archive/vector_dbs/lance_db_cloud.py """ import asyncio diff --git a/cookbook/08_learning/setup_venv.sh b/cookbook/08_learning/setup_venv.sh index a8aa0aa056..f76f6643eb 100755 --- a/cookbook/08_learning/setup_venv.sh +++ b/cookbook/08_learning/setup_venv.sh @@ -4,8 +4,8 @@ # # Learning Machines Environment Setup # -# Usage: ./cookbook/08_learning/venv_setup.sh -# Run: python cookbook/08_learning/01_basics/1_user_profile_always.py +# Usage: ./cookbook/08_learning/setup_venv.sh +# Run: python cookbook/08_learning/01_basics/1a_user_profile_always.py # ############################################################################ @@ -70,7 +70,7 @@ echo "" echo -e " ${BOLD}Done.${NC}" echo "" echo -e " ${DIM}Activate:${NC} ${ACTIVATE_CMD}" -echo -e " ${DIM}Run:${NC} python cookbook/08_learning/01_basics/1_user_profile_always.py" +echo -e " ${DIM}Run:${NC} python cookbook/08_learning/01_basics/1a_user_profile_always.py" echo "" echo -e " ${DIM}(Activation command copied to clipboard. Just paste and hit enter.)${NC}" echo "" diff --git a/cookbook/90_models/README.md b/cookbook/90_models/README.md index 6232bb8d37..a0ed72de70 100644 --- a/cookbook/90_models/README.md +++ b/cookbook/90_models/README.md @@ -30,7 +30,7 @@ uv pip install agno openai export OPENAI_API_KEY=your-key # Run example -python cookbook/92_models/openai/basic.py +python cookbook/90_models/openai/chat/basic.py ``` ## Common Patterns diff --git a/cookbook/90_models/aimlapi/README.md b/cookbook/90_models/aimlapi/README.md index 9af2757efd..747377e862 100644 --- a/cookbook/90_models/aimlapi/README.md +++ b/cookbook/90_models/aimlapi/README.md @@ -28,16 +28,8 @@ uv pip install -U openai ddgs duckdb yfinance agno ### 4. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/aimlapi/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/aimlapi/basic.py +python cookbook/90_models/aimlapi/basic.py ``` ### 5. Run Agent with Tools @@ -45,12 +37,12 @@ python cookbook/92_models/aimlapi/basic.py - DuckDuckGo Search ```shell -python cookbook/92_models/aimlapi/tool_use.py +python cookbook/90_models/aimlapi/tool_use.py ``` ### 6. Run Agent that returns structured output ```shell -python cookbook/92_models/aimlapi/structured_output.py +python cookbook/90_models/aimlapi/structured_output.py ``` diff --git a/cookbook/90_models/anthropic/README.md b/cookbook/90_models/anthropic/README.md index 91390e7f7d..31a13a86b9 100644 --- a/cookbook/90_models/anthropic/README.md +++ b/cookbook/90_models/anthropic/README.md @@ -25,16 +25,8 @@ uv pip install -U anthropic ddgs duckdb yfinance agno ### 4. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/anthropic/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/anthropic/basic.py +python cookbook/90_models/anthropic/basic.py ``` ### 5. Run Agent with Tools @@ -42,19 +34,19 @@ python cookbook/92_models/anthropic/basic.py - DuckDuckGo Search ```shell -python cookbook/92_models/anthropic/tool_use.py +python cookbook/90_models/anthropic/tool_use.py ``` ### 6. Run Agent that returns structured output ```shell -python cookbook/92_models/anthropic/structured_output.py +python cookbook/90_models/anthropic/structured_output.py ``` ### 7. Run Agent that uses storage ```shell -python cookbook/92_models/anthropic/storage.py +python cookbook/90_models/anthropic/db.py ``` ### 8. Run Agent that uses knowledge @@ -65,37 +57,31 @@ export OPENAI_API_KEY=*** ``` ```shell -python cookbook/92_models/anthropic/knowledge.py +python cookbook/90_models/anthropic/knowledge.py ``` ### 9. Run Agent that uses memory ```shell -python cookbook/92_models/anthropic/memory.py +python cookbook/90_models/anthropic/memory.py ``` ### 10. Run Agent that analyzes an image ```shell -python cookbook/92_models/anthropic/image_agent.py +python cookbook/90_models/anthropic/image_input_url.py ``` ### 11. Run Agent with Thinking enabled -- Streaming on ```shell -python cookbook/92_models/anthropic/thinking.py -``` -- Streaming off - -```shell -python cookbook/92_models/anthropic/thinking_stream.py +python cookbook/90_models/anthropic/thinking.py ``` ### 12. Run Agent with Interleaved Thinking ```shell -python cookbook/92_models/anthropic/financial_analyst_thinking.py +python cookbook/90_models/anthropic/financial_analyst_thinking.py ``` ### 13. Adaptive Thinking with `output_config` diff --git a/cookbook/90_models/anthropic/memory.py b/cookbook/90_models/anthropic/memory.py index 30099ffaa9..dcb2ccbf77 100644 --- a/cookbook/90_models/anthropic/memory.py +++ b/cookbook/90_models/anthropic/memory.py @@ -3,7 +3,7 @@ This recipe shows how to use personalized memories and summaries in an agent. Steps: 1. Run: `./cookbook/scripts/run_pgvector.sh` to start a postgres container with pgvector 2. Run: `uv pip install anthropic sqlalchemy 'psycopg[binary]' pgvector` to install the dependencies -3. Run: `python cookbook/92_models/anthropic/memory.py` to run the agent +3. Run: `python cookbook/90_models/anthropic/memory.py` to run the agent """ from agno.agent import Agent diff --git a/cookbook/90_models/aws/bedrock/README.md b/cookbook/90_models/aws/bedrock/README.md index d353f7eade..c8cb3138ff 100644 --- a/cookbook/90_models/aws/bedrock/README.md +++ b/cookbook/90_models/aws/bedrock/README.md @@ -46,7 +46,6 @@ agent = Agent( ) ``` - ### 3. Install libraries ```shell @@ -55,16 +54,8 @@ uv pip install -U boto3 ddgs agno ### 4. Run basic agent -- Streaming on - ```shell -python cookbook/92_models/aws/bedrock/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/aws/bedrock/basic.py +python cookbook/90_models/aws/bedrock/basic.py ``` ### 5. Run Agent with Tools @@ -72,23 +63,11 @@ python cookbook/92_models/aws/bedrock/basic.py - DuckDuckGo Search ```shell -python cookbook/92_models/aws/bedrock/tool_use.py +python cookbook/90_models/aws/bedrock/tool_use.py ``` ### 6. Run Agent that returns structured output ```shell -python cookbook/92_models/aws/bedrock/structured_output.py -``` - -### 7. Run Agent that uses storage - -```shell -python cookbook/92_models/aws/bedrock/storage.py -``` - -### 8. Run Agent that uses knowledge - -```shell -python cookbook/92_models/aws/bedrock/knowledge.py +python cookbook/90_models/aws/bedrock/structured_output.py ``` diff --git a/cookbook/90_models/aws/claude/README.md b/cookbook/90_models/aws/claude/README.md index 6c6ce9ee62..64abd2242e 100644 --- a/cookbook/90_models/aws/claude/README.md +++ b/cookbook/90_models/aws/claude/README.md @@ -38,16 +38,8 @@ uv pip install -U anthropic ddgs agno ### 4. Run basic agent -- Streaming on - ```shell -python cookbook/92_models/aws/claude/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/aws/claude/basic.py +python cookbook/90_models/aws/claude/basic.py ``` ### 5. Run Agent with Tools @@ -55,25 +47,25 @@ python cookbook/92_models/aws/claude/basic.py - DuckDuckGo Search ```shell -python cookbook/92_models/aws/claude/tool_use.py +python cookbook/90_models/aws/claude/tool_use.py ``` ### 6. Run Agent that returns structured output ```shell -python cookbook/92_models/aws/claude/structured_output.py +python cookbook/90_models/aws/claude/structured_output.py ``` ### 7. Run Agent that uses storage ```shell -python cookbook/92_models/aws/claude/storage.py +python cookbook/90_models/aws/claude/db.py ``` ### 8. Run Agent that uses knowledge ```shell -python cookbook/92_models/aws/claude/knowledge.py +python cookbook/90_models/aws/claude/knowledge.py ``` ### 9. Adaptive Thinking with `output_config` diff --git a/cookbook/90_models/azure/ai_foundry/README.md b/cookbook/90_models/azure/ai_foundry/README.md index 97bd65c146..9e51a52739 100644 --- a/cookbook/90_models/azure/ai_foundry/README.md +++ b/cookbook/90_models/azure/ai_foundry/README.md @@ -31,16 +31,8 @@ uv pip install -U openai ddgs duckdb yfinance agno ### 4. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/azure/openai/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/azure/openai/basic.py +python cookbook/90_models/azure/ai_foundry/basic.py ``` ### 5. Run Agent with Tools @@ -48,23 +40,23 @@ python cookbook/92_models/azure/openai/basic.py - DuckDuckGo Search ```shell -python cookbook/92_models/azure/openai/tool_use.py +python cookbook/90_models/azure/ai_foundry/tool_use.py ``` ### 6. Run Agent that returns structured output ```shell -python cookbook/92_models/azure/openai/structured_output.py +python cookbook/90_models/azure/ai_foundry/structured_output.py ``` ### 7. Run Agent that uses storage ```shell -python cookbook/92_models/azure/openai/storage.py +python cookbook/90_models/azure/ai_foundry/db.py ``` ### 8. Run Agent that uses knowledge ```shell -python cookbook/92_models/azure/openai/knowledge.py +python cookbook/90_models/azure/ai_foundry/knowledge.py ``` diff --git a/cookbook/90_models/azure/openai/README.md b/cookbook/90_models/azure/openai/README.md index a33f0fe123..c02c3e3204 100644 --- a/cookbook/90_models/azure/openai/README.md +++ b/cookbook/90_models/azure/openai/README.md @@ -28,16 +28,8 @@ uv pip install -U openai ddgs duckdb yfinance agno ### 4. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/azure/openai/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/azure/openai/basic.py +python cookbook/90_models/azure/openai/basic.py ``` ### 5. Run Agent with Tools @@ -45,23 +37,23 @@ python cookbook/92_models/azure/openai/basic.py - DuckDuckGo Search ```shell -python cookbook/92_models/azure/openai/tool_use.py +python cookbook/90_models/azure/openai/tool_use.py ``` ### 6. Run Agent that returns structured output ```shell -python cookbook/92_models/azure/openai/structured_output.py +python cookbook/90_models/azure/openai/structured_output.py ``` ### 7. Run Agent that uses storage ```shell -python cookbook/92_models/azure/openai/storage.py +python cookbook/90_models/azure/openai/db.py ``` ### 8. Run Agent that uses knowledge ```shell -python cookbook/92_models/azure/openai/knowledge.py +python cookbook/90_models/azure/openai/knowledge.py ``` diff --git a/cookbook/90_models/cohere/README.md b/cookbook/90_models/cohere/README.md index 4f6ec9d0d7..1ceca1a08d 100644 --- a/cookbook/90_models/cohere/README.md +++ b/cookbook/90_models/cohere/README.md @@ -23,16 +23,8 @@ uv pip install -U cohere ddgs duckdb yfinance agno ### 4. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/cohere/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/cohere/basic.py +python cookbook/90_models/cohere/basic.py ``` ### 5. Run Agent with Tools @@ -40,29 +32,29 @@ python cookbook/92_models/cohere/basic.py - DuckDuckGo Search ```shell -python cookbook/92_models/cohere/tool_use.py +python cookbook/90_models/cohere/tool_use.py ``` ### 6. Run Agent that returns structured output ```shell -python cookbook/92_models/cohere/structured_output.py +python cookbook/90_models/cohere/structured_output.py ``` ### 7. Run Agent that uses storage ```shell -python cookbook/92_models/cohere/storage.py +python cookbook/90_models/cohere/db.py ``` ### 8. Run Agent that uses knowledge ```shell -python cookbook/92_models/cohere/knowledge.py +python cookbook/90_models/cohere/knowledge.py ``` ### 9. Run Agent that uses memory ```shell -python cookbook/92_models/cohere/memory.py +python cookbook/90_models/cohere/memory.py ``` diff --git a/cookbook/90_models/cohere/memory.py b/cookbook/90_models/cohere/memory.py index 74afba9085..5f9d99ce6c 100644 --- a/cookbook/90_models/cohere/memory.py +++ b/cookbook/90_models/cohere/memory.py @@ -3,7 +3,7 @@ This recipe shows how to use personalized memories and summaries in an agent. Steps: 1. Run: `./cookbook/scripts/run_pgvector.sh` to start a postgres container with pgvector 2. Run: `uv pip install cohere sqlalchemy 'psycopg[binary]' pgvector` to install the dependencies -3. Run: `python cookbook/92_models/cohere/memory.py` to run the agent +3. Run: `python cookbook/90_models/cohere/memory.py` to run the agent """ from agno.agent.agent import Agent diff --git a/cookbook/90_models/cometapi/README.md b/cookbook/90_models/cometapi/README.md index 92c141244b..b9928a8c78 100644 --- a/cookbook/90_models/cometapi/README.md +++ b/cookbook/90_models/cometapi/README.md @@ -29,82 +29,42 @@ uv pip install -U openai duckduckgo-search duckdb agno ### 4. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/cometapi/basic_stream.py +python cookbook/90_models/cometapi/basic.py ``` -- Streaming off - -```shell -python cookbook/92_models/cometapi/basic.py -``` - -### 5. Run Async examples - -- Basic async - -```shell -python cookbook/92_models/cometapi/async_basic.py -``` - -- Async with streaming - -```shell -python cookbook/92_models/cometapi/async_basic_stream.py -``` - -### 6. Run Agent with Tools +### 5. Run Agent with Tools - DuckDuckGo Search ```shell -python cookbook/92_models/cometapi/tool_use.py +python cookbook/90_models/cometapi/tool_use.py ``` -- Tool use with streaming +### 6. Run Agent that returns structured output ```shell -python cookbook/92_models/cometapi/tool_use_stream.py +python cookbook/90_models/cometapi/structured_output.py ``` -- Async tool use - -```shell -python cookbook/92_models/cometapi/async_tool_use.py -``` - -- Async tool use with streaming - -```shell -python cookbook/92_models/cometapi/async_tool_use_stream.py -``` - -### 7. Run Agent that returns structured output - -```shell -python cookbook/92_models/cometapi/structured_output.py -``` - -### 8. Image analysis examples +### 7. Image analysis examples - Basic image analysis ```shell -python cookbook/92_models/cometapi/image_agent.py +python cookbook/90_models/cometapi/image_agent.py ``` - Image analysis with memory ```shell -python cookbook/92_models/cometapi/image_agent_with_memory.py +python cookbook/90_models/cometapi/image_agent_with_memory.py ``` -### 9. Multi-model showcase +### 8. Multi-model showcase ```shell -python cookbook/92_models/cometapi/multi_model.py +python cookbook/90_models/cometapi/multi_model.py ``` ## Available Models diff --git a/cookbook/90_models/dashscope/README.md b/cookbook/90_models/dashscope/README.md index b72bd2a247..e84ce472d5 100644 --- a/cookbook/90_models/dashscope/README.md +++ b/cookbook/90_models/dashscope/README.md @@ -23,70 +23,36 @@ uv pip install -U openai ddgs agno ### 4. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/dashscope/basic_stream.py +python cookbook/90_models/dashscope/basic.py ``` -- Streaming off - -```shell -python cookbook/92_models/dashscope/basic.py -``` - -### 5. Run async Agent - -- Async basic - -```shell -python cookbook/92_models/dashscope/async_basic.py -``` - -- Async streaming - -```shell -python cookbook/92_models/dashscope/async_basic_stream.py -``` - -### 6. Run Agent with Tools +### 5. Run Agent with Tools - DuckDuckGo Search ```shell -python cookbook/92_models/dashscope/tool_use.py +python cookbook/90_models/dashscope/tool_use.py ``` -- Async tool use +### 6. Run Agent that returns structured output ```shell -python cookbook/92_models/dashscope/async_tool_use.py +python cookbook/90_models/dashscope/structured_output.py ``` -### 7. Run Agent that returns structured output - -```shell -python cookbook/92_models/dashscope/structured_output.py -``` - -### 8. Run Agent that analyzes images +### 7. Run Agent that analyzes images - Basic image analysis ```shell -python cookbook/92_models/dashscope/image_agent.py +python cookbook/90_models/dashscope/image_agent.py ``` - Image analysis with bytes ```shell -python cookbook/92_models/dashscope/image_agent_bytes.py -``` - -- Async image analysis - -```shell -python cookbook/92_models/dashscope/async_image_agent.py +python cookbook/90_models/dashscope/image_agent_bytes.py ``` For more information about Qwen models and capabilities, visit: diff --git a/cookbook/90_models/dashscope/knowledge_tools.py b/cookbook/90_models/dashscope/knowledge_tools.py index 7c2a94a49f..b692630465 100644 --- a/cookbook/90_models/dashscope/knowledge_tools.py +++ b/cookbook/90_models/dashscope/knowledge_tools.py @@ -3,7 +3,7 @@ Here is a tool with reasoning capabilities to allow agents to search and analyze 1. Run: `uv pip install openai agno lancedb sqlalchemy` to install the dependencies 2. Export your OPENAI_API_KEY -3. Run: `cookbook/92_models/dashscope/knowledge_tools.py` to run the agent +3. Run: `cookbook/90_models/dashscope/knowledge_tools.py` to run the agent """ from agno.agent import Agent diff --git a/cookbook/90_models/deepinfra/README.md b/cookbook/90_models/deepinfra/README.md index 1d0da08ac5..e9224b88ef 100644 --- a/cookbook/90_models/deepinfra/README.md +++ b/cookbook/90_models/deepinfra/README.md @@ -25,48 +25,20 @@ uv pip install -U openai ddgs agno ### 4. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/deepinfra/basic_stream.py +python cookbook/90_models/deepinfra/basic.py ``` -- Streaming off - -```shell -python cookbook/92_models/deepinfra/basic.py -``` - -### 5. Run Async Agent - -- Streaming on - -```shell -python cookbook/92_models/deepinfra/async_basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/deepinfra/async_basic.py -``` - -### 6. Run Agent with Tools +### 5. Run Agent with Tools - DuckDuckGo Search ```shell -python cookbook/92_models/deepinfra/tool_use.py -``` - -- Async DuckDuckGo Search - -```shell -python cookbook/92_models/deepinfra/async_tool_use.py +python cookbook/90_models/deepinfra/tool_use.py ``` ### 6. Run Agent that returns JSON output defined by the response model ```shell -python cookbook/92_models/deepinfra/json_output.py +python cookbook/90_models/deepinfra/json_output.py ``` diff --git a/cookbook/90_models/fireworks/README.md b/cookbook/90_models/fireworks/README.md index ad813b8c28..f4a8ee0120 100644 --- a/cookbook/90_models/fireworks/README.md +++ b/cookbook/90_models/fireworks/README.md @@ -23,16 +23,8 @@ uv pip install -U openai ddgs duckdb yfinance agno ### 4. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/fireworks/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/fireworks/basic.py +python cookbook/90_models/fireworks/basic.py ``` ### 5. Run Agent with Tools @@ -40,14 +32,12 @@ python cookbook/92_models/fireworks/basic.py - DuckDuckGo Search ```shell -python cookbook/92_models/fireworks/tool_use.py +python cookbook/90_models/fireworks/tool_use.py ``` - ### 6. Run Agent that returns structured output ```shell -python cookbook/92_models/fireworks/structured_output.py +python cookbook/90_models/fireworks/structured_output.py ``` - diff --git a/cookbook/90_models/google/gemini/README.md b/cookbook/90_models/google/gemini/README.md index 9bbb584dcf..9a5fa7fdc5 100644 --- a/cookbook/90_models/google/gemini/README.md +++ b/cookbook/90_models/google/gemini/README.md @@ -35,16 +35,8 @@ uv pip install -U google-generativeai ddgs yfinance agno ### 4. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/google/gemini/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/google/gemini/basic.py +python cookbook/90_models/google/gemini/basic.py ``` ### 5. Run Agent with Tools @@ -52,90 +44,84 @@ python cookbook/92_models/google/gemini/basic.py - DuckDuckGo Agent ```shell -python cookbook/92_models/google/gemini/tool_use.py +python cookbook/90_models/google/gemini/tool_use.py ``` ### 6. Run Agent that returns structured output ```shell -python cookbook/92_models/google/gemini/structured_output.py +python cookbook/90_models/google/gemini/structured_output.py ``` ### 7. Run Agent that uses storage ```shell -python cookbook/92_models/google/gemini/storage.py +python cookbook/90_models/google/gemini/db.py ``` ### 8. Run Agent that uses knowledge ```shell -python cookbook/92_models/google/gemini/knowledge.py +python cookbook/90_models/google/gemini/knowledge.py ``` ### 9. Run Agent that interprets an audio file ```shell -python cookbook/92_models/google/gemini/audio_input_bytes_content.py +python cookbook/90_models/google/gemini/audio_input_bytes_content.py ``` ### 10. Run Agent that analyzes an image ```shell -python cookbook/92_models/google/gemini/image_agent.py +python cookbook/90_models/google/gemini/image_input.py ``` or ```shell -python cookbook/92_models/google/gemini/image_agent_file_upload.py +python cookbook/90_models/google/gemini/image_input_file_upload.py ``` ### 11. Run Agent that analyzes a video ```shell -python cookbook/92_models/google/gemini/video_agent_input_bytes_content.py +python cookbook/90_models/google/gemini/video_input_bytes_content.py ``` -### 12. Run Agent that uses flash thinking mode from Gemini +### 12. Run Agent with thinking budget configuration ```shell -python cookbook/92_models/google/gemini/flash_thinking_agent.py +python cookbook/90_models/google/gemini/agent_with_thinking_budget.py ``` -### 13. Run Agent with thinking budget configuration +### 13. Run agent with URL context ```shell -python cookbook/92_models/google/gemini/agent_with_thinking_budget.py +python cookbook/90_models/google/gemini/url_context.py ``` -### 14. Run agent with URL context +### 14. Run agent with URL context + Search Grounding ```shell -python cookbook/92_models/google/gemini/url_context.py +python cookbook/90_models/google/gemini/url_context_with_search.py ``` -### 15. Run agent with URL context + Search Grounding +### 15. Run agent with Google Search ```shell -python cookbook/92_models/google/gemini/url_context_with_search.py +python cookbook/90_models/google/gemini/search.py ``` -### 16. Run agent with Google Search +### 16. Run agent with Google Search Grounding ```shell -python cookbook/92_models/google/gemini/search.py +python cookbook/90_models/google/gemini/grounding.py ``` -### 17. Run agent with Google Search Grounding +### 17. Run agent with Vertex AI Search ```shell -python cookbook/92_models/google/gemini/grounding.py -``` - -### 18. Run agent with Vertex AI Search - -```shell -python cookbook/92_models/google/gemini/vertex_ai_search.py +python cookbook/90_models/google/gemini/vertex_ai_search.py ``` diff --git a/cookbook/90_models/groq/README.md b/cookbook/90_models/groq/README.md index 80b4eab3dd..69279c0d22 100644 --- a/cookbook/90_models/groq/README.md +++ b/cookbook/90_models/groq/README.md @@ -23,16 +23,8 @@ uv pip install -U groq ddgs duckdb yfinance agno ### 4. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/groq/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/groq/basic.py +python cookbook/90_models/groq/basic.py ``` ### 5. Run Agent with Tools @@ -40,19 +32,19 @@ python cookbook/92_models/groq/basic.py - DuckDuckGo Search ```shell -python cookbook/92_models/groq/tool_use.py +python cookbook/90_models/groq/tool_use.py ``` - Research using Exa ```shell -python cookbook/92_models/groq/research_agent_exa.py +python cookbook/90_models/groq/research_agent_exa.py ``` ### 6. Run Agent that returns structured output ```shell -python cookbook/92_models/groq/structured_output.py +python cookbook/90_models/groq/structured_output.py ``` ### 7. Run Agent that uses storage @@ -60,33 +52,24 @@ python cookbook/92_models/groq/structured_output.py Please run pgvector in a docker container using: ```shell -./cookbook/run_pgvector.sh +./cookbook/scripts/run_pgvector.sh ``` Then run the following: ```shell -python cookbook/92_models/groq/storage.py +python cookbook/90_models/groq/db.py ``` ### 8. Run Agent that uses knowledge ```shell -python cookbook/92_models/groq/knowledge.py +python cookbook/90_models/groq/knowledge.py ``` -Take note that by default, OpenAI embeddings are used and an API key will be required. Alternatively, there are other embedders available that can be used. See more examples in `/cookbook/07_knowledge/embedders` +Take note that by default, OpenAI embeddings are used and an API key will be required. Alternatively, there are other embedders available that can be used. See more examples in `/cookbook/07_knowledge/09_archive/embedders` ### 9. Run Agent that analyzes an image ```shell -python cookbook/92_models/groq/image_agent.py -``` - -### 10. Run in async mode - -```shell -python cookbook/92_models/groq/async/basic_stream.py -``` -```shell -python cookbook/92_models/groq/async/basic.py +python cookbook/90_models/groq/image_agent.py ``` diff --git a/cookbook/90_models/huggingface/README.md b/cookbook/90_models/huggingface/README.md index 155d303b24..8d2a87cd81 100644 --- a/cookbook/90_models/huggingface/README.md +++ b/cookbook/90_models/huggingface/README.md @@ -23,16 +23,8 @@ uv pip install -U huggingface_hub agno ### 4. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/huggingface/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/huggingface/basic.py +python cookbook/90_models/huggingface/basic.py ``` ### 5. Run agent with tools @@ -40,5 +32,5 @@ python cookbook/92_models/huggingface/basic.py - An essay writer using Llama model ```shell -python cookbook/92_models/huggingface/llama_essay_writer.py +python cookbook/90_models/huggingface/llama_essay_writer.py ``` diff --git a/cookbook/90_models/ibm/watsonx/README.md b/cookbook/90_models/ibm/watsonx/README.md index 76792b633e..e820ca7b7c 100644 --- a/cookbook/90_models/ibm/watsonx/README.md +++ b/cookbook/90_models/ibm/watsonx/README.md @@ -41,16 +41,8 @@ uv pip install -U ibm-watsonx-ai ddgs agno ### 4. Run basic agent -- Streaming on - ```shell -python cookbook/92_models/ibm/watsonx/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/ibm/watsonx/basic.py +python cookbook/90_models/ibm/watsonx/basic.py ``` ### 5. Run Agent with Tools @@ -58,29 +50,29 @@ python cookbook/92_models/ibm/watsonx/basic.py - DuckDuckGo Search ```shell -python cookbook/92_models/ibm/watsonx/tool_use.py +python cookbook/90_models/ibm/watsonx/tool_use.py ``` ### 6. Run Agent that returns structured output ```shell -python cookbook/92_models/ibm/watsonx/structured_output.py +python cookbook/90_models/ibm/watsonx/structured_output.py ``` ### 7. Run Agent that uses storage ```shell -python cookbook/92_models/ibm/watsonx/storage.py +python cookbook/90_models/ibm/watsonx/db.py ``` ### 8. Run Agent that uses knowledge ```shell -python cookbook/92_models/ibm/watsonx/knowledge.py +python cookbook/90_models/ibm/watsonx/knowledge.py ``` ### 9. Run Agent that uses images ```shell -python cookbook/92_models/ibm/watsonx/image_agent.py +python cookbook/90_models/ibm/watsonx/image_agent_bytes.py ``` diff --git a/cookbook/90_models/langdb/README.md b/cookbook/90_models/langdb/README.md index 85ba03fae1..f739a9046a 100644 --- a/cookbook/90_models/langdb/README.md +++ b/cookbook/90_models/langdb/README.md @@ -24,54 +24,39 @@ uv pip install -U openai ddgs duckdb yfinance agno ### 4. Run Agent without Tools -- Streaming on - ```shell -python cookbook/92_models/langdb/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/langdb/basic.py +python cookbook/90_models/langdb/basic.py ``` ### 5. Run Agent with Tools -- Yahoo Finance with streaming on - -```shell -python cookbook/92_models/langdb/agent_stream.py -``` - - Yahoo Finance without streaming ```shell -python cookbook/92_models/langdb/agent.py +python cookbook/90_models/langdb/agent.py ``` - Web Search Agent ```shell -python cookbook/92_models/langdb/web_search.py +python cookbook/90_models/langdb/web_search.py ``` - Data Analyst ```shell -python cookbook/92_models/langdb/data_analyst.py +python cookbook/90_models/langdb/data_analyst.py ``` - Finance Agent ```shell -python cookbook/92_models/langdb/finance_agent.py +python cookbook/90_models/langdb/finance_agent.py ``` ### 6. Run Agent that returns structured output ```shell -python cookbook/92_models/langdb/structured_output.py +python cookbook/90_models/langdb/structured_output.py ``` - diff --git a/cookbook/90_models/litellm/README.md b/cookbook/90_models/litellm/README.md index 2b57bde5e5..cc021d5804 100644 --- a/cookbook/90_models/litellm/README.md +++ b/cookbook/90_models/litellm/README.md @@ -28,54 +28,40 @@ uv pip install -U litellm ddgs duckdb yfinance agno ### 4. Run an Agent -- Streaming off - ```shell -python cookbook/92_models/litellm/basic.py -``` - -- Streaming on - -```shell -python cookbook/92_models/litellm/basic_stream.py +python cookbook/90_models/litellm/basic.py ``` ### 5. Run Agent with Tools -- DuckDuckGo Search +- Financial data ```shell -python cookbook/92_models/litellm/tool_use.py -``` - -- Tool use with streaming - -```shell -python cookbook/92_models/litellm/tool_use_stream.py +python cookbook/90_models/litellm/tool_use.py ``` ### 6. Run Agent that returns structured output ```shell -python cookbook/92_models/litellm/structured_output.py +python cookbook/90_models/litellm/structured_output.py ``` ### 7. Run Agent that uses memory ```shell -python cookbook/92_models/litellm/memory.py +python cookbook/90_models/litellm/memory.py ``` ### 8. Run Agent that uses storage ```shell -python cookbook/92_models/litellm/storage.py +python cookbook/90_models/litellm/db.py ``` ### 9. Run Agent that uses knowledge ```shell -python cookbook/92_models/litellm/knowledge.py +python cookbook/90_models/litellm/knowledge.py ``` ### 10. Run Agent that analyzes images @@ -83,19 +69,19 @@ python cookbook/92_models/litellm/knowledge.py - URL-based image ```shell -python cookbook/92_models/litellm/image_agent.py +python cookbook/90_models/litellm/image_agent.py ``` - Byte-based image ```shell -python cookbook/92_models/litellm/image_agent_bytes.py +python cookbook/90_models/litellm/image_agent_bytes.py ``` ### 11. Run Agent that analyzes audio ```shell -python cookbook/92_models/litellm/audio_input_agent.py +python cookbook/90_models/litellm/audio_input_agent.py ``` ### 12. Run Agent that processes PDF files @@ -103,43 +89,23 @@ python cookbook/92_models/litellm/audio_input_agent.py - Local PDF file ```shell -python cookbook/92_models/litellm/pdf_input_local.py +python cookbook/90_models/litellm/pdf_input_local.py ``` - Remote PDF URL ```shell -python cookbook/92_models/litellm/pdf_input_url.py +python cookbook/90_models/litellm/pdf_input_url.py ``` - PDF from bytes ```shell -python cookbook/92_models/litellm/pdf_input_bytes.py +python cookbook/90_models/litellm/pdf_input_bytes.py ``` ### 13. Run Agent with metrics ```shell -python cookbook/92_models/litellm/metrics.py -``` - -### 14. Run async Agents - -- Basic async - -```shell -python cookbook/92_models/litellm/async_basic.py -``` - -- Async with streaming - -```shell -python cookbook/92_models/litellm/async_basic_stream.py -``` - -- Async with tools - -```shell -python cookbook/92_models/litellm/async_tool_use.py +python cookbook/90_models/litellm/metrics.py ``` diff --git a/cookbook/90_models/litellm_openai/README.md b/cookbook/90_models/litellm_openai/README.md index b835ed35bb..a9d8223525 100644 --- a/cookbook/90_models/litellm_openai/README.md +++ b/cookbook/90_models/litellm_openai/README.md @@ -33,10 +33,8 @@ litellm --model claude-3-sonnet-20240229 --host 127.0.0.1 --port 4000 ### 5. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/litellm_proxy/basic_stream.py +python cookbook/90_models/litellm_openai/basic.py ``` ### 6. Run Agent with Tools @@ -44,5 +42,5 @@ python cookbook/92_models/litellm_proxy/basic_stream.py - DuckDuckGo Search ```shell -python cookbook/92_models/litellm_proxy/tool_use.py +python cookbook/90_models/litellm_openai/tool_use.py ``` diff --git a/cookbook/90_models/llama_cpp/README.md b/cookbook/90_models/llama_cpp/README.md index 5860aad659..bf0433e66a 100644 --- a/cookbook/90_models/llama_cpp/README.md +++ b/cookbook/90_models/llama_cpp/README.md @@ -27,34 +27,18 @@ uv pip install -U ddgs openai agno ### 4. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/llama_cpp/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/llama_cpp/basic.py +python cookbook/90_models/llama_cpp/basic.py ``` ### 5. Run Agent with Tools -- Streaming on - ```shell -python cookbook/92_models/llama_cpp/tool_use_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/llama_cpp/tool_use.py +python cookbook/90_models/llama_cpp/tool_use.py ``` ### 6. Run Agent that returns structured output ```shell -python cookbook/92_models/llama_cpp/structured_output.py +python cookbook/90_models/llama_cpp/structured_output.py ``` diff --git a/cookbook/90_models/lmstudio/README.md b/cookbook/90_models/lmstudio/README.md index 4e51b282b3..59517d8bf9 100644 --- a/cookbook/90_models/lmstudio/README.md +++ b/cookbook/90_models/lmstudio/README.md @@ -21,16 +21,8 @@ uv pip install -U ddgs duckdb yfinance agno ### 4. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/lmstudio/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/lmstudio/basic.py +python cookbook/90_models/lmstudio/basic.py ``` ### 5. Run Agent with Tools @@ -38,35 +30,35 @@ python cookbook/92_models/lmstudio/basic.py - DuckDuckGo Search ```shell -python cookbook/92_models/lmstudio/tool_use.py +python cookbook/90_models/lmstudio/tool_use.py ``` ### 6. Run Agent that returns structured output ```shell -python cookbook/92_models/lmstudio/structured_output.py +python cookbook/90_models/lmstudio/structured_output.py ``` ### 7. Run Agent that uses storage ```shell -python cookbook/92_models/lmstudio/storage.py +python cookbook/90_models/lmstudio/db.py ``` ### 8. Run Agent that uses knowledge ```shell -python cookbook/92_models/lmstudio/knowledge.py +python cookbook/90_models/lmstudio/knowledge.py ``` ### 9. Run Agent that uses memory ```shell -python cookbook/92_models/lmstudio/memory.py +python cookbook/90_models/lmstudio/memory.py ``` ### 10. Run Agent that takes image as input ```shell -python cookbook/92_models/lmstudio/image_agent.py +python cookbook/90_models/lmstudio/image_agent.py ``` diff --git a/cookbook/90_models/lmstudio/memory.py b/cookbook/90_models/lmstudio/memory.py index 830c463bd4..4fe5d5e830 100644 --- a/cookbook/90_models/lmstudio/memory.py +++ b/cookbook/90_models/lmstudio/memory.py @@ -3,7 +3,7 @@ This recipe shows how to use personalized memories and summaries in an agent. Steps: 1. Run: `./cookbook/scripts/run_pgvector.sh` to start a postgres container with pgvector 2. Run: `uv pip install ollama sqlalchemy 'psycopg[binary]' pgvector` to install the dependencies -3. Run: `python cookbook/92_models/lmstudio/memory.py` to run the agent +3. Run: `python cookbook/90_models/lmstudio/memory.py` to run the agent """ from agno.agent import Agent diff --git a/cookbook/90_models/meta/README.md b/cookbook/90_models/meta/README.md index ee6ecab83f..f9f82df435 100644 --- a/cookbook/90_models/meta/README.md +++ b/cookbook/90_models/meta/README.md @@ -29,30 +29,14 @@ uv pip install -U agno openai ### 4. Run a basic Agent -- Streaming on - ```shell -python cookbook/92_models/meta/llama/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/meta/llama/basic.py +python cookbook/90_models/meta/llama/basic.py ``` ### 5. Run an Agent with Tools > Run `uv pip install ddgs` to install dependencies. -- Streaming on - ```shell -python cookbook/92_models/meta/llama/tool_use_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/meta/llama/tool_use.py +python cookbook/90_models/meta/llama/tool_use.py ``` diff --git a/cookbook/90_models/mistral/README.md b/cookbook/90_models/mistral/README.md index 7acfd8d68e..757198b943 100644 --- a/cookbook/90_models/mistral/README.md +++ b/cookbook/90_models/mistral/README.md @@ -23,35 +23,26 @@ uv pip install -U mistralai ddgs duckdb yfinance agno ### 4. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/mistral/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/mistral/basic.py +python cookbook/90_models/mistral/basic.py ``` ### 5. Run Agent with Tools - -- DuckDuckGo search +- Custom tool ```shell -python cookbook/92_models/mistral/tool_use.py +python cookbook/90_models/mistral/tool_use.py ``` ### 6. Run Agent that returns structured output ```shell -python cookbook/92_models/mistral/structured_output.py +python cookbook/90_models/mistral/structured_output.py ``` ### 7. Run Agent that uses memory ```shell -python cookbook/92_models/mistral/memory.py +python cookbook/90_models/mistral/memory.py ``` diff --git a/cookbook/90_models/mistral/memory.py b/cookbook/90_models/mistral/memory.py index d645fe2815..e2e15b6944 100644 --- a/cookbook/90_models/mistral/memory.py +++ b/cookbook/90_models/mistral/memory.py @@ -3,7 +3,7 @@ This recipe shows how to use personalized memories and summaries in an agent. Steps: 1. Run: `./cookbook/scripts/run_pgvector.sh` to start a postgres container with pgvector 2. Run: `uv pip install mistralai sqlalchemy 'psycopg[binary]' pgvector` to install the dependencies -3. Run: `python cookbook/92_models/mistral/memory.py` to run the agent +3. Run: `python cookbook/90_models/mistral/memory.py` to run the agent """ from agno.agent import Agent diff --git a/cookbook/90_models/neosantara/README.md b/cookbook/90_models/neosantara/README.md index 9f39f84eb5..ed2f9af9f0 100644 --- a/cookbook/90_models/neosantara/README.md +++ b/cookbook/90_models/neosantara/README.md @@ -23,14 +23,6 @@ uv pip install -U ddgs agno ### 4. Run basic Agent -- Streaming on - -```shell -python cookbook/90_models/neosantara/basic_stream.py -``` - -- Streaming off - ```shell python cookbook/90_models/neosantara/basic.py ``` @@ -47,11 +39,3 @@ python cookbook/90_models/neosantara/tool_use.py ```shell python cookbook/90_models/neosantara/structured_output.py ``` - -### 7. Run Async Examples - -```shell -python cookbook/90_models/neosantara/async_basic.py -python cookbook/90_models/neosantara/async_basic_stream.py -python cookbook/90_models/neosantara/async_tool_use.py -``` diff --git a/cookbook/90_models/nexus/README.md b/cookbook/90_models/nexus/README.md index cbd117f4a3..d21cdb1808 100644 --- a/cookbook/90_models/nexus/README.md +++ b/cookbook/90_models/nexus/README.md @@ -28,28 +28,12 @@ uv pip install -U openai agno ### 5. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/nexus/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/nexus/basic.py +python cookbook/90_models/nexus/basic.py ``` ### 6. Run Agent with Tools -- Streaming on - ```shell -python cookbook/92_models/nexus/tool_use.py -``` - -- Streaming off - -```shell -python cookbook/92_models/nexus/tool_use.py +python cookbook/90_models/nexus/tool_use.py ``` diff --git a/cookbook/90_models/nvidia/README.md b/cookbook/90_models/nvidia/README.md index 6bd014c4d1..5dd1aeeb1c 100644 --- a/cookbook/90_models/nvidia/README.md +++ b/cookbook/90_models/nvidia/README.md @@ -23,28 +23,12 @@ uv pip install -U openai agno ### 4. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/nvidia/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/nvidia/basic.py +python cookbook/90_models/nvidia/basic.py ``` ### 5. Run Agent with Tools -- Streaming on - ```shell -python cookbook/92_models/nvidia/tool_use_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/nvidia/tool_use.py +python cookbook/90_models/nvidia/tool_use.py ``` diff --git a/cookbook/90_models/ollama/README.md b/cookbook/90_models/ollama/README.md index 5303f334e8..630bcbdd2d 100644 --- a/cookbook/90_models/ollama/README.md +++ b/cookbook/90_models/ollama/README.md @@ -40,14 +40,7 @@ The `chat/` folder contains examples using the native Ollama Chat API. ### Basic Usage ```shell -# Streaming -python cookbook/90_models/ollama/chat/basic_stream.py - -# Non-streaming python cookbook/90_models/ollama/chat/basic.py - -# Async -python cookbook/90_models/ollama/chat/async_basic.py ``` ### Tools and Structured Output @@ -101,12 +94,6 @@ The `responses/` folder contains examples using the OpenAI-compatible Responses ```shell # Basic python cookbook/90_models/ollama/responses/basic.py - -# Streaming -python cookbook/90_models/ollama/responses/basic_stream.py - -# Async -python cookbook/90_models/ollama/responses/async_basic.py ``` ### Tools and Structured Output diff --git a/cookbook/90_models/ollama/chat/memory.py b/cookbook/90_models/ollama/chat/memory.py index a2a5607f1b..7c1bfdb465 100644 --- a/cookbook/90_models/ollama/chat/memory.py +++ b/cookbook/90_models/ollama/chat/memory.py @@ -3,7 +3,7 @@ This recipe shows how to use personalized memories and summaries in an agent. Steps: 1. Run: `./cookbook/scripts/run_pgvector.sh` to start a postgres container with pgvector 2. Run: `uv pip install ollama sqlalchemy 'psycopg[binary]' pgvector` to install the dependencies -3. Run: `python cookbook/92_models/ollama/memory.py` to run the agent +3. Run: `python cookbook/90_models/ollama/chat/memory.py` to run the agent """ from agno.agent import Agent diff --git a/cookbook/90_models/openai/chat/README.md b/cookbook/90_models/openai/chat/README.md index 38a5b05a47..a96d554ade 100644 --- a/cookbook/90_models/openai/chat/README.md +++ b/cookbook/90_models/openai/chat/README.md @@ -23,16 +23,8 @@ uv pip install -U openai ddgs duckdb yfinance agno ### 4. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/openai/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/openai/basic.py +python cookbook/90_models/openai/chat/basic.py ``` ### 5. Run Agent with Tools @@ -40,64 +32,64 @@ python cookbook/92_models/openai/basic.py - DuckDuckGo Search ```shell -python cookbook/92_models/openai/tool_use.py +python cookbook/90_models/openai/chat/tool_use.py ``` ### 6. Run Agent that returns structured output ```shell -python cookbook/92_models/openai/structured_output.py +python cookbook/90_models/openai/chat/structured_output.py ``` ### 7. Run Agent uses memory ```shell -python cookbook/92_models/openai/memory.py +python cookbook/90_models/openai/chat/memory.py ``` ### 8. Run Agent that uses storage ```shell -python cookbook/92_models/openai/storage.py +python cookbook/90_models/openai/chat/db.py ``` ### 9. Run Agent that uses knowledge ```shell -python cookbook/92_models/openai/knowledge.py +python cookbook/90_models/openai/chat/knowledge.py ``` ### 10. Run Agent that generates an image using Dall-E ```shell -python cookbook/92_models/openai/generate_images.py +python cookbook/90_models/openai/chat/generate_images.py ``` ### 11. Run Agent that analyzes an image ```shell -python cookbook/92_models/openai/image_agent.py +python cookbook/90_models/openai/chat/image_agent.py ``` or ```shell -python cookbook/92_models/openai/image_agent_with_memory.py +python cookbook/90_models/openai/chat/image_agent_with_memory.py ``` -### 11. Run Agent that analyzes audio +### 12. Run Agent that analyzes audio ```shell -python cookbook/92_models/openai/audio_input_agent.py +python cookbook/90_models/openai/chat/audio_input_agent.py ``` -### 12. Run Agent that generates audio +### 13. Run Agent that generates audio ```shell -python cookbook/92_models/openai/audio_output_agent.py +python cookbook/90_models/openai/chat/audio_output_agent.py ``` -### 13. Run Agent that returns web search citations +### 14. Run Agent that returns web search citations ```shell python cookbook/90_models/openai/chat/citations.py diff --git a/cookbook/90_models/openai/chat/access_memories_in_memory_completed_event.py b/cookbook/90_models/openai/chat/access_memories_in_memory_completed_event.py index 2e8862ccc8..4b9364aaf3 100644 --- a/cookbook/90_models/openai/chat/access_memories_in_memory_completed_event.py +++ b/cookbook/90_models/openai/chat/access_memories_in_memory_completed_event.py @@ -3,7 +3,7 @@ Test script to verify memory events are working correctly. Steps: 1. Run: `./cookbook/scripts/run_pgvector.sh` to start a postgres container with pgvector 2. Run: `pip install openai sqlalchemy 'psycopg[binary]' pgvector` to install the dependencies -3. Run: `python cookbook/11_models/openai/chat/access_memories_in_memory_completed_event.py` +3. Run: `python cookbook/90_models/openai/chat/access_memories_in_memory_completed_event.py` """ from agno.agent import Agent diff --git a/cookbook/90_models/openrouter/README.md b/cookbook/90_models/openrouter/README.md index 2d7a5bcdfe..3552f0dcfa 100644 --- a/cookbook/90_models/openrouter/README.md +++ b/cookbook/90_models/openrouter/README.md @@ -32,14 +32,7 @@ The `chat/` folder contains examples using the OpenRouter Chat API. ### Basic Usage ```shell -# Streaming -python cookbook/90_models/openrouter/chat/basic_stream.py - -# Non-streaming python cookbook/90_models/openrouter/chat/basic.py - -# Async -python cookbook/90_models/openrouter/chat/async_basic.py ``` ### Tools and Structured Output @@ -48,9 +41,6 @@ python cookbook/90_models/openrouter/chat/async_basic.py # Tool use python cookbook/90_models/openrouter/chat/tool_use.py -# Async tool use -python cookbook/90_models/openrouter/chat/async_tool_use.py - # Structured output python cookbook/90_models/openrouter/chat/structured_output.py ``` @@ -75,9 +65,6 @@ python cookbook/90_models/openrouter/responses/basic.py # Streaming python cookbook/90_models/openrouter/responses/stream.py - -# Async -python cookbook/90_models/openrouter/responses/async_basic.py ``` ### Tools and Structured Output diff --git a/cookbook/90_models/perplexity/README.md b/cookbook/90_models/perplexity/README.md index 6e7321f351..36d2dd64d6 100644 --- a/cookbook/90_models/perplexity/README.md +++ b/cookbook/90_models/perplexity/README.md @@ -23,29 +23,21 @@ uv pip install -U ddgs duckdb agno ### 4. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/cohere/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/cohere/basic.py +python cookbook/90_models/perplexity/basic.py ``` ### 5. Run Agent with Tools -- DuckDuckGo Search +- Web Search ```shell -python cookbook/92_models/cohere/tool_use.py +python cookbook/90_models/perplexity/web_search.py ``` ### 6. Run Agent with Knowledge ```shell -python cookbook/92_models/perplexity/knowledge.py +python cookbook/90_models/perplexity/knowledge.py ``` diff --git a/cookbook/90_models/portkey/README.md b/cookbook/90_models/portkey/README.md index bf39ba285a..705abcf171 100644 --- a/cookbook/90_models/portkey/README.md +++ b/cookbook/90_models/portkey/README.md @@ -26,20 +26,12 @@ uv pip install -U agno portkey-ai ### 4. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/portkey/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/portkey/basic.py +python cookbook/90_models/portkey/basic.py ``` ### 5. Run Agent with Tools ```shell -python cookbook/92_models/portkey/tool_use.py -``` \ No newline at end of file +python cookbook/90_models/portkey/tool_use.py +``` diff --git a/cookbook/90_models/requesty/README.md b/cookbook/90_models/requesty/README.md index 2e813428d0..28b1463190 100644 --- a/cookbook/90_models/requesty/README.md +++ b/cookbook/90_models/requesty/README.md @@ -25,16 +25,8 @@ uv pip install -U openai ddgs duckdb yfinance agno ### 4. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/requesty/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/requesty/basic.py +python cookbook/90_models/requesty/basic.py ``` ### 5. Run Agent with Tools @@ -42,11 +34,11 @@ python cookbook/92_models/requesty/basic.py - DuckDuckGo Search ```shell -python cookbook/92_models/requesty/tool_use.py +python cookbook/90_models/requesty/tool_use.py ``` ### 6. Run Agent that returns structured output ```shell -python cookbook/92_models/requesty/structured_output.py -``` \ No newline at end of file +python cookbook/90_models/requesty/structured_output.py +``` diff --git a/cookbook/90_models/sambanova/README.md b/cookbook/90_models/sambanova/README.md index 316249367b..cca3f994f2 100644 --- a/cookbook/90_models/sambanova/README.md +++ b/cookbook/90_models/sambanova/README.md @@ -23,16 +23,8 @@ uv pip install -U openai agno ### 4. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/sambanova/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/sambanova/basic.py +python cookbook/90_models/sambanova/basic.py ``` ## Disclaimer: diff --git a/cookbook/90_models/siliconflow/README.md b/cookbook/90_models/siliconflow/README.md index 0dc42936f9..4c07dc2773 100644 --- a/cookbook/90_models/siliconflow/README.md +++ b/cookbook/90_models/siliconflow/README.md @@ -23,16 +23,8 @@ uv pip install -U openai duckduckgo-search duckdb agno ### 4. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/siliconflow/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/siliconflow/basic.py +python cookbook/90_models/siliconflow/basic.py ``` ### 5. Run Agent with Tools @@ -40,11 +32,11 @@ python cookbook/92_models/siliconflow/basic.py - DuckDuckGo Search ```shell -python cookbook/92_models/siliconflow/tool_use.py +python cookbook/90_models/siliconflow/tool_use.py ``` ### 6. Run Agent that returns structured output ```shell -python cookbook/92_models/siliconflow/structured_output.py +python cookbook/90_models/siliconflow/structured_output.py ``` diff --git a/cookbook/90_models/together/README.md b/cookbook/90_models/together/README.md index 661815770c..7e9365d5a1 100644 --- a/cookbook/90_models/together/README.md +++ b/cookbook/90_models/together/README.md @@ -23,45 +23,37 @@ uv pip install -U together openai ddgs duckdb yfinance agno ### 4. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/together/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/together/basic.py +python cookbook/90_models/together/basic.py ``` ### 5. Run Agent with Tools - DuckDuckGo Search ```shell -python cookbook/92_models/together/tool_use.py +python cookbook/90_models/together/tool_use.py ``` ### 6. Run Agent that returns structured output ```shell -python cookbook/92_models/together/structured_output.py +python cookbook/90_models/together/structured_output.py ``` ### 7. Run Agent with Image URL Input ```shell -python cookbook/92_models/together/image_agent.py +python cookbook/90_models/together/image_agent.py ``` ### 8. Run Agent with Image Input ```shell -python cookbook/92_models/together/image_agent_bytes.py +python cookbook/90_models/together/image_agent_bytes.py ``` ### 9. Run Agent with Image Input and Memory ```shell -python cookbook/92_models/together/image_agent_with_memory.py +python cookbook/90_models/together/image_agent_with_memory.py ``` diff --git a/cookbook/90_models/vercel/README.md b/cookbook/90_models/vercel/README.md index 1b43f55c1a..f57bf02e16 100644 --- a/cookbook/90_models/vercel/README.md +++ b/cookbook/90_models/vercel/README.md @@ -28,14 +28,6 @@ uv pip install -U agno ### 4. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/vercel/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/vercel/basic.py +python cookbook/90_models/vercel/basic.py ``` diff --git a/cookbook/90_models/vertexai/claude/README.md b/cookbook/90_models/vertexai/claude/README.md index 908bb034f4..b7e3794607 100644 --- a/cookbook/90_models/vertexai/claude/README.md +++ b/cookbook/90_models/vertexai/claude/README.md @@ -34,16 +34,8 @@ uv pip install -U anthropic ddgs duckdb agno ### 5. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/vertexai/claude/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/vertexai/claude/basic.py +python cookbook/90_models/vertexai/claude/basic.py ``` ### 6. Run Agent with Tools @@ -51,19 +43,19 @@ python cookbook/92_models/vertexai/claude/basic.py - DuckDuckGo Search ```shell -python cookbook/92_models/vertexai/claude/tool_use.py +python cookbook/90_models/vertexai/claude/tool_use.py ``` ### 7. Run Agent that returns structured output ```shell -python cookbook/92_models/vertexai/claude/structured_output.py +python cookbook/90_models/vertexai/claude/structured_output.py ``` ### 8. Run Agent that uses storage ```shell -python cookbook/92_models/vertexai/claude/db.py +python cookbook/90_models/vertexai/claude/db.py ``` ### 9. Run Agent that uses knowledge @@ -75,33 +67,25 @@ export OPENAI_API_KEY=*** ``` ```shell -python cookbook/92_models/vertexai/claude/knowledge.py +python cookbook/90_models/vertexai/claude/knowledge.py ``` ### 10. Run Agent that uses memory ```shell -python cookbook/92_models/vertexai/claude/memory.py +python cookbook/90_models/vertexai/claude/memory.py ``` ### 11. Run Agent that analyzes an image ```shell -python cookbook/92_models/vertexai/claude/image_input_url.py +python cookbook/90_models/vertexai/claude/image_input_url.py ``` ### 12. Run Agent with Thinking enabled -- Streaming on - ```shell -python cookbook/92_models/vertexai/claude/thinking.py -``` - -- Streaming off - -```shell -python cookbook/92_models/vertexai/claude/thinking_stream.py +python cookbook/90_models/vertexai/claude/thinking.py ``` ### 13. Adaptive Thinking with `output_config` diff --git a/cookbook/90_models/vertexai/claude/memory.py b/cookbook/90_models/vertexai/claude/memory.py index cbb1e87c6b..a8f3e19a5e 100644 --- a/cookbook/90_models/vertexai/claude/memory.py +++ b/cookbook/90_models/vertexai/claude/memory.py @@ -3,7 +3,7 @@ This recipe shows how to use personalized memories and summaries in an agent. Steps: 1. Run: `./cookbook/scripts/run_pgvector.sh` to start a postgres container with pgvector 2. Run: `uv pip install anthropic sqlalchemy 'psycopg[binary]' pgvector` to install the dependencies -3. Run: `python cookbook/92_models/anthropic/memory.py` to run the agent +3. Run: `python cookbook/90_models/vertexai/claude/memory.py` to run the agent """ from agno.agent import Agent diff --git a/cookbook/90_models/vllm/README.md b/cookbook/90_models/vllm/README.md index be0a354ae4..83f70ac8fd 100644 --- a/cookbook/90_models/vllm/README.md +++ b/cookbook/90_models/vllm/README.md @@ -67,8 +67,8 @@ vLLM embedders can load and run embedding models locally without requiring a ser ``` 5. **Examples**: - - Basic usage: `cookbook/07_knowledge/embedders/vllm_embedder.py` - - With batching: `cookbook/07_knowledge/embedders/vllm_embedder_batching.py` + - Basic usage: `cookbook/07_knowledge/09_archive/embedders/vllm_embedder_local.py` + - With batching: `cookbook/07_knowledge/09_archive/embedders/vllm_embedder_remote.py` ### Local vs Remote Mode @@ -99,13 +99,11 @@ vLLM embedders can load and run embedding models locally without requiring a ser ## Examples - - ```shell -python cookbook/92_models/vllm/basic.py +python cookbook/90_models/vllm/basic.py ``` ### Embeddings -- [vllm_embedder.py](../knowledge/embedders/vllm_embedder.py) - Local and remote embeddings -- [vllm_embedder_batching.py](../knowledge/embedders/vllm_embedder_batching.py) - Batch processing +- [vllm_embedder_local.py](../../07_knowledge/09_archive/embedders/vllm_embedder_local.py) - Local embeddings +- [vllm_embedder_remote.py](../../07_knowledge/09_archive/embedders/vllm_embedder_remote.py) - Remote embeddings diff --git a/cookbook/90_models/xai/README.md b/cookbook/90_models/xai/README.md index fc97aaeff9..8eacf8a0b6 100644 --- a/cookbook/90_models/xai/README.md +++ b/cookbook/90_models/xai/README.md @@ -23,16 +23,8 @@ uv pip install -U openai ddgs duckdb yfinance agno ### 4. Run basic Agent -- Streaming on - ```shell -python cookbook/92_models/xai/basic_stream.py -``` - -- Streaming off - -```shell -python cookbook/92_models/xai/basic.py +python cookbook/90_models/xai/basic.py ``` ### 5. Run with Tools @@ -40,25 +32,25 @@ python cookbook/92_models/xai/basic.py - DuckDuckGo Search ```shell -python cookbook/92_models/xai/tool_use.py +python cookbook/90_models/xai/tool_use.py ``` ### 6. Run Agent with Image URL Input ```shell -python cookbook/92_models/xai/image_agent.py +python cookbook/90_models/xai/image_agent.py ``` ### 7. Run Agent with Image Input ```shell -python cookbook/92_models/xai/image_agent_bytes.py +python cookbook/90_models/xai/image_agent_bytes.py ``` ### 8. Run Agent with Image Input and Memory ```shell -python cookbook/92_models/xai/image_agent_with_memory.py +python cookbook/90_models/xai/image_agent_with_memory.py ``` ### 9. Run Agent with SuperGrok sign-in (no API key) diff --git a/cookbook/91_tools/e2b_tools.py b/cookbook/91_tools/e2b_tools.py index 199e457874..363c0006a5 100644 --- a/cookbook/91_tools/e2b_tools.py +++ b/cookbook/91_tools/e2b_tools.py @@ -120,10 +120,6 @@ if __name__ == "__main__": "Write Python code to generate the first 10 Fibonacci numbers and calculate their sum and average" ) - # agent.print_response( - # " upload file cookbook/90_tools/sample_data.csv and use it to create a matplotlib visualization of total sales by region and provide chart image or its downloaded path or any link " - # ) - # agent.print_response(" use dataset sample_data.csv and create a matplotlib visualization of total sales by region and provide chart image") # agent.print_response(" run a server and Write a simple fast api web server that displays 'Hello from E2B Sandbox!' and run it , use run_command to get the data from the server and provide the url of api swagger docs and host link") # agent.print_response( # " run server and Create and run a Python script that fetch top 5 latest news from hackernews using hackernews api" diff --git a/cookbook/91_tools/google/workspace/service_account.py b/cookbook/91_tools/google/workspace/service_account.py index a8e9f25c2c..7165dfcc1a 100644 --- a/cookbook/91_tools/google/workspace/service_account.py +++ b/cookbook/91_tools/google/workspace/service_account.py @@ -21,7 +21,7 @@ Setup: 4. Set GOOGLE_SERVICE_ACCOUNT_FILE and GOOGLE_DELEGATED_USER env vars Run: - .venvs/demo/bin/python cookbook/91_tools/google/google_service_account.py + .venvs/demo/bin/python cookbook/91_tools/google/workspace/service_account.py """ from os import getenv diff --git a/cookbook/91_tools/mcp/mcp_toolbox_demo/README.md b/cookbook/91_tools/mcp/mcp_toolbox_demo/README.md index 5dd0b09405..7cb562cf72 100644 --- a/cookbook/91_tools/mcp/mcp_toolbox_demo/README.md +++ b/cookbook/91_tools/mcp/mcp_toolbox_demo/README.md @@ -172,4 +172,4 @@ The agent is configured with two toolsets: To stop and remove all services: ```bash docker-compose down -v -``` +``` \ No newline at end of file diff --git a/cookbook/91_tools/mcp/sse_transport/README.md b/cookbook/91_tools/mcp/sse_transport/README.md index ddb4439733..73b6b2f9e6 100644 --- a/cookbook/91_tools/mcp/sse_transport/README.md +++ b/cookbook/91_tools/mcp/sse_transport/README.md @@ -12,4 +12,4 @@ python cookbook/91_tools/mcp/sse_transport/server.py python cookbook/91_tools/mcp/sse_transport/client.py ``` -Optionally set `refresh_connection` to `True` on the `MCPTools` configuration to refresh the MCP tools on each run. +Optionally set `refresh_connection` to `True` on the `MCPTools` configuration to refresh the MCP tools on each run. \ No newline at end of file diff --git a/cookbook/91_tools/mcp/streamable_http_transport/README.md b/cookbook/91_tools/mcp/streamable_http_transport/README.md index e9f0ab6be3..91a7e3c1f8 100644 --- a/cookbook/91_tools/mcp/streamable_http_transport/README.md +++ b/cookbook/91_tools/mcp/streamable_http_transport/README.md @@ -12,4 +12,4 @@ python cookbook/91_tools/mcp/streamable_http_transport/server.py python cookbook/91_tools/mcp/streamable_http_transport/client.py ``` -Optionally set `refresh_connection` to `True` on the `MCPTools` configuration to refresh the MCP tools on each run. +Optionally set `refresh_connection` to `True` on the `MCPTools` configuration to refresh the MCP tools on each run. \ No newline at end of file diff --git a/cookbook/91_tools/scheduler_tools.py b/cookbook/91_tools/scheduler_tools.py index dce0b285a4..ab14cc2be4 100644 --- a/cookbook/91_tools/scheduler_tools.py +++ b/cookbook/91_tools/scheduler_tools.py @@ -10,7 +10,7 @@ into cron-based schedules that run via the AgentOS scheduler infrastructure. Prerequisites: pip install agno[scheduler] # A running AgentOS server with scheduler enabled - # See cookbook/05_agent_os/scheduler/scheduler_tools_agent.py for full setup + # See cookbook/05_agent_os/12_scheduler/04_scheduler_tools_agent.py for full setup """ from agno.agent import Agent diff --git a/cookbook/91_tools/workspace_tools/README.md b/cookbook/91_tools/workspace_tools/README.md index 07eea566e8..32e5a420c7 100644 --- a/cookbook/91_tools/workspace_tools/README.md +++ b/cookbook/91_tools/workspace_tools/README.md @@ -100,5 +100,5 @@ tools = [Workspace(".", allow_paths=[".env.example"])] ```bash .venvs/demo/bin/python cookbook/91_tools/workspace_tools/basic_usage.py -.venvs/demo/bin/python cookbook/91_tools/workspace_tools/with_confirmation.py +.venvs/demo/bin/python cookbook/91_tools/workspace_tools/workspace_tools_with_confirmation.py ``` diff --git a/cookbook/environments/_00_quickstart/TEST_LOG.md b/cookbook/environments/_00_quickstart/TEST_LOG.md index 83fa9af2b7..f6dd9905ab 100644 --- a/cookbook/environments/_00_quickstart/TEST_LOG.md +++ b/cookbook/environments/_00_quickstart/TEST_LOG.md @@ -113,6 +113,6 @@ scorer -> grid -> learning_zone() -> to_sft_jsonl wiring was exercised end-to-en with a stub model (6 tasks, k=2, 12 scored — sound). The live model run was NOT performed here because no OPENAI_API_KEY was available. Run it with a key to produce the authentic grid (with duration + cost) for the screenshot: -`.venvs/demo/bin/python cookbook/environments/_07_support_triage.py` +`.venvs/demo/bin/python cookbook/environments/_00_quickstart/_07_support_triage.py` --- diff --git a/cookbook/frameworks/langgraph/langgraph_session_agentos.py b/cookbook/frameworks/langgraph/langgraph_session_agentos.py index ee0641c542..6dc7296ddd 100644 --- a/cookbook/frameworks/langgraph/langgraph_session_agentos.py +++ b/cookbook/frameworks/langgraph/langgraph_session_agentos.py @@ -8,7 +8,7 @@ Requirements: pip install langgraph langchain-openai langchain-community Usage: - python cookbook/frameworks/langgraph/langgraph_tools_agentos.py + python cookbook/frameworks/langgraph/langgraph_session_agentos.py Then call the API: # Streaming @@ -78,4 +78,4 @@ agent_os = AgentOS(agents=[agent]) app = agent_os.get_app() if __name__ == "__main__": - agent_os.serve(app="langgraph_tools_agentos:app", reload=True) + agent_os.serve(app="langgraph_session_agentos:app", reload=True) diff --git a/libs/agno/tests/unit/os/test_unified_continue_gate.py b/libs/agno/tests/unit/os/test_unified_continue_gate.py index 9a61d048b3..1454496f6c 100644 --- a/libs/agno/tests/unit/os/test_unified_continue_gate.py +++ b/libs/agno/tests/unit/os/test_unified_continue_gate.py @@ -5,7 +5,7 @@ follow-up, RUNNING/ERROR resume, unresolved HITL raises its own precise error - so the router carries no paused-only gate. A stale router gate here once 409'd persisted COMPLETED runs with "run is already continued" (false: nothing was continued) before the request reached the dispatch -that supports it, breaking cookbook/04_run_lifecycle/checkpoints.py. +that supports it, breaking cookbook/05_agent_os/04_run_lifecycle/checkpoints.py. These tests pin the gate's absence at the endpoint level. The seeded agent has no model, so the continuation fails deeper in the machinery - the