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/08_knowledge/readers/website_reader.py
cookbook/08_knowledge/readers/website_reader.py
from agno.agent import Agent from agno.knowledge.embedder.openai import OpenAIEmbedder from agno.knowledge.knowledge import Knowledge from agno.knowledge.reader.website_reader import WebsiteReader from agno.models.openai import OpenAIChat from agno.vectordb.pgvector import PgVector db_url = "postgresql+psycopg://ai:ai...
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_async.py
cookbook/08_knowledge/readers/web_search_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.web_search_reader import WebSearchReader from agno.vectordb.pgvector import PgVector db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai" db = Post...
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/arxiv_reader_async.py
cookbook/08_knowledge/readers/arxiv_reader_async.py
import asyncio from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.knowledge.reader.arxiv_reader import ArxivReader from agno.vectordb.pgvector import PgVector db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai" knowledge = Knowledge( # Table name: ai.arxiv_documents vec...
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/arxiv_reader.py
cookbook/08_knowledge/readers/arxiv_reader.py
from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.knowledge.reader.arxiv_reader import ArxivReader from agno.vectordb.pgvector import PgVector db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai" # Create a knowledge base with the ArXiv documents knowledge = Knowledge( # Tab...
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/search_type/vector_search.py
cookbook/08_knowledge/search_type/vector_search.py
from agno.knowledge.knowledge import Knowledge from agno.vectordb.pgvector import PgVector, SearchType db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai" # Load knowledge base using vector search vector_db = PgVector(table_name="recipes", db_url=db_url, search_type=SearchType.vector) knowledge = Knowledge( n...
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/search_type/hybrid_search.py
cookbook/08_knowledge/search_type/hybrid_search.py
from agno.knowledge.knowledge import Knowledge from agno.vectordb.pgvector import PgVector, SearchType db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai" # Load knowledge base using hybrid search hybrid_db = PgVector(table_name="recipes", db_url=db_url, search_type=SearchType.hybrid) knowledge = Knowledge( n...
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/search_type/__init__.py
cookbook/08_knowledge/search_type/__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/search_type/keyword_search.py
cookbook/08_knowledge/search_type/keyword_search.py
from agno.knowledge.knowledge import Knowledge from agno.vectordb.pgvector import PgVector, SearchType db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai" # Load knowledge base using keyword search keyword_db = PgVector( table_name="recipes", db_url=db_url, search_type=SearchType.keyword ) knowledge = Knowled...
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/filters/async_agentic_filtering.py
cookbook/08_knowledge/filters/async_agentic_filtering.py
import asyncio import os from agno.agent import Agent from agno.db.sqlite import AsyncSqliteDb from agno.knowledge.knowledge import Knowledge from agno.models.openai import OpenAIChat from agno.utils.media import ( SampleDataFileExtension, download_knowledge_filters_sample_data, ) from agno.vectordb.pgvector 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/filters/filtering_with_conditions_on_team.py
cookbook/08_knowledge/filters/filtering_with_conditions_on_team.py
""" This example demonstrates how to use knowledge filter expressions with teams. Knowledge filters allow you to restrict knowledge searches to specific documents or metadata criteria, enabling personalized and contextual responses. """ from agno.agent import Agent from agno.filters import AND, IN, NOT from agno.know...
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/filters/filtering.py
cookbook/08_knowledge/filters/filtering.py
from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.utils.media import ( SampleDataFileExtension, download_knowledge_filters_sample_data, ) from agno.vectordb.lancedb import LanceDb # Download all sample sales documents and get their paths downloaded_csv_paths = download_knowl...
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/filters/filtering_with_invalid_keys.py
cookbook/08_knowledge/filters/filtering_with_invalid_keys.py
from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.utils.media import ( SampleDataFileExtension, download_knowledge_filters_sample_data, ) from agno.vectordb.lancedb import LanceDb # Download all sample sales documents and get their paths downloaded_csv_paths = download_knowl...
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/filters/filtering_on_load.py
cookbook/08_knowledge/filters/filtering_on_load.py
from agno.agent import Agent from agno.db.postgres.postgres import PostgresDb from agno.knowledge.knowledge import Knowledge from agno.utils.media import ( SampleDataFileExtension, download_knowledge_filters_sample_data, ) from agno.vectordb.pgvector import PgVector # Download all sample sales files and get th...
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/filters/agentic_filtering_with_output_schema.py
cookbook/08_knowledge/filters/agentic_filtering_with_output_schema.py
from agno.agent import Agent from agno.db.postgres import PostgresDb from agno.knowledge.knowledge import Knowledge from agno.models.openai import OpenAIChat from agno.utils.media import ( SampleDataFileExtension, download_knowledge_filters_sample_data, ) from agno.vectordb.pgvector import PgVector from pydanti...
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/filters/agentic_filtering.py
cookbook/08_knowledge/filters/agentic_filtering.py
from agno.agent import Agent from agno.db.postgres import PostgresDb from agno.knowledge.knowledge import Knowledge from agno.models.openai import OpenAIChat from agno.utils.media import ( SampleDataFileExtension, download_knowledge_filters_sample_data, ) from agno.vectordb.pgvector import PgVector # Download ...
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/filters/__init__.py
cookbook/08_knowledge/filters/__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/filters/async_filtering.py
cookbook/08_knowledge/filters/async_filtering.py
import asyncio import os from agno.agent import Agent from agno.db.sqlite import AsyncSqliteDb from agno.filters import IN from agno.knowledge.knowledge import Knowledge from agno.utils.media import ( SampleDataFileExtension, download_knowledge_filters_sample_data, ) 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/filters/filtering_with_conditions_on_agent.py
cookbook/08_knowledge/filters/filtering_with_conditions_on_agent.py
""" This example demonstrates how to use knowledge filter expressions with agents. Knowledge filters allow you to restrict knowledge searches to specific documents or metadata criteria, enabling personalized and contextual responses. """ from agno.agent import Agent from agno.filters import AND, EQ, IN, NOT from agno...
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/filters/vector_dbs/filtering_pgvector.py
cookbook/08_knowledge/filters/vector_dbs/filtering_pgvector.py
from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.utils.media import ( SampleDataFileExtension, download_knowledge_filters_sample_data, ) from agno.vectordb.pgvector import PgVector # Download all sample CVs and get their paths downloaded_cv_paths = download_knowledge_filter...
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/filters/vector_dbs/filtering_mongo_db.py
cookbook/08_knowledge/filters/vector_dbs/filtering_mongo_db.py
from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.utils.media import ( SampleDataFileExtension, download_knowledge_filters_sample_data, ) from agno.vectordb.mongodb import MongoVectorDb # Download all sample CVs and get their paths downloaded_cv_paths = download_knowledge_fi...
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/filters/vector_dbs/filtering_qdrant_db.py
cookbook/08_knowledge/filters/vector_dbs/filtering_qdrant_db.py
from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.utils.media import ( SampleDataFileExtension, download_knowledge_filters_sample_data, ) from agno.vectordb.qdrant import Qdrant # Download all sample CVs and get their paths downloaded_cv_paths = download_knowledge_filters_sa...
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/filters/vector_dbs/__init__.py
cookbook/08_knowledge/filters/vector_dbs/__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/filters/vector_dbs/filtering_pinecone.py
cookbook/08_knowledge/filters/vector_dbs/filtering_pinecone.py
from os import getenv from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.utils.media import ( SampleDataFileExtension, download_knowledge_filters_sample_data, ) from agno.vectordb.pineconedb import PineconeDb # Download all sample CVs and get their paths downloaded_cv_paths ...
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/filters/vector_dbs/filtering_surrealdb.py
cookbook/08_knowledge/filters/vector_dbs/filtering_surrealdb.py
from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.utils.media import ( SampleDataFileExtension, download_knowledge_filters_sample_data, ) from agno.vectordb.surrealdb import SurrealDb from surrealdb import Surreal # SurrealDB connection parameters SURREALDB_URL = "ws://local...
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/filters/vector_dbs/filtering_weaviate.py
cookbook/08_knowledge/filters/vector_dbs/filtering_weaviate.py
from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.utils.media import ( SampleDataFileExtension, download_knowledge_filters_sample_data, ) from agno.vectordb.weaviate import Distance, VectorIndex, Weaviate # Download all sample CVs and get their paths downloaded_cv_paths = do...
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/filters/vector_dbs/filtering_chroma_db.py
cookbook/08_knowledge/filters/vector_dbs/filtering_chroma_db.py
from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.utils.media import ( SampleDataFileExtension, download_knowledge_filters_sample_data, ) from agno.vectordb.chroma import ChromaDb # Download all sample CVs and get their paths downloaded_cv_paths = download_knowledge_filters_...
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/filters/vector_dbs/filtering_lance_db.py
cookbook/08_knowledge/filters/vector_dbs/filtering_lance_db.py
from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.utils.media import ( SampleDataFileExtension, download_knowledge_filters_sample_data, ) from agno.vectordb.lancedb import LanceDb # Download all sample CVs and get their paths downloaded_cv_paths = download_knowledge_filters_...
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/filters/vector_dbs/filtering_milvus.py
cookbook/08_knowledge/filters/vector_dbs/filtering_milvus.py
from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.utils.media import ( SampleDataFileExtension, download_knowledge_filters_sample_data, ) from agno.vectordb.milvus import Milvus # Download all sample CVs and get their paths downloaded_cv_paths = download_knowledge_filters_sa...
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/custom_retriever/async_retriever.py
cookbook/08_knowledge/custom_retriever/async_retriever.py
import asyncio from typing import Optional from agno.agent import Agent from agno.knowledge.embedder.openai import OpenAIEmbedder from agno.knowledge.knowledge import Knowledge from agno.vectordb.qdrant import Qdrant from qdrant_client import AsyncQdrantClient # -------------------------------------------------------...
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/custom_retriever/__init__.py
cookbook/08_knowledge/custom_retriever/__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/custom_retriever/retriever.py
cookbook/08_knowledge/custom_retriever/retriever.py
from typing import Optional from agno.agent import Agent from agno.knowledge.embedder.openai import OpenAIEmbedder from agno.knowledge.knowledge import Knowledge from agno.vectordb.qdrant import Qdrant from qdrant_client import QdrantClient # --------------------------------------------------------- # This section lo...
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/custom_retriever/retriever_with_dependencies.py
cookbook/08_knowledge/custom_retriever/retriever_with_dependencies.py
""" Example demonstrating custom knowledge retriever with runtime dependencies. This cookbook shows how to access dependencies passed at runtime (e.g., via agent.run(dependencies={...})) in a custom knowledge retriever function. Key points: 1. Add 'run_context' parameter to your retriever function signature 2. Depend...
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/vector_db/__init__.py
cookbook/08_knowledge/vector_db/__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/vector_db/couchbase_db/async_couchbase_db_with_batch_embedder.py
cookbook/08_knowledge/vector_db/couchbase_db/async_couchbase_db_with_batch_embedder.py
""" Couchbase Vector DB Example ========================== Setup Couchbase Cluster (Local via Docker): ------------------------------------------- 1. Run Couchbase locally: docker run -d --name couchbase-server \ -p 8091-8096:8091-8096 \ -p 11210:11210 \ -e COUCHBASE_ADMINISTRATOR_USERNAME=Administr...
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/vector_db/couchbase_db/couchbase_db.py
cookbook/08_knowledge/vector_db/couchbase_db/couchbase_db.py
""" Couchbase Vector DB Example ========================== Setup Couchbase Cluster (Local via Docker): ------------------------------------------- 1. Run Couchbase locally: docker run -d --name couchbase-server \ -p 8091-8096:8091-8096 \ -p 11210:11210 \ -e COUCHBASE_ADMINISTRATOR_USERNAME=Administr...
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/vector_db/couchbase_db/__init__.py
cookbook/08_knowledge/vector_db/couchbase_db/__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/vector_db/couchbase_db/async_couchbase_db.py
cookbook/08_knowledge/vector_db/couchbase_db/async_couchbase_db.py
""" Couchbase Vector DB Example ========================== Setup Couchbase Cluster (Local via Docker): ------------------------------------------- 1. Run Couchbase locally: docker run -d --name couchbase-server \ -p 8091-8096:8091-8096 \ -p 11210:11210 \ -e COUCHBASE_ADMINISTRATOR_USERNAME=Administr...
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/vector_db/pgvector/pgvector_hybrid_search.py
cookbook/08_knowledge/vector_db/pgvector/pgvector_hybrid_search.py
from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.models.openai import OpenAIChat from agno.vectordb.pgvector import PgVector, SearchType db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai" knowledge = Knowledge( name="My PG Vector Knowledge Base", description="This is ...
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/vector_db/pgvector/async_pg_vector_with_batch_embedder.py
cookbook/08_knowledge/vector_db/pgvector/async_pg_vector_with_batch_embedder.py
import asyncio from agno.agent import Agent from agno.knowledge.embedder.openai import OpenAIEmbedder from agno.knowledge.knowledge import Knowledge from agno.vectordb.pgvector import PgVector db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai" vector_db = PgVector( table_name="recipes", db_url=db_url, 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/vector_db/pgvector/pgvector_db.py
cookbook/08_knowledge/vector_db/pgvector/pgvector_db.py
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" vector_db = PgVector(table_name="vectors", db_url=db_url) knowledge = Knowledge( name="My PG Vector Knowledge Base", description="Thi...
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/vector_db/pgvector/__init__.py
cookbook/08_knowledge/vector_db/pgvector/__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/vector_db/pgvector/async_pg_vector.py
cookbook/08_knowledge/vector_db/pgvector/async_pg_vector.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" vector_db = PgVector(table_name="recipes", db_url=db_url) knowledge_base = Knowledge( vector_db=vector_db, ) agent = Age...
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/vector_db/cassandra_db/async_cassandra_db.py
cookbook/08_knowledge/vector_db/cassandra_db/async_cassandra_db.py
import asyncio from agno.agent import Agent from agno.knowledge.embedder.mistral import MistralEmbedder from agno.knowledge.knowledge import Knowledge from agno.models.mistral import MistralChat from agno.vectordb.cassandra import Cassandra try: from cassandra.cluster import Cluster # type: ignore except (Import...
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/vector_db/cassandra_db/__init__.py
cookbook/08_knowledge/vector_db/cassandra_db/__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/vector_db/cassandra_db/async_cassandra_db_with_batch_embedder.py
cookbook/08_knowledge/vector_db/cassandra_db/async_cassandra_db_with_batch_embedder.py
import asyncio from agno.agent import Agent from agno.knowledge.embedder.mistral import MistralEmbedder from agno.knowledge.knowledge import Knowledge from agno.models.mistral import MistralChat from agno.vectordb.cassandra import Cassandra try: from cassandra.cluster import Cluster # type: ignore except (Import...
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/vector_db/cassandra_db/cassandra_db.py
cookbook/08_knowledge/vector_db/cassandra_db/cassandra_db.py
from agno.agent import Agent from agno.knowledge.embedder.openai import OpenAIEmbedder from agno.knowledge.knowledge import Knowledge from agno.vectordb.cassandra import Cassandra try: from cassandra.cluster import Cluster # type: ignore except (ImportError, ModuleNotFoundError): raise ImportError( "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/vector_db/pinecone_db/pinecone_db.py
cookbook/08_knowledge/vector_db/pinecone_db/pinecone_db.py
from os import getenv from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.vectordb.pineconedb import PineconeDb api_key = getenv("PINECONE_API_KEY") index_name = "thai-recipe-index" vector_db = PineconeDb( name=index_name, dimension=1536, metric="cosine", spec={"serv...
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/vector_db/pinecone_db/__init__.py
cookbook/08_knowledge/vector_db/pinecone_db/__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/vector_db/pinecone_db/async_pinecone_db_with_batch_embedder.py
cookbook/08_knowledge/vector_db/pinecone_db/async_pinecone_db_with_batch_embedder.py
import asyncio from os import getenv from agno.agent import Agent from agno.knowledge.embedder.openai import OpenAIEmbedder from agno.knowledge.knowledge import Knowledge from agno.models.openai import OpenAIChat from agno.vectordb.pineconedb import PineconeDb agent = Agent( model=OpenAIChat( id="gpt-4o-m...
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/vector_db/llamaindex_db/async_llamaindex_db.py
cookbook/08_knowledge/vector_db/llamaindex_db/async_llamaindex_db.py
import asyncio from pathlib import Path from shutil import rmtree import httpx from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.models.openai import OpenAIChat from agno.vectordb.llamaindex.llamaindexdb import LlamaIndexVectorDb from llama_index.core import ( SimpleDirectoryRea...
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/vector_db/llamaindex_db/__init__.py
cookbook/08_knowledge/vector_db/llamaindex_db/__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/vector_db/llamaindex_db/llamaindex_db.py
cookbook/08_knowledge/vector_db/llamaindex_db/llamaindex_db.py
""" pip install llama-index-core llama-index-readers-file llama-index-embeddings-openai agno """ from pathlib import Path from shutil import rmtree import httpx from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.models.openai import OpenAIChat from agno.vectordb.llamaindex.llamainde...
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/vector_db/chroma_db/async_chroma_db.py
cookbook/08_knowledge/vector_db/chroma_db/async_chroma_db.py
# install chromadb - `pip install chromadb` import asyncio from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.vectordb.chroma import ChromaDb # Initialize ChromaDB vector_db = ChromaDb(collection="recipes", path="tmp/chromadb", persistent_client=True) # Create knowledge base knowl...
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/vector_db/chroma_db/chroma_db.py
cookbook/08_knowledge/vector_db/chroma_db/chroma_db.py
import asyncio from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.vectordb.chroma import ChromaDb # Create Knowledge Instance with ChromaDB knowledge = Knowledge( name="Basic SDK Knowledge Base", description="Agno 2.0 Knowledge Implementation with ChromaDB", vector_db=Ch...
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/vector_db/chroma_db/async_chroma_db_with_batch_embedder.py
cookbook/08_knowledge/vector_db/chroma_db/async_chroma_db_with_batch_embedder.py
# install chromadb - `pip install chromadb` import asyncio from agno.agent import Agent from agno.knowledge.embedder.openai import OpenAIEmbedder from agno.knowledge.knowledge import Knowledge from agno.vectordb.chroma import ChromaDb # Initialize ChromaDB vector_db = ChromaDb( collection="recipes", path="tm...
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/vector_db/chroma_db/__init__.py
cookbook/08_knowledge/vector_db/chroma_db/__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/vector_db/chroma_db/chroma_db_hybrid_search.py
cookbook/08_knowledge/vector_db/chroma_db/chroma_db_hybrid_search.py
""" ChromaDB with Hybrid Search using Reciprocal Rank Fusion (RRF) This example demonstrates how to use ChromaDB with hybrid search, which combines dense vector similarity search (semantic) with full-text search (keyword/lexical) using RRF fusion. Hybrid search is useful when you want to: - Combine semantic understan...
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/vector_db/milvus_db/milvus_db.py
cookbook/08_knowledge/vector_db/milvus_db/milvus_db.py
import asyncio from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.vectordb.milvus import Milvus # Initialize Milvus # Set the uri and token for your Milvus server. # - If you only need a local vector database for small scale data or prototyping, setting the uri as a local file, e.g...
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/vector_db/milvus_db/async_milvus_db_hybrid_search.py
cookbook/08_knowledge/vector_db/milvus_db/async_milvus_db_hybrid_search.py
import asyncio from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.vectordb.milvus import Milvus, SearchType # Initialize Milvus # Set the uri and token for your Milvus server. # - If you only need a local vector database for small scale data or prototyping, setting the uri as a 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/vector_db/milvus_db/milvus_db_hybrid_search.py
cookbook/08_knowledge/vector_db/milvus_db/milvus_db_hybrid_search.py
from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.vectordb.milvus import Milvus, SearchType # Initialize Milvus # Set the uri and token for your Milvus server. # - If you only need a local vector database for small scale data or prototyping, setting the uri as a local file, e.g.`./...
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/vector_db/milvus_db/milvus_db_range_search.py
cookbook/08_knowledge/vector_db/milvus_db/milvus_db_range_search.py
import asyncio from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.vectordb.milvus import Milvus # Initialize Milvus with a local file database vector_db = Milvus( collection="recipes_range_search", uri="/tmp/milvus_range.db", ) # Create knowledge base 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/vector_db/milvus_db/async_milvus_db_with_batch_embedder.py
cookbook/08_knowledge/vector_db/milvus_db/async_milvus_db_with_batch_embedder.py
import asyncio from agno.agent import Agent from agno.knowledge.embedder.openai import OpenAIEmbedder from agno.knowledge.knowledge import Knowledge from agno.models.openai import OpenAIChat from agno.vectordb.milvus import Milvus agent = Agent( model=OpenAIChat( id="gpt-4o-mini", ), knowledge=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/vector_db/milvus_db/__init__.py
cookbook/08_knowledge/vector_db/milvus_db/__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/vector_db/milvus_db/async_milvus_db.py
cookbook/08_knowledge/vector_db/milvus_db/async_milvus_db.py
# install pymilvus - `pip install pymilvus` import asyncio from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.vectordb.milvus import Milvus # Initialize Milvus # Set the uri and token for your Milvus server. # - If you only need a local vector database for small scale data or prot...
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/vector_db/lightrag/lightrag.py
cookbook/08_knowledge/vector_db/lightrag/lightrag.py
import asyncio from os import getenv from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.knowledge.reader.wikipedia_reader import WikipediaReader from agno.vectordb.lightrag import LightRag vector_db = LightRag( api_key=getenv("LIGHTRAG_API_KEY"), ) knowledge = Knowledge( na...
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/vector_db/lightrag/__init__.py
cookbook/08_knowledge/vector_db/lightrag/__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/vector_db/langchain/langchain_db.py
cookbook/08_knowledge/vector_db/langchain/langchain_db.py
""" pip install langchain langchain-community langchain-openai langchain-chroma agno """ import pathlib from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.models.openai import OpenAIChat from agno.vectordb.langchaindb import LangChainVectorDb from langchain.text_splitter import Char...
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/vector_db/langchain/__init__.py
cookbook/08_knowledge/vector_db/langchain/__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/vector_db/langchain/async_langchain_db.py
cookbook/08_knowledge/vector_db/langchain/async_langchain_db.py
""" pip install langchain langchain-community langchain-openai langchain-chroma agno """ import asyncio import pathlib from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.models.openai import OpenAIChat from agno.vectordb.langchaindb import LangChainVectorDb from langchain.text_split...
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/vector_db/upstash_db/__init__.py
cookbook/08_knowledge/vector_db/upstash_db/__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/vector_db/upstash_db/async_upstash_db_with_batch_embedder.py
cookbook/08_knowledge/vector_db/upstash_db/async_upstash_db_with_batch_embedder.py
import asyncio from os import getenv from agno.agent import Agent from agno.knowledge.embedder.openai import OpenAIEmbedder from agno.knowledge.knowledge import Knowledge from agno.models.openai import OpenAIChat from agno.vectordb.upstashdb import UpstashVectorDb agent = Agent( model=OpenAIChat( id="gpt-...
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/vector_db/upstash_db/upstash_db.py
cookbook/08_knowledge/vector_db/upstash_db/upstash_db.py
# install upstash-vector - `uv pip install upstash-vector` # Add OPENAI_API_KEY to your environment variables for the agent response import os from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.vectordb.upstashdb import UpstashVectorDb # How to connect to an Upstash Vector index # ...
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/vector_db/surrealdb/async_surreal_db.py
cookbook/08_knowledge/vector_db/surrealdb/async_surreal_db.py
# Run SurrealDB in a container before running this script # docker run --rm --pull always -p 8000:8000 surrealdb/surrealdb:latest start --user root --pass root import asyncio from agno.agent import Agent from agno.knowledge.embedder.openai import OpenAIEmbedder from agno.knowledge.knowledge import Knowledge from agno...
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/vector_db/surrealdb/surreal_db.py
cookbook/08_knowledge/vector_db/surrealdb/surreal_db.py
# Run SurrealDB in a container before running this script # docker run --rm --pull always -p 8000:8000 surrealdb/surrealdb:latest start --user root --pass root from agno.agent import Agent from agno.knowledge.embedder.openai import OpenAIEmbedder from agno.knowledge.knowledge import Knowledge from agno.vectordb.surrea...
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/vector_db/surrealdb/__init__.py
cookbook/08_knowledge/vector_db/surrealdb/__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/vector_db/mongo_db/mongo_db_hybrid_search.py
cookbook/08_knowledge/vector_db/mongo_db/mongo_db_hybrid_search.py
import typer from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.vectordb.mongodb import MongoVectorDb from agno.vectordb.search import SearchType from rich.prompt import Prompt # MongoDB Atlas connection string """ Example connection strings: "mongodb+srv://<username>:<password>@clus...
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/vector_db/mongo_db/async_mongo_db_with_batch_embedder.py
cookbook/08_knowledge/vector_db/mongo_db/async_mongo_db_with_batch_embedder.py
import asyncio from agno.agent import Agent from agno.knowledge.embedder.openai import OpenAIEmbedder from agno.knowledge.knowledge import Knowledge from agno.models.openai import OpenAIChat from agno.vectordb.mongodb import MongoVectorDb mdb_connection_string = ( "mongodb+srv://mongoadmin:secret@cluster0.mongodb...
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/vector_db/mongo_db/async_mongo_db.py
cookbook/08_knowledge/vector_db/mongo_db/async_mongo_db.py
""" 1. Create a MongoDB Atlas Account: - Go to https://www.mongodb.com/cloud/atlas/register - Sign up for a free account 2. Create a New Cluster: - Click "Build a Database" - Choose the FREE tier (M0) - Select your preferred cloud provider and region - Click "Create Cluster" 3. Set Up Database Acces...
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/vector_db/mongo_db/mongo_db.py
cookbook/08_knowledge/vector_db/mongo_db/mongo_db.py
""" 1. Create a MongoDB Atlas Account: - Go to https://www.mongodb.com/cloud/atlas/register - Sign up for a free account 2. Create a New Cluster: - Click "Build a Database" - Choose the FREE tier (M0) - Select your preferred cloud provider and region - Click "Create Cluster" 3. Set Up Database Acces...
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/vector_db/mongo_db/cosmos_mongodb_vcore.py
cookbook/08_knowledge/vector_db/mongo_db/cosmos_mongodb_vcore.py
from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.vectordb.mongodb import MongoVectorDb """ Example connection strings: "mongodb+srv://<username>:<encoded_password>@cluster0.mongocluster.cosmos.azure.com/?tls=true&authMechanism=SCRAM-SHA-256&retrywrites=false&maxIdleTimeMS=120000" "...
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/vector_db/mongo_db/__init__.py
cookbook/08_knowledge/vector_db/mongo_db/__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/vector_db/qdrant_db/qdrant_db_hybrid_search.py
cookbook/08_knowledge/vector_db/qdrant_db/qdrant_db_hybrid_search.py
import typer from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.vectordb.qdrant import Qdrant from agno.vectordb.search import SearchType from rich.prompt import Prompt COLLECTION_NAME = "thai-recipes" vector_db = Qdrant( collection=COLLECTION_NAME, url="http://localhost:633...
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/vector_db/qdrant_db/async_qdrant_db_with_batch_embedder.py
cookbook/08_knowledge/vector_db/qdrant_db/async_qdrant_db_with_batch_embedder.py
import asyncio from agno.agent import Agent from agno.knowledge.embedder.openai import OpenAIEmbedder from agno.knowledge.knowledge import Knowledge from agno.models.openai import OpenAIChat from agno.vectordb.qdrant import Qdrant agent = Agent( model=OpenAIChat( id="gpt-4o-mini", ), knowledge=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/vector_db/qdrant_db/qdrant_db.py
cookbook/08_knowledge/vector_db/qdrant_db/qdrant_db.py
from agno.agent import Agent from agno.db.postgres.postgres import PostgresDb from agno.knowledge.knowledge import Knowledge from agno.vectordb.qdrant import Qdrant COLLECTION_NAME = "thai-recipes" vector_db = Qdrant(collection=COLLECTION_NAME, url="http://localhost:6333") contents_db = PostgresDb( db_url="postg...
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/vector_db/qdrant_db/async_qdrant_db.py
cookbook/08_knowledge/vector_db/qdrant_db/async_qdrant_db.py
import asyncio from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.vectordb.qdrant import Qdrant COLLECTION_NAME = "thai-recipes" vector_db = Qdrant(collection=COLLECTION_NAME, url="http://localhost:6333") # Create knowledge base knowledge = Knowledge( vector_db=vector_db, ) 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/vector_db/qdrant_db/__init__.py
cookbook/08_knowledge/vector_db/qdrant_db/__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/vector_db/singlestore_db/__init__.py
cookbook/08_knowledge/vector_db/singlestore_db/__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/vector_db/singlestore_db/singlestore_db.py
cookbook/08_knowledge/vector_db/singlestore_db/singlestore_db.py
""" # Run the setup script ```shell ./cookbook/scripts/run_singlestore.sh ``` # Create the database - Visit http://localhost:8080 and login with `root` and `admin` - Create the database with your choice of name. Default setup script requires AGNO as database name. `CREATE DATABASE your_database_name;` """ import asy...
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/vector_db/singlestore_db/async_singlestore_db_with_batch_embedder.py
cookbook/08_knowledge/vector_db/singlestore_db/async_singlestore_db_with_batch_embedder.py
""" # Run the setup script ```shell ./cookbook/scripts/run_singlestore.sh ``` # Create the database - Visit http://localhost:8080 and login with `root` and `admin` - Create the database with your choice of name. Default setup script requires AGNO as database name. `CREATE DATABASE your_database_name;` """ import asy...
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/vector_db/lance_db/lance_db_with_mistral_embedder.py
cookbook/08_knowledge/vector_db/lance_db/lance_db_with_mistral_embedder.py
import asyncio from agno.knowledge.embedder.mistral import MistralEmbedder from agno.knowledge.knowledge import Knowledge from agno.knowledge.reader.pdf_reader import PDFReader from agno.vectordb.lancedb import LanceDb, SearchType embedder_mi = MistralEmbedder() vector_db = LanceDb( uri="tmp/lancedb", table_...
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/vector_db/lance_db/lance_db_hybrid_search.py
cookbook/08_knowledge/vector_db/lance_db/lance_db_hybrid_search.py
from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.models.openai import OpenAIChat from agno.vectordb.lancedb import LanceDb, SearchType knowledge = Knowledge( name="My PG Vector Knowledge Base", description="This is a knowledge base that uses a PG Vector DB", vector_db=L...
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/vector_db/lance_db/async_lance_db_with_batch_embedder.py
cookbook/08_knowledge/vector_db/lance_db/async_lance_db_with_batch_embedder.py
import asyncio from agno.agent import Agent from agno.knowledge.embedder.openai import OpenAIEmbedder from agno.knowledge.knowledge import Knowledge from agno.models.openai import OpenAIChat from agno.vectordb.lancedb import LanceDb agent = Agent( model=OpenAIChat( id="gpt-4o-mini", ), knowledge=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/vector_db/lance_db/__init__.py
cookbook/08_knowledge/vector_db/lance_db/__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/vector_db/lance_db/lance_db.py
cookbook/08_knowledge/vector_db/lance_db/lance_db.py
import asyncio from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.vectordb.lancedb import LanceDb vector_db = LanceDb( table_name="vectors", uri="tmp/lancedb", ) # Create Knowledge Instance with LanceDB knowledge = Knowledge( name="Basic SDK Knowledge Base", descrip...
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/vector_db/redis_db/redis_db.py
cookbook/08_knowledge/vector_db/redis_db/redis_db.py
""" This example shows how to use Redis as a vector database with Agno. To get started, either set the REDIS_URL environment variable to your Redis connection string, or start the local Redis docker container using the following command: ./cookbook/scripts/run_redis.sh """ import os from agno.agent import 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/vector_db/redis_db/async_redis_db.py
cookbook/08_knowledge/vector_db/redis_db/async_redis_db.py
""" This example shows how to use Redis as a vector database with Agno. To get started, either set the REDIS_URL environment variable to your Redis connection string, or start the local Redis docker container using the following command: ./cookbook/scripts/run_redis.sh """ import asyncio import os from agno.agent 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/vector_db/redis_db/redis_db_with_cohere_reranker.py
cookbook/08_knowledge/vector_db/redis_db/redis_db_with_cohere_reranker.py
from agno.agent import Agent from agno.knowledge.embedder.openai import OpenAIEmbedder from agno.knowledge.knowledge import Knowledge from agno.knowledge.reranker.cohere import CohereReranker from agno.models.openai import OpenAIChat from agno.vectordb.redis import RedisDB knowledge = Knowledge( vector_db=RedisDB(...
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/vector_db/weaviate_db/async_weaviate_db.py
cookbook/08_knowledge/vector_db/weaviate_db/async_weaviate_db.py
""" This example demonstrates using Weaviate as a vector database for semantic search. Installation: pip install weaviate-client You can use either Weaviate Cloud or a local instance. Weaviate Cloud Setup: 1. Create account at https://console.weaviate.cloud/ 2. Create a cluster and copy the "REST endpoint" and "...
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/vector_db/weaviate_db/weaviate_db_hybrid_search.py
cookbook/08_knowledge/vector_db/weaviate_db/weaviate_db_hybrid_search.py
import typer from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.vectordb.search import SearchType from agno.vectordb.weaviate import Distance, VectorIndex, Weaviate from rich.prompt import Prompt vector_db = Weaviate( collection="recipes", search_type=SearchType.hybrid, v...
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/vector_db/weaviate_db/__init__.py
cookbook/08_knowledge/vector_db/weaviate_db/__init__.py
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false