Skip to main content

CrewAI integration for Infino — vector, BM25, hybrid, and SQL retrieval as agent tools over one engine on object storage.

Project description

crewai-infino

CrewAI integration for Infino — give your agents semantic (vector), full-text (BM25), hybrid, and SQL retrieval as tools over one store on object storage. No second vector DB, no separate metadata store, no client-side fusion: one Infino table answers all four ways, and the agent picks the right one at runtime.

pip install crewai-infino

Agent in minutes

Build and populate a table with InfinoIndex, then hand its tools to an agent:

import infino
from crewai import Agent, Task, Crew
from crewai_infino import InfinoIndex

# Your embedding model — any callables that turn text into vectors.
# (e.g. sentence-transformers; dim must match.)
from my_embeddings import embed_documents, embed_query  # -> list[list[float]] / list[float]

conn = infino.connect("./infino-data")
index = InfinoIndex.create(
    conn, "kb",
    embed_documents=embed_documents, embed_query=embed_query, dim=384,
)
index.add_texts(
    ["Reset the X200 by holding power for 10s.", "Error E-507 means a stale cache."],
    metadatas=[{"product": "X200"}, {"product": "X200"}],
)

analyst = Agent(
    role="Support Analyst",
    goal="Answer customer questions from the knowledge base",
    backstory="You retrieve before you answer.",
    tools=index.as_tools(),          # semantic + keyword + hybrid + SQL, over one store
)

crew = Crew(agents=[analyst], tasks=[
    Task(description="How do I fix error E-507 on the X200?",
         expected_output="A concise fix.", agent=analyst),
])
print(crew.kickoff())

The tools

index.as_tools() (or infino_tools(searcher)) returns four crewai.tools.BaseTools:

Tool Backed by Use for
InfinoSemanticSearchTool vector kNN intent / how-to / paraphrased questions
InfinoKeywordSearchTool BM25 (mode="and" default) exact codes, SKUs, names, error strings
InfinoHybridSearchTool BM25 + vector fused by RRF, one SQL call strong default — exact and semantic
InfinoSQLTool query_sql point lookups, GROUP BY aggregates, joins

Attach individual tools to different agents, or the whole set to one. The package bundles no embedding model — you pass embed callables, so you keep full control of the model (and the examples stay key-free with a local one).

Knowledge

Use Infino as a CrewAI knowledge backend so a crew auto-grounds its answers — no explicit tool call. InfinoKnowledgeStorage stores knowledge chunks in one Infino table and retrieves them by vector similarity:

from crewai import Crew
from crewai.knowledge.source.string_knowledge_source import StringKnowledgeSource
from crewai_infino import InfinoKnowledgeStorage

storage = InfinoKnowledgeStorage(
    connection=conn, embed_documents=embed_documents,
    embed_query=embed_query, dim=384,
)
source = StringKnowledgeSource(content="Error E-507 means a stale cache.")
crew = Crew(agents=[...], tasks=[...],
            knowledge_sources=[source], knowledge_storage=storage)

Lower-level API

  • InfinoIndex — create / open a table, add_texts, delete, as_tools().
  • InfinoSearcher — the read path: .semantic(), .keyword(), .hybrid(), .sql() returning plain row dicts. The tools are thin wrappers over it.

The table schema matches langchain-infino, so a table built by one adapter is queryable by the other.

Status

Tools and the Knowledge storage backend (InfinoKnowledgeStorage) are the shipping surface. CrewAI Memory (durable agent memory) is planned next, targeting CrewAI's RAGStorage seam. The knowledge backend implements CrewAI's BaseKnowledgeStorage, which is 1.x-only — hence the crewai>=1.0 floor.

Development

make install     # editable install with test + lint extras
make unit        # engine-free unit tests
make integration # full suite against the engine
make lint type   # ruff + mypy

Apache-2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crewai_infino-0.1.0rc2.tar.gz (21.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crewai_infino-0.1.0rc2-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file crewai_infino-0.1.0rc2.tar.gz.

File metadata

  • Download URL: crewai_infino-0.1.0rc2.tar.gz
  • Upload date:
  • Size: 21.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for crewai_infino-0.1.0rc2.tar.gz
Algorithm Hash digest
SHA256 08d1eee5d724da6143a5f5d9a83781d0e71d30e3b2a10a3d17a7dbd1471dd852
MD5 d8a08bc86fb1febd2bc6bea445f0dc4f
BLAKE2b-256 5d0b5b77adfc3090852cd271e0b1930b74b74834a3a5a3333653e2ee31ce8017

See more details on using hashes here.

Provenance

The following attestation bundles were made for crewai_infino-0.1.0rc2.tar.gz:

Publisher: publish.yml on infino-ai/crewai-infino

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file crewai_infino-0.1.0rc2-py3-none-any.whl.

File metadata

File hashes

Hashes for crewai_infino-0.1.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 6f2542511aa9bff92ffb03fe685d2151422621a721153f5dd2dd1ba5927b9ad8
MD5 f4dbb9cebabb3edcf41bb0728502c5a4
BLAKE2b-256 79790b9e5f1ab1da8c7c3b170ea82d18f16ec6c42adf141dfe33546237c12f1c

See more details on using hashes here.

Provenance

The following attestation bundles were made for crewai_infino-0.1.0rc2-py3-none-any.whl:

Publisher: publish.yml on infino-ai/crewai-infino

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page