repo stringlengths 7 90 | file_url stringlengths 81 315 | file_path stringlengths 4 228 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:38:15 2026-01-05 02:33:18 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/09_memory/04_custom_memory_manager.py | cookbook/09_memory/04_custom_memory_manager.py | """
This example shows how you can configure the Memory Manager and Summarizer models individually.
In this example, we use OpenRouter and LLama 3.3-70b-instruct for the memory manager and Claude 3.5 Sonnet for the summarizer. And we use Gemini for the Agent.
We also set custom system prompts for the memory manager a... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/09_memory/01_agent_with_memory.py | cookbook/09_memory/01_agent_with_memory.py | """
This example shows you how to use persistent memory with an Agent.
After each run, user memories are created/updated.
To enable this, set `enable_user_memories=True` in the Agent config.
"""
import asyncio
from uuid import uuid4
from agno.agent.agent import Agent
from agno.db.postgres import PostgresDb
from agn... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/09_memory/06_multi_user_multi_session_chat_concurrent.py | cookbook/09_memory/06_multi_user_multi_session_chat_concurrent.py | """
This example shows how to run a multi-user, multi-session chat concurrently.
In this example, we have 3 users and 4 sessions.
User 1 has 2 sessions.
User 2 has 1 session.
User 3 has 1 session.
"""
import asyncio
from agno.agent.agent import Agent
from agno.db.postgres import PostgresDb
from agno.models.openai i... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/09_memory/memory_manager/04_memory_search.py | cookbook/09_memory/memory_manager/04_memory_search.py | """
How to search for user memories using different retrieval methods
- last_n: Retrieves the last n memories
- first_n: Retrieves the first n memories
- semantic: Retrieves memories using semantic search
"""
from agno.db.postgres import PostgresDb
from agno.memory import MemoryManager, UserMemory
from agno.models.op... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/09_memory/memory_manager/01_standalone_memory.py | cookbook/09_memory/memory_manager/01_standalone_memory.py | """
How to add, get, delete, and replace user memories manually
"""
from agno.db.postgres import PostgresDb
from agno.memory import MemoryManager, UserMemory
from rich.pretty import pprint
db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai"
memory = MemoryManager(db=PostgresDb(db_url=db_url))
# Add a memory for... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/09_memory/memory_manager/03_custom_memory_instructions.py | cookbook/09_memory/memory_manager/03_custom_memory_instructions.py | """
Create user memories with an Agent by providing a either text or a list of messages.
"""
from agno.db.postgres import PostgresDb
from agno.memory import MemoryManager
from agno.models.anthropic.claude import Claude
from agno.models.message import Message
from agno.models.openai import OpenAIChat
from rich.pretty i... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/09_memory/memory_manager/05_db_tools_control.py | cookbook/09_memory/memory_manager/05_db_tools_control.py | """
Control Memory Database Tools - Add, Update, Delete, and Clear Operations
This cookbook demonstrates how to control which memory database operations
are available to the AI model using the four DB tools parameters:
- add_memories: Controls whether the AI can add new memories
- update_memories: Controls whether the... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/09_memory/memory_manager/02_memory_creation.py | cookbook/09_memory/memory_manager/02_memory_creation.py | """
Create user memories with an Agent by providing a either text or a list of messages.
"""
from agno.db.postgres import PostgresDb
from agno.memory import MemoryManager, UserMemory
from agno.models.message import Message
from agno.models.openai import OpenAIChat
from rich.pretty import pprint
db_url = "postgresql+p... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/09_memory/memory_manager/surrealdb/memory_creation.py | cookbook/09_memory/memory_manager/surrealdb/memory_creation.py | """
Create user memories with an Agent by providing a either text or a list of messages.
"""
from agno.db.surrealdb import SurrealDb
from agno.memory import MemoryManager, UserMemory
from agno.models.message import Message
from agno.models.openai import OpenAIChat
from rich.pretty import pprint
# Setup database and u... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/09_memory/memory_manager/surrealdb/standalone_memory_surreal.py | cookbook/09_memory/memory_manager/surrealdb/standalone_memory_surreal.py | """
How to add, get, delete, and replace user memories manually
"""
from agno.db.surrealdb import SurrealDb
from agno.memory import MemoryManager, UserMemory
from rich.pretty import pprint
SURREALDB_URL = "ws://localhost:8000"
SURREALDB_USER = "root"
SURREALDB_PASSWORD = "root"
SURREALDB_NAMESPACE = "agno"
SURREALDB_... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/09_memory/memory_manager/surrealdb/memory_search_surreal.py | cookbook/09_memory/memory_manager/surrealdb/memory_search_surreal.py | """
How to search for user memories using different retrieval methods
- last_n: Retrieves the last n memories
- first_n: Retrieves the first n memories
- semantic: Retrieves memories using semantic search
"""
from agno.db.surrealdb import SurrealDb
from agno.memory import MemoryManager, UserMemory
from agno.models.op... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/09_memory/memory_manager/surrealdb/custom_memory_instructions.py | cookbook/09_memory/memory_manager/surrealdb/custom_memory_instructions.py | """
Create user memories with an Agent by providing a either text or a list of messages.
"""
from agno.db.surrealdb import SurrealDb
from agno.memory import MemoryManager
from agno.models.anthropic.claude import Claude
from agno.models.message import Message
from agno.models.openai import OpenAIChat
from rich.pretty i... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/09_memory/memory_manager/surrealdb/db_tools_control.py | cookbook/09_memory/memory_manager/surrealdb/db_tools_control.py | """
Control Memory Database Tools - Add, Update, Delete, and Clear Operations
This cookbook demonstrates how to control which memory database operations
are available to the AI model using the four DB tools parameters:
- add_memories: Controls whether the AI can add new memories
- update_memories: Controls whether the... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/09_memory/optimize_memories/02_custom_memory_strategy.py | cookbook/09_memory/optimize_memories/02_custom_memory_strategy.py | """
Creating a custom memory optimization strategy.
This cookbook shows how to create your own memory optimization strategy by
subclassing MemoryOptimizationStrategy. This is useful when you need custom
logic that the built-in "summarize" and "merge" strategies don't provide.
Run: python cookbook/memory/10_custom_mem... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/09_memory/optimize_memories/01_memory_summarize_strategy.py | cookbook/09_memory/optimize_memories/01_memory_summarize_strategy.py | """
Memory optimization using the "summarize" strategy.
The "summarize" strategy combines all memories into a single comprehensive summary,
achieving maximum compression. This is useful when you need aggressive token
reduction and can accept losing the individual memory structure.
Run: python cookbook/memory/09_memor... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/__init__.py | cookbook/08_knowledge/__init__.py | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false | |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/knowledge_tools.py | cookbook/08_knowledge/knowledge_tools.py | """
Here is a tool with reasoning capabilities to allow agents to search and analyze information from a knowledge base.
1. Run: `pip install openai agno lancedb tantivy sqlalchemy` to install the dependencies
2. Export your OPENAI_API_KEY
3. Run: `python cookbook/knowledge/knowledge_tools.py` to run the agent
"""
fro... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/01_from_path.py | cookbook/08_knowledge/basic_operations/01_from_path.py | """This cookbook shows how to add content from a local file to the knowledge base.
1. Run: `python cookbook/agent_concepts/knowledge/01_from_path.py` to run the cookbook
"""
import asyncio
from agno.agent import Agent # noqa
from agno.db.postgres.postgres import PostgresDb
from agno.knowledge.knowledge import Knowle... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/__init__.py | cookbook/08_knowledge/basic_operations/__init__.py | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false | |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/async/10_remove_vectors.py | cookbook/08_knowledge/basic_operations/async/10_remove_vectors.py | """This cookbook shows how to remove vectors from Knowledge.
You can remove vectors by metadata or by name.
1. Run: `python cookbook/agent_concepts/knowledge/10_remove_vectors.py` to run the cookbook
"""
import asyncio
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
# Cre... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/async/15_batching.py | cookbook/08_knowledge/basic_operations/async/15_batching.py | """This cookbook shows how to use batch embeddings with Cohere.
1. Run: `python cookbook/agent_concepts/knowledge/01_from_path.py` to run the cookbook
"""
import asyncio
from agno.agent import Agent # noqa
from agno.db.postgres.postgres import PostgresDb
from agno.knowledge.embedder.openai import OpenAIEmbedder
from... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/async/05_from_youtube.py | cookbook/08_knowledge/basic_operations/async/05_from_youtube.py | """This cookbook shows how to add content from a Youtube video to Knowledge.
1. Run: `python cookbook/agent_concepts/knowledge/05_from_youtube.py` to run the cookbook
"""
import asyncio
from agno.agent import Agent
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
# Create K... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/async/04_from_multiple.py | cookbook/08_knowledge/basic_operations/async/04_from_multiple.py | """This cookbook shows how to add content from multiple paths and URLs to the knowledge base.
1. Run: `python cookbook/agent_concepts/knowledge/04_from_multiple.py` to run the cookbook
"""
import asyncio
from agno.agent import Agent
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgV... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/async/08_include_exclude_files.py | cookbook/08_knowledge/basic_operations/async/08_include_exclude_files.py | """This cookbook shows how to use include and exclude filters when adding content to Knowledge.
1. Run: `python cookbook/agent_concepts/knowledge/08_include_exclude_files.py` to run the cookbook
"""
import asyncio
from agno.agent import Agent
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/async/09_remove_content.py | cookbook/08_knowledge/basic_operations/async/09_remove_content.py | """This cookbook shows how to remove content from Knowledge when using a ContentDB.
You can remove content by id or by name.
1. Run: `python cookbook/agent_concepts/knowledge/09_remove_content.py` to run the cookbook
"""
import asyncio
from agno.db.postgres.postgres import PostgresDb
from agno.knowledge.knowledge i... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/async/11_skip_if_exists.py | cookbook/08_knowledge/basic_operations/async/11_skip_if_exists.py | """This cookbook shows how to skip content if it already exists in the knowledge base.
Existing content is skipped by default.
1. Run: `python cookbook/agent_concepts/knowledge/11_skip_if_exists.py` to run the cookbook
"""
import asyncio
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector impo... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/async/12_skip_if_exists_contentsdb.py | cookbook/08_knowledge/basic_operations/async/12_skip_if_exists_contentsdb.py | """This cookbook shows how to skip content if it already exists in the knowledge base.
It also demonstrates how contents can be added to the contents database post processing when
it is already in the vectorDB.
Existing content is skipped by default.
1. Run: `python cookbook/agent_concepts/knowledge/12_skip_if_exists_... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/async/07_from_gcs.py | cookbook/08_knowledge/basic_operations/async/07_from_gcs.py | """This cookbook shows how to add content from a GCS bucket to the knowledge base.
1. Run: `python cookbook/agent_concepts/knowledge/07_from_gcs.py` to run the cookbook
"""
import asyncio
from agno.agent import Agent
from agno.db.postgres.postgres import PostgresDb
from agno.knowledge.knowledge import Knowledge
from ... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/async/01_from_path.py | cookbook/08_knowledge/basic_operations/async/01_from_path.py | """This cookbook shows how to add content from a local file to the knowledge base.
1. Run: `python cookbook/agent_concepts/knowledge/01_from_path.py` to run the cookbook
"""
import asyncio
from agno.agent import Agent # noqa
from agno.db.postgres.postgres import PostgresDb
from agno.knowledge.knowledge import Knowle... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/async/02_from_url.py | cookbook/08_knowledge/basic_operations/async/02_from_url.py | """This cookbook shows how to add content from a URL to the knowledge base.
1. Run: `python cookbook/agent_concepts/knowledge/02_from_url.py` to run the cookbook
"""
import asyncio
from agno.agent import Agent
from agno.db.postgres.postgres import PostgresDb
from agno.knowledge.knowledge import Knowledge
from agno.ve... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/async/__init__.py | cookbook/08_knowledge/basic_operations/async/__init__.py | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false | |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/async/13_specify_reader.py | cookbook/08_knowledge/basic_operations/async/13_specify_reader.py | """This cookbook shows how to specify a reader for reading content.
Readers are assigned by default to the content based on the file extension.
You can specify a reader for a specific content by passing the reader to the add_content method
if you want to use a different reader for a specific content.
1. Run: `python c... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/async/14_text_content.py | cookbook/08_knowledge/basic_operations/async/14_text_content.py | """This cookbook shows how to add content from a local file to the knowledge base.
1. Run: `python cookbook/agent_concepts/knowledge/01_from_path.py` to run the cookbook
"""
import asyncio
from agno.db.postgres.postgres import PostgresDb
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector impor... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/async/03_from_topic.py | cookbook/08_knowledge/basic_operations/async/03_from_topic.py | """This cookbook shows how to add topics from Wikipedia and Arxiv to the knowledge base.
It is important to specify the reader for the content when using topics.
1. Run: `pip install agno wikipedia arxiv` to install the dependencies
2. Run: `python cookbook/agent_concepts/knowledge/03_from_topic.py` to run the cookbo... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/async/06_from_s3.py | cookbook/08_knowledge/basic_operations/async/06_from_s3.py | """This cookbook shows how to add content from a S3 bucket to the knowledge base.
1. Run: `python cookbook/agent_concepts/knowledge/06_from_s3.py` to run the cookbook
"""
import asyncio
from agno.agent import Agent
from agno.db.postgres.postgres import PostgresDb
from agno.knowledge.knowledge import Knowledge
from a... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/sync/10_remove_vectors.py | cookbook/08_knowledge/basic_operations/sync/10_remove_vectors.py | """This cookbook shows how to remove vectors from Knowledge.
You can remove vectors by metadata or by name.
1. Run: `python cookbook/agent_concepts/knowledge/10_remove_vectors.py` to run the cookbook
"""
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
# Create Knowledge In... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/sync/15_batching.py | cookbook/08_knowledge/basic_operations/sync/15_batching.py | """This cookbook shows how to use batch embeddings with Cohere.
1. Run: `python cookbook/agent_concepts/knowledge/01_from_path.py` to run the cookbook
"""
from agno.agent import Agent # noqa
from agno.db.postgres.postgres import PostgresDb
from agno.knowledge.embedder.openai import OpenAIEmbedder
from agno.knowledge.... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/sync/05_from_youtube.py | cookbook/08_knowledge/basic_operations/sync/05_from_youtube.py | """This cookbook shows how to add content from a Youtube video to Knowledge.
1. Run: `python cookbook/agent_concepts/knowledge/05_from_youtube.py` to run the cookbook
"""
from agno.agent import Agent
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
# Create Knowledge Instanc... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/sync/04_from_multiple.py | cookbook/08_knowledge/basic_operations/sync/04_from_multiple.py | """This cookbook shows how to add content from multiple paths and URLs to the knowledge base.
1. Run: `python cookbook/agent_concepts/knowledge/04_from_multiple.py` to run the cookbook
"""
from agno.agent import Agent
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
# Create ... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/sync/08_include_exclude_files.py | cookbook/08_knowledge/basic_operations/sync/08_include_exclude_files.py | """This cookbook shows how to use include and exclude filters when adding content to Knowledge.
1. Run: `python cookbook/agent_concepts/knowledge/08_include_exclude_files.py` to run the cookbook
"""
from agno.agent import Agent
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/sync/09_remove_content.py | cookbook/08_knowledge/basic_operations/sync/09_remove_content.py | """This cookbook shows how to remove content from Knowledge when using a ContentDB.
You can remove content by id or by name.
1. Run: `python cookbook/agent_concepts/knowledge/09_remove_content.py` to run the cookbook
"""
from agno.db.postgres.postgres import PostgresDb
from agno.knowledge.knowledge import Knowledge
... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/sync/11_skip_if_exists.py | cookbook/08_knowledge/basic_operations/sync/11_skip_if_exists.py | """This cookbook shows how to skip content if it already exists in the knowledge base.
Existing content is skipped by default.
1. Run: `python cookbook/agent_concepts/knowledge/11_skip_if_exists.py` to run the cookbook
"""
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
kno... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/sync/12_skip_if_exists_contentsdb.py | cookbook/08_knowledge/basic_operations/sync/12_skip_if_exists_contentsdb.py | """This cookbook shows how to skip content if it already exists in the knowledge base.
It also demonstrates how contents can be added to the contents database post processing when
it is already in the vectorDB.
Existing content is skipped by default.
1. Run: `python cookbook/agent_concepts/knowledge/12_skip_if_exists_... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/sync/07_from_gcs.py | cookbook/08_knowledge/basic_operations/sync/07_from_gcs.py | """This cookbook shows how to add content from a GCS bucket to the knowledge base.
1. Run: `python cookbook/agent_concepts/knowledge/07_from_gcs.py` to run the cookbook
"""
from agno.agent import Agent
from agno.db.postgres.postgres import PostgresDb
from agno.knowledge.knowledge import Knowledge
from agno.knowledge.r... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/sync/01_from_path.py | cookbook/08_knowledge/basic_operations/sync/01_from_path.py | """This cookbook shows how to add content from a local file to the knowledge base.
1. Run: `python cookbook/agent_concepts/knowledge/01_from_path.py` to run the cookbook
"""
from agno.agent import Agent # noqa
from agno.db.postgres.postgres import PostgresDb
from agno.knowledge.knowledge import Knowledge
from agno.ve... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/sync/02_from_url.py | cookbook/08_knowledge/basic_operations/sync/02_from_url.py | """This cookbook shows how to add content from a URL to the knowledge base.
1. Run: `python cookbook/agent_concepts/knowledge/02_from_url.py` to run the cookbook
"""
from agno.agent import Agent
from agno.db.postgres.postgres import PostgresDb
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector ... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/sync/__init__.py | cookbook/08_knowledge/basic_operations/sync/__init__.py | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false | |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/sync/13_specify_reader.py | cookbook/08_knowledge/basic_operations/sync/13_specify_reader.py | """This cookbook shows how to specify a reader for reading content.
Readers are assigned by default to the content based on the file extension.
You can specify a reader for a specific content by passing the reader to the add_content method
if you want to use a different reader for a specific content.
1. Run: `python c... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/sync/14_text_content.py | cookbook/08_knowledge/basic_operations/sync/14_text_content.py | """This cookbook shows how to add content from a local file to the knowledge base.
1. Run: `python cookbook/agent_concepts/knowledge/01_from_path.py` to run the cookbook
"""
from agno.db.postgres.postgres import PostgresDb
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
cont... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/sync/03_from_topic.py | cookbook/08_knowledge/basic_operations/sync/03_from_topic.py | """This cookbook shows how to add topics from Wikipedia and Arxiv to the knowledge base.
It is important to specify the reader for the content when using topics.
1. Run: `pip install agno wikipedia arxiv` to install the dependencies
2. Run: `python cookbook/agent_concepts/knowledge/03_from_topic.py` to run the cookbo... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/basic_operations/sync/06_from_s3.py | cookbook/08_knowledge/basic_operations/sync/06_from_s3.py | """This cookbook shows how to add content from a S3 bucket to the knowledge base.
1. Run: `python cookbook/agent_concepts/knowledge/06_from_s3.py` to run the cookbook
"""
from agno.agent import Agent
from agno.db.postgres.postgres import PostgresDb
from agno.knowledge.knowledge import Knowledge
from agno.knowledge.re... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/sentence_transformer_embedder.py | cookbook/08_knowledge/embedders/sentence_transformer_embedder.py | from agno.knowledge.embedder.sentence_transformer import SentenceTransformerEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
embeddings = SentenceTransformerEmbedder().get_embedding(
"The quick brown fox jumps over the lazy dog."
)
# Print the embeddings and thei... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/gemini_embedder_batching.py | cookbook/08_knowledge/embedders/gemini_embedder_batching.py | import asyncio
from agno.knowledge.embedder.google import GeminiEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
embeddings = GeminiEmbedder().get_embedding(
"The quick brown fox jumps over the lazy dog."
)
# Print the embeddings and their dimensions
print(f"Emb... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/nebius_embedder.py | cookbook/08_knowledge/embedders/nebius_embedder.py | from agno.knowledge.embedder.nebius import NebiusEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
embeddings = NebiusEmbedder().get_embedding(
"The quick brown fox jumps over the lazy dog."
)
# Print the embeddings and their dimensions
print(f"Embeddings: {embedd... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/vllm_embedder_remote.py | cookbook/08_knowledge/embedders/vllm_embedder_remote.py | import asyncio
from agno.db.json import JsonDb
from agno.knowledge.embedder.vllm import VLLMEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
def main():
# Step 1: Create a remote VLLMEmbedder
embedder = VLLMEmbedder(
id="sentence-transformers/all-Min... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/voyageai_embedder.py | cookbook/08_knowledge/embedders/voyageai_embedder.py | import asyncio
from agno.knowledge.embedder.voyageai import VoyageAIEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
embeddings = VoyageAIEmbedder().get_embedding(
"The quick brown fox jumps over the lazy dog."
)
# Print the embeddings and their dimensions
print... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/vllm_embedder_local.py | cookbook/08_knowledge/embedders/vllm_embedder_local.py | import asyncio
from agno.db.json import JsonDb
from agno.knowledge.embedder.vllm import VLLMEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
def main():
# Step 1: Create a local VLLMEmbedder
embedder = VLLMEmbedder(
id="sentence-transformers/all-Mini... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/huggingface_embedder.py | cookbook/08_knowledge/embedders/huggingface_embedder.py | import asyncio
from agno.knowledge.embedder.huggingface import HuggingfaceCustomEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
embeddings = HuggingfaceCustomEmbedder().get_embedding(
"The quick brown fox jumps over the lazy dog."
)
# Print the embeddings and t... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/mistral_embedder.py | cookbook/08_knowledge/embedders/mistral_embedder.py | import asyncio
from agno.knowledge.embedder.mistral import MistralEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
embeddings = MistralEmbedder().get_embedding(
"The quick brown fox jumps over the lazy dog."
)
# Print the embeddings and their dimensions
print(f"... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/fireworks_embedder_batching.py | cookbook/08_knowledge/embedders/fireworks_embedder_batching.py | import asyncio
from agno.knowledge.embedder.fireworks import FireworksEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
embeddings = FireworksEmbedder().get_embedding(
"The quick brown fox jumps over the lazy dog."
)
# Print the embeddings and their dimensions
pr... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/ollama_embedder.py | cookbook/08_knowledge/embedders/ollama_embedder.py | from agno.knowledge.embedder.ollama import OllamaEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
embeddings = OllamaEmbedder().get_embedding(
"The quick brown fox jumps over the lazy dog."
)
# Print the embeddings and their dimensions
print(f"Embeddings: {embedd... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/vllm_embedder_batching_remote.py | cookbook/08_knowledge/embedders/vllm_embedder_batching_remote.py | import asyncio
from agno.db.json import JsonDb
from agno.knowledge.embedder.vllm import VLLMEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
def main():
embedder = VLLMEmbedder(
id="sentence-transformers/all-MiniLM-L6-v2",
dimensions=384,
... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/vllm_embedder_batching_local.py | cookbook/08_knowledge/embedders/vllm_embedder_batching_local.py | import asyncio
from agno.db.json import JsonDb
from agno.knowledge.embedder.vllm import VLLMEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
def main():
embedder = VLLMEmbedder(
id="sentence-transformers/all-MiniLM-L6-v2",
dimensions=384,
... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/qdrant_fastembed.py | cookbook/08_knowledge/embedders/qdrant_fastembed.py | from agno.knowledge.embedder.fastembed import FastEmbedEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
embeddings = FastEmbedEmbedder().get_embedding(
"The quick brown fox jumps over the lazy dog."
)
# Print the embeddings and their dimensions
print(f"Embeddings... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/langdb_embedder.py | cookbook/08_knowledge/embedders/langdb_embedder.py | from agno.knowledge.embedder.langdb import LangDBEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
embeddings = LangDBEmbedder().get_embedding("Embed me")
# Print the embeddings and their dimensions
print(f"Embeddings: {embeddings[:5]}")
print(f"Dimensions: {len(embed... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/azure_embedder.py | cookbook/08_knowledge/embedders/azure_embedder.py | import asyncio
from agno.knowledge.embedder.azure_openai import AzureOpenAIEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
embeddings = AzureOpenAIEmbedder(id="text-embedding-3-small").get_embedding(
"The quick brown fox jumps over the lazy dog."
)
# Print the ... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/jina_embedder.py | cookbook/08_knowledge/embedders/jina_embedder.py | import asyncio
from agno.knowledge.embedder.jina import JinaEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
# Basic usage - automatically loads from JINA_API_KEY environment variable
embeddings = JinaEmbedder().get_embedding(
"The quick brown fox jumps over the ... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/openai_embedder.py | cookbook/08_knowledge/embedders/openai_embedder.py | import asyncio
from agno.knowledge.embedder.openai import OpenAIEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
embeddings = OpenAIEmbedder().get_embedding(
"The quick brown fox jumps over the lazy dog."
)
# Print the embeddings and their dimensions
print(f"Emb... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/aws_bedrock_embedder.py | cookbook/08_knowledge/embedders/aws_bedrock_embedder.py | from agno.knowledge.embedder.aws_bedrock import AwsBedrockEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.knowledge.reader.pdf_reader import PDFReader
from agno.vectordb.pgvector import PgVector
embeddings = AwsBedrockEmbedder().get_embedding(
"The quick brown fox jumps over the lazy dog."
)
# Pr... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/together_embedder.py | cookbook/08_knowledge/embedders/together_embedder.py | from agno.knowledge.embedder.together import TogetherEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
embeddings = TogetherEmbedder().get_embedding(
"The quick brown fox jumps over the lazy dog."
)
# Print the embeddings and their dimensions
print(f"Embeddings: {... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/cohere_embedder.py | cookbook/08_knowledge/embedders/cohere_embedder.py | import asyncio
from agno.knowledge.embedder.cohere import CohereEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
embeddings = CohereEmbedder().get_embedding(
"The quick brown fox jumps over the lazy dog."
)
# Print the embeddings and their dimensions
print(f"Embe... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/cohere_embedder_batching.py | cookbook/08_knowledge/embedders/cohere_embedder_batching.py | import asyncio
from agno.knowledge.embedder.cohere import CohereEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
embeddings = CohereEmbedder().get_embedding(
"The quick brown fox jumps over the lazy dog."
)
# Print the embeddings and their dimensions
print(f"Embe... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/__init__.py | cookbook/08_knowledge/embedders/__init__.py | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false | |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/openai_embedder_batching.py | cookbook/08_knowledge/embedders/openai_embedder_batching.py | import asyncio
from agno.knowledge.embedder.openai import OpenAIEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
embeddings = OpenAIEmbedder().get_embedding(
"The quick brown fox jumps over the lazy dog."
)
# Print the embeddings and their dimensions
print(f"Emb... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/fireworks_embedder.py | cookbook/08_knowledge/embedders/fireworks_embedder.py | import asyncio
from agno.knowledge.embedder.fireworks import FireworksEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
embeddings = FireworksEmbedder().get_embedding(
"The quick brown fox jumps over the lazy dog."
)
# Print the embeddings and their dimensions
pr... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/jina_embedder_batching.py | cookbook/08_knowledge/embedders/jina_embedder_batching.py | import asyncio
from agno.knowledge.embedder.jina import JinaEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
# Basic usage - automatically loads from JINA_API_KEY environment variable
embeddings = JinaEmbedder().get_embedding(
"The quick brown fox jumps over the ... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/gemini_embedder.py | cookbook/08_knowledge/embedders/gemini_embedder.py | import asyncio
from agno.knowledge.embedder.google import GeminiEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
embeddings = GeminiEmbedder().get_embedding(
"The quick brown fox jumps over the lazy dog."
)
# Print the embeddings and their dimensions
print(f"Emb... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/mistral_embedder_batching.py | cookbook/08_knowledge/embedders/mistral_embedder_batching.py | import asyncio
from agno.knowledge.embedder.mistral import MistralEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
embeddings = MistralEmbedder().get_embedding(
"The quick brown fox jumps over the lazy dog."
)
# Print the embeddings and their dimensions
print(f"... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/azure_embedder_batching.py | cookbook/08_knowledge/embedders/azure_embedder_batching.py | import asyncio
from agno.knowledge.embedder.azure_openai import AzureOpenAIEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
embeddings = AzureOpenAIEmbedder(id="text-embedding-3-small").get_embedding(
"The quick brown fox jumps over the lazy dog."
)
# Print the ... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/embedders/voyageai_embedder_batching.py | cookbook/08_knowledge/embedders/voyageai_embedder_batching.py | import asyncio
from agno.knowledge.embedder.voyageai import VoyageAIEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
embeddings = VoyageAIEmbedder().get_embedding(
"The quick brown fox jumps over the lazy dog."
)
# Print the embeddings and their dimensions
print... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/readers/web_reader.py | cookbook/08_knowledge/readers/web_reader.py | from agno.knowledge.reader.website_reader import WebsiteReader
reader = WebsiteReader(max_depth=3, max_links=10)
try:
print("Starting read...")
documents = reader.read("https://docs.agno.com/introduction")
if documents:
for doc in documents:
print(doc.name)
print(doc.conte... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/readers/web_search_reader.py | cookbook/08_knowledge/readers/web_search_reader.py | from agno.agent import Agent
from agno.db.postgres.postgres import PostgresDb
from agno.knowledge.knowledge import Knowledge
from agno.knowledge.reader.web_search_reader import WebSearchReader
from agno.models.openai import OpenAIChat
from agno.vectordb.pgvector import PgVector
db_url = "postgresql+psycopg://ai:ai@loc... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/readers/pdf_reader_password.py | cookbook/08_knowledge/readers/pdf_reader_password.py | from agno.agent import Agent
from agno.knowledge.content import ContentAuth
from agno.knowledge.knowledge import Knowledge
from agno.utils.media import download_file
from agno.vectordb.pgvector import PgVector
db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai"
download_file(
"https://agno-public.s3.us-east-1.... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/readers/csv_reader.py | cookbook/08_knowledge/readers/csv_reader.py | from pathlib import Path
from agno.knowledge.reader.csv_reader import CSVReader
reader = CSVReader()
csv_path = Path("tmp/test.csv")
try:
print("Starting read...")
documents = reader.read(csv_path)
if documents:
for doc in documents:
print(doc.name)
# print(doc.content)... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/readers/md_reader_async.py | cookbook/08_knowledge/readers/md_reader_async.py | import asyncio
from agno.agent import Agent
from agno.knowledge.knowledge import Knowledge
from agno.knowledge.reader.markdown_reader import MarkdownReader
from agno.vectordb.pgvector import PgVector
db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai"
# Create a knowledge base with the PDFs from the data/pdfs di... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/readers/csv_reader_custom_encodings.py | cookbook/08_knowledge/readers/csv_reader_custom_encodings.py | import asyncio
from agno.agent import Agent
from agno.knowledge.knowledge import Knowledge
from agno.knowledge.reader.csv_reader import CSVReader
from agno.models.openai import OpenAIChat
from agno.vectordb.pgvector import PgVector
db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai"
knowledge = Knowledge(
ve... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/readers/pptx_reader.py | cookbook/08_knowledge/readers/pptx_reader.py | from agno.agent import Agent
from agno.knowledge.knowledge import Knowledge
from agno.knowledge.reader.pptx_reader import PPTXReader
from agno.models.openai import OpenAIChat
from agno.vectordb.pgvector import PgVector
db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai"
# Create a knowledge base with PPTX documen... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/readers/csv_field_labeled_reader.py | cookbook/08_knowledge/readers/csv_field_labeled_reader.py | """
Field Labeled CSV Reader
Example Output:
Product Entry
Product Name: Product123
Price: 15.99
Category: Electronics
Status: In Stock
Rating: 4.5
Units Sold: 250
"""
from agno.agent import Agent
from agno.knowledge.knowledge import Knowledge
from agno.knowledge.reader.field_labeled_csv_reader import FieldLabeledCS... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/readers/json_reader.py | cookbook/08_knowledge/readers/json_reader.py | import json
from pathlib import Path
from agno.knowledge.reader.json_reader import JSONReader
reader = JSONReader()
json_path = Path("tmp/test.json")
test_data = {"key": "value"}
json_path.write_text(json.dumps(test_data))
try:
print("Starting read...")
documents = reader.read(json_path)
if documents:
... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/readers/doc_kb_async.py | cookbook/08_knowledge/readers/doc_kb_async.py | import asyncio
from agno.agent import Agent
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
fun_facts = """
- Earth is the third planet from the Sun and the only known astronomical object to support life.
- Approximately 71% of Earth's surface is covered by water, with the P... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/readers/tavily_reader.py | cookbook/08_knowledge/readers/tavily_reader.py | import os
from agno.knowledge.reader.tavily_reader import TavilyReader
api_key = os.getenv("TAVILY_API_KEY")
# Example 1: Basic extraction with markdown format
print("=" * 80)
print("Example 1: Basic extraction (markdown, basic depth)")
print("=" * 80)
reader_basic = TavilyReader(
api_key=api_key,
extract_f... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/readers/firecrawl_reader.py | cookbook/08_knowledge/readers/firecrawl_reader.py | import os
from agno.knowledge.reader.firecrawl_reader import FirecrawlReader
api_key = os.getenv("FIRECRAWL_API_KEY")
reader = FirecrawlReader(
api_key=api_key,
mode="scrape",
chunk=True,
# for crawling
# params={
# 'limit': 5,
# 'scrapeOptions': {'formats': ['markdown']}
# }
... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/readers/pptx_reader_async.py | cookbook/08_knowledge/readers/pptx_reader_async.py | import asyncio
from agno.agent import Agent
from agno.knowledge.knowledge import Knowledge
from agno.knowledge.reader.pptx_reader import PPTXReader
from agno.models.openai import OpenAIChat
from agno.vectordb.pgvector import PgVector
db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai"
knowledge = Knowledge(
... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/readers/tavily_reader_async.py | cookbook/08_knowledge/readers/tavily_reader_async.py | import asyncio
from agno.agent import Agent
from agno.db.postgres.postgres import PostgresDb
from agno.knowledge.knowledge import Knowledge
from agno.knowledge.reader.tavily_reader import TavilyReader
from agno.models.openai import OpenAIChat
from agno.vectordb.pgvector import PgVector
db_url = "postgresql+psycopg://... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/readers/__init__.py | cookbook/08_knowledge/readers/__init__.py | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false | |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/readers/pdf_reader_async.py | cookbook/08_knowledge/readers/pdf_reader_async.py | import asyncio
from agno.agent import Agent
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai"
# Create a knowledge base with the PDFs from the data/pdfs directory
knowledge = Knowledge(
vector_db=PgVector(
ta... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/readers/csv_reader_async.py | cookbook/08_knowledge/readers/csv_reader_async.py | import asyncio
from pathlib import Path
from agno.agent import Agent
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai"
knowledge = Knowledge(
vector_db=PgVector(
table_name="csv_documents",
db_url=db_... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/readers/markdown_reader_async.py | cookbook/08_knowledge/readers/markdown_reader_async.py | import asyncio
from pathlib import Path
from agno.agent import Agent
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector.pgvector import PgVector
db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai"
knowledge = Knowledge(
vector_db=PgVector(
table_name="markdown_documents",
... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/readers/csv_reader_url_async.py | cookbook/08_knowledge/readers/csv_reader_url_async.py | import asyncio
from agno.agent import Agent
from agno.db.postgres.postgres import PostgresDb
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai"
knowledge = Knowledge(
# Table name: ai.arxiv_documents
vector_db=PgV... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
agno-agi/agno | https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/08_knowledge/readers/pdf_reader_url_password.py | cookbook/08_knowledge/readers/pdf_reader_url_password.py | from agno.agent import Agent
from agno.db.postgres.postgres import PostgresDb
from agno.knowledge.content import ContentAuth
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.pgvector import PgVector
db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai"
# Create a knowledge base with simplified pass... | python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.