agno 2.3.17__py3-none-any.whl → 2.3.19__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -50,6 +50,7 @@ try:
50
50
  from google.genai.types import (
51
51
  File as GeminiFile,
52
52
  )
53
+ from google.oauth2.service_account import Credentials
53
54
  except ImportError:
54
55
  raise ImportError(
55
56
  "`google-genai` not installed or not at the latest version. Please install it using `pip install -U google-genai`"
@@ -66,6 +67,7 @@ class Gemini(Model):
66
67
  - Set `vertexai` to `True` to use the Vertex AI API.
67
68
  - Set your `project_id` (or set `GOOGLE_CLOUD_PROJECT` environment variable) and `location` (optional).
68
69
  - Set `http_options` (optional) to configure the HTTP options.
70
+ - Set `credentials` (optional) to use the Google Cloud credentials.
69
71
 
70
72
  Based on https://googleapis.github.io/python-genai/
71
73
  """
@@ -110,6 +112,7 @@ class Gemini(Model):
110
112
  request_params: Optional[Dict[str, Any]] = None
111
113
 
112
114
  # Client parameters
115
+ credentials: Optional[Credentials] = None
113
116
  api_key: Optional[str] = None
114
117
  vertexai: bool = False
115
118
  project_id: Optional[str] = None
@@ -158,6 +161,8 @@ class Gemini(Model):
158
161
  log_error("GOOGLE_CLOUD_LOCATION not set. Please set the GOOGLE_CLOUD_LOCATION environment variable.")
159
162
  client_params["project"] = project_id
160
163
  client_params["location"] = location
164
+ if self.credentials:
165
+ client_params["credentials"] = self.credentials
161
166
 
162
167
  client_params = {k: v for k, v in client_params.items() if v is not None}
163
168
 
agno/os/app.py CHANGED
@@ -300,12 +300,14 @@ class AgentOS:
300
300
  def _reprovision_routers(self, app: FastAPI) -> None:
301
301
  """Re-provision all routes for the AgentOS."""
302
302
  updated_routers = [
303
+ get_home_router(self),
303
304
  get_session_router(dbs=self.dbs),
305
+ get_memory_router(dbs=self.dbs),
306
+ get_eval_router(dbs=self.dbs, agents=self.agents, teams=self.teams),
304
307
  get_metrics_router(dbs=self.dbs),
305
308
  get_knowledge_router(knowledge_instances=self.knowledge_instances),
306
309
  get_traces_router(dbs=self.dbs),
307
- get_memory_router(dbs=self.dbs),
308
- get_eval_router(dbs=self.dbs, agents=self.agents, teams=self.teams),
310
+ get_database_router(self, settings=self.settings),
309
311
  ]
310
312
 
311
313
  # Clear all previously existing routes
@@ -1,5 +1,6 @@
1
- from agno.vectordb.chroma.chromadb import ChromaDb
1
+ from agno.vectordb.chroma.chromadb import ChromaDb, SearchType
2
2
 
3
3
  __all__ = [
4
4
  "ChromaDb",
5
+ "SearchType",
5
6
  ]
@@ -57,8 +57,8 @@ class ChromaDb(VectorDb):
57
57
  ChromaDb class for managing vector operations with ChromaDB.
58
58
 
59
59
  Args:
60
- collection: The name of the ChromaDB collection.
61
- name: Name of the vector database.
60
+ collection: The name of the ChromaDB collection. If not provided, derived from 'name'.
61
+ name: Name of the vector database. Also used as collection name if 'collection' is not provided.
62
62
  description: Description of the vector database.
63
63
  id: Unique identifier for this vector database instance.
64
64
  embedder: The embedder to use when embedding the document contents.
@@ -79,7 +79,7 @@ class ChromaDb(VectorDb):
79
79
 
80
80
  def __init__(
81
81
  self,
82
- collection: str,
82
+ collection: Optional[str] = None,
83
83
  name: Optional[str] = None,
84
84
  description: Optional[str] = None,
85
85
  id: Optional[str] = None,
@@ -92,9 +92,13 @@ class ChromaDb(VectorDb):
92
92
  reranker: Optional[Reranker] = None,
93
93
  **kwargs,
94
94
  ):
95
- # Validate required parameters
96
- if not collection:
97
- raise ValueError("Collection name must be provided.")
95
+ # Derive collection from name if not provided
96
+ if collection is None:
97
+ if name is not None:
98
+ # Sanitize name: lowercase and replace spaces with underscores
99
+ collection = name.lower().replace(" ", "_")
100
+ else:
101
+ raise ValueError("Either 'collection' or 'name' must be provided.")
98
102
 
99
103
  # Dynamic ID generation based on unique identifiers
100
104
  if id is None:
@@ -1,4 +1,4 @@
1
- from agno.vectordb.mongodb.mongodb import MongoDb
1
+ from agno.vectordb.mongodb.mongodb import MongoDb, SearchType
2
2
 
3
3
  # Alias to avoid name collision with the main MongoDb class
4
4
  MongoVectorDb = MongoDb
@@ -6,4 +6,5 @@ MongoVectorDb = MongoDb
6
6
  __all__ = [
7
7
  "MongoVectorDb",
8
8
  "MongoDb",
9
+ "SearchType",
9
10
  ]
@@ -1,5 +1,6 @@
1
- from agno.vectordb.qdrant.qdrant import Qdrant
1
+ from agno.vectordb.qdrant.qdrant import Qdrant, SearchType
2
2
 
3
3
  __all__ = [
4
4
  "Qdrant",
5
+ "SearchType",
5
6
  ]
@@ -1,4 +1,4 @@
1
- from agno.vectordb.redis.redisdb import RedisDB
1
+ from agno.vectordb.redis.redisdb import RedisDB, SearchType
2
2
 
3
3
  # Backward compatibility alias
4
4
  RedisVectorDb = RedisDB
@@ -6,4 +6,5 @@ RedisVectorDb = RedisDB
6
6
  __all__ = [
7
7
  "RedisVectorDb",
8
8
  "RedisDB",
9
+ "SearchType",
9
10
  ]
@@ -1,8 +1,9 @@
1
1
  from agno.vectordb.weaviate.index import Distance, VectorIndex
2
- from agno.vectordb.weaviate.weaviate import Weaviate
2
+ from agno.vectordb.weaviate.weaviate import Weaviate, SearchType
3
3
 
4
4
  __all__ = [
5
5
  "Distance",
6
6
  "VectorIndex",
7
7
  "Weaviate",
8
+ "SearchType",
8
9
  ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agno
3
- Version: 2.3.17
3
+ Version: 2.3.19
4
4
  Summary: Agno: a lightweight library for building Multi-Agent Systems
5
5
  Author-email: Ashpreet Bedi <ashpreet@agno.com>
6
6
  Project-URL: homepage, https://agno.com
@@ -219,7 +219,7 @@ agno/models/deepseek/deepseek.py,sha256=vIxeA8ou-1_hlj2adF4VxbHhMKlMjcb6QUGVk_SB
219
219
  agno/models/fireworks/__init__.py,sha256=qIDjKUnwmrnwfa9B2Y3ybRyuUsF7Pzw6_bVq4N6M0Cg,86
220
220
  agno/models/fireworks/fireworks.py,sha256=0pCtb8UmPAJZTKpwFXKO-HLNZ-qK2zu3P8P5qxySRF8,1648
221
221
  agno/models/google/__init__.py,sha256=bEOSroFJ4__38XaCgBUWiOe_Qga66ZRm_gis__yIMmc,74
222
- agno/models/google/gemini.py,sha256=sVBQtc_2iSmFsTsueDhdJVkUc7p6x0Xgk1l5nYyreps,81666
222
+ agno/models/google/gemini.py,sha256=jMxJgNbOKH2hIFccQ3xahWuWgrgjnhj2_1joOks7isU,81939
223
223
  agno/models/google/utils.py,sha256=6X5yFZ8q9OL8FRnI-1Fa4iHHCx7PENFQ4uIBX34FilY,721
224
224
  agno/models/groq/__init__.py,sha256=gODf5IA4yJKlwTEYsUywmA-dsiQVyL2_yWMc8VncdVU,66
225
225
  agno/models/groq/groq.py,sha256=1xBkn8OmXFFXMcrhkxodsurgOuk1u_GVwq8GOHDSPTU,24185
@@ -278,7 +278,7 @@ agno/models/vllm/vllm.py,sha256=qaWgYcmegJZL52ZjmuIoryBpZ9LpOvYHFY-AYxVirA4,2806
278
278
  agno/models/xai/__init__.py,sha256=ukcCxnCHxTtkJNA2bAMTX4MhCv1wJcbiq8ZIfYczIxs,55
279
279
  agno/models/xai/xai.py,sha256=i7QoRiVdmoQ1E8Zw_e60qQgF85geZXWRPtEKioIInSU,4796
280
280
  agno/os/__init__.py,sha256=h8oQu7vhD5RZf09jkyM_Kt1Kdq_d5kFB9gJju8QPwcY,55
281
- agno/os/app.py,sha256=HwOWieHJ_zN52F_oo6Jli4ADTaLHdcRO1h9FwhO76GI,45661
281
+ agno/os/app.py,sha256=wg0SlcVdYtYMmSRlgznkihL3K9CSt82Xc-zvvUpOURc,45759
282
282
  agno/os/auth.py,sha256=3-0FUvj5o5e0qOl1ixEJ8NLdchpr8AroKaK_4pojp7w,11291
283
283
  agno/os/config.py,sha256=z0wNd576_qsQGsQWsMRIZzjknDVEPlKWF_pHE6VBUyY,3538
284
284
  agno/os/managers.py,sha256=j7Y07yEsW03iKEy1itb3sq3PXcJS3ipJbK4rTqk6_Ow,13086
@@ -569,8 +569,8 @@ agno/vectordb/cassandra/__init__.py,sha256=1N7lA9QDVWsCD5V5qvXjhACVDMWlq8f37hhNB
569
569
  agno/vectordb/cassandra/cassandra.py,sha256=ZHIRMV8XbfPKS-fZ_2iQYPzOc8bBjhAqiiW01WKZEks,20938
570
570
  agno/vectordb/cassandra/extra_param_mixin.py,sha256=tCgHnXxuy3Ea4bhrBGkejz9kpgLyM_sUf3QfWcjqzLQ,315
571
571
  agno/vectordb/cassandra/index.py,sha256=9Ea-AoAxCQf2xP-RoIwvujVdzpNBcm2Qgcs4O5D40cU,572
572
- agno/vectordb/chroma/__init__.py,sha256=xSNCyxrJJMd37Y9aNumn026ycHrMKxREgEg1zsnCm1c,82
573
- agno/vectordb/chroma/chromadb.py,sha256=3UCTs3nnDibhS3_ziCAtSLP4coGecYexO27tC9bMrms,57204
572
+ agno/vectordb/chroma/__init__.py,sha256=WJ1qUTlIBnBYlUuepj84xc2l7S8WPOjXhBCyJFQseuE,112
573
+ agno/vectordb/chroma/chromadb.py,sha256=A19gpO_l_i-A8Txk18w-jqtdcHAZ4ubkFikM79pvsM4,57548
574
574
  agno/vectordb/clickhouse/__init__.py,sha256=pcmZRNBEpDznEEpl3NzMZgvVLo8tni3X0FY1G_WXAdc,214
575
575
  agno/vectordb/clickhouse/clickhousedb.py,sha256=XxDMcaa9xOzHJPMySCSHjtcwytLe6Pqm9-5LCkIziG0,31833
576
576
  agno/vectordb/clickhouse/index.py,sha256=_YW-8AuEYy5kzOHi0zIzjngpQPgJOBdSrn9BfEL4LZU,256
@@ -586,16 +586,16 @@ agno/vectordb/llamaindex/__init__.py,sha256=fgdWIntUOX3n5YEPcPfr-yPb2kvmSy5ngQ5_
586
586
  agno/vectordb/llamaindex/llamaindexdb.py,sha256=CAVZehLSSsA_WBvgWpsj-tBoo60f5SHP9E2FIQqKwLc,6114
587
587
  agno/vectordb/milvus/__init__.py,sha256=I9V-Rm-rIYxWdRVIs6bKI-6JSJsyOd1-vvasvVpYHuE,127
588
588
  agno/vectordb/milvus/milvus.py,sha256=iwceFlXedfb0VveNyNgUWUmd8dY_dqbpdCsgiEvE32M,48444
589
- agno/vectordb/mongodb/__init__.py,sha256=FTF-0sskOk358593xcFsJc4sDb--SwMHo46KLFu3rFM,186
589
+ agno/vectordb/mongodb/__init__.py,sha256=lHIjtTi1h8jaOrMpu_J6LfOVgUaxt1DC6Z7yvyIyWsQ,216
590
590
  agno/vectordb/mongodb/mongodb.py,sha256=jlkhgF5vY33bTIVCI36h3TNOfyTsM5eAMkjjxK2TM4E,59811
591
591
  agno/vectordb/pgvector/__init__.py,sha256=Lui0HBzoHPIsKh5QuiT0eyTvYW88nQPfd_723jjHFCk,288
592
592
  agno/vectordb/pgvector/index.py,sha256=qfGgPP33SwZkXLfUcAC_XgQsyZIyggpGS2bfIkjjs-E,495
593
593
  agno/vectordb/pgvector/pgvector.py,sha256=wYBFewVlBdwGAAy8W5dURPMF351v5JjwMDiyDfZq-58,65235
594
594
  agno/vectordb/pineconedb/__init__.py,sha256=D7iThXtUCxNO0Nyjunv5Z91Jc1vHG1pgAFXthqD1I_w,92
595
595
  agno/vectordb/pineconedb/pineconedb.py,sha256=C41UqMCpRlxBGqpnWS2qXbgYsbaI6mqUR3Gsgqq5vn0,28924
596
- agno/vectordb/qdrant/__init__.py,sha256=x1ReQt79f9aI_T4JUWb36KNFnvdd-kVwZ1sLsU4sW7Q,76
596
+ agno/vectordb/qdrant/__init__.py,sha256=p08df0_Fq_OXTwkTtTZvtEG8pswuVlgFw5sSZ2uHUNg,106
597
597
  agno/vectordb/qdrant/qdrant.py,sha256=lXs5L4pr9adnSaTy1ZyG4pVsFOlv7YcroxQCXTVIaCg,47150
598
- agno/vectordb/redis/__init__.py,sha256=U3al_jFB0_wwkqKhvCLfDGrp3x7nXF8pQPDvTZEMt8w,155
598
+ agno/vectordb/redis/__init__.py,sha256=d083MNjqB2x2UZlrqp_TN7bpIOReLkwEfvtoUosPDpE,185
599
599
  agno/vectordb/redis/redisdb.py,sha256=bBr8qCdJ6UvyqohCwmz-lKbjVq6J8nKvZ90hnUsi040,25830
600
600
  agno/vectordb/singlestore/__init__.py,sha256=Cuaq_pvpX5jsUv3tWlOFnlrF4VGykGIIK5hfhnW6J2k,249
601
601
  agno/vectordb/singlestore/index.py,sha256=p9LYQlVINlZZvZORfiDE3AIFinx07idDHr9_mM3EXAg,1527
@@ -604,7 +604,7 @@ agno/vectordb/surrealdb/__init__.py,sha256=4GIpJZH0Hb42s1ZR0VS5BQ5RhTAaolmS-_rAI
604
604
  agno/vectordb/surrealdb/surrealdb.py,sha256=INhIwK9UdnHmt3qOo5q9h9zzSPs3XVjnuSPVrAfU2fc,24698
605
605
  agno/vectordb/upstashdb/__init__.py,sha256=set3Sx1F3ZCw0--0AeC036EAS0cC1xKsvQUK5FyloFA,100
606
606
  agno/vectordb/upstashdb/upstashdb.py,sha256=AAalti8wCNGikjTE_mDLVQmyuPiNVrY_KFsHiYsGe3M,29307
607
- agno/vectordb/weaviate/__init__.py,sha256=FIoFJgqSmGuFgpvmsg8EjAn8FDAhuqAXed7fjaW4exY,182
607
+ agno/vectordb/weaviate/__init__.py,sha256=rxUek7sFnbohq4n676hOWxnvqhmDNCKg7F9-jFQSDII,212
608
608
  agno/vectordb/weaviate/index.py,sha256=y4XYPRZFksMfrrF85B4hn5AtmXM4SH--4CyLo27EHgM,253
609
609
  agno/vectordb/weaviate/weaviate.py,sha256=cyw1r1a0YyrrJliIk7gZ43GBTlscx4ypV3LhUUom2zc,40638
610
610
  agno/workflow/__init__.py,sha256=XS5WhNIReuf77Ahr5OCUYlpEFZLMRpqBo1GQPVi7L4k,679
@@ -618,8 +618,8 @@ agno/workflow/step.py,sha256=voTmWWihLKDAMeLgYoie96KLCiVpxPFrZoFHEMhA6QM,75046
618
618
  agno/workflow/steps.py,sha256=rbfue2M4qYEkgHueojCY1-cB4i1MFjO-jX6uTxyoKwk,27118
619
619
  agno/workflow/types.py,sha256=t4304WCKB19QFdV3ixXZICcU8wtBza4EBCIz5Ve6MSQ,18035
620
620
  agno/workflow/workflow.py,sha256=rhSqepsIsVBPrNEOMNM70CPJYMl54-hFtwwfmhybGaU,195597
621
- agno-2.3.17.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
622
- agno-2.3.17.dist-info/METADATA,sha256=XXouWutGJG5MmWT2sH3moCH52aHUlWg547f6aZom4lA,31588
623
- agno-2.3.17.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
624
- agno-2.3.17.dist-info/top_level.txt,sha256=MKyeuVesTyOKIXUhc-d_tPa2Hrh0oTA4LM0izowpx70,5
625
- agno-2.3.17.dist-info/RECORD,,
621
+ agno-2.3.19.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
622
+ agno-2.3.19.dist-info/METADATA,sha256=IlVLTueDImpx8R4_Yy0QS2U-eWADRaSW5lkjHCD9H3E,31588
623
+ agno-2.3.19.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
624
+ agno-2.3.19.dist-info/top_level.txt,sha256=MKyeuVesTyOKIXUhc-d_tPa2Hrh0oTA4LM0izowpx70,5
625
+ agno-2.3.19.dist-info/RECORD,,
File without changes