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

PyPI Downloads Python License

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 engine 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.

Object storage (S3 / Azure)

Everything runs over any infino.Connection, so local disk and cloud object storage differ only in the URI and storage_options you pass to infino.connect — the index, tools, and knowledge backend are unchanged. Keys are the standard object_store config strings (aws_* / azure_*); ambient credentials (IAM role, env vars) need no storage_options at all.

# Amazon S3 (or S3-compatible: set aws_endpoint, aws_allow_http for MinIO/R2).
conn = infino.connect("s3://bucket/prefix", storage_options={
    "aws_access_key_id": "...",
    "aws_secret_access_key": "...",
    "aws_region": "us-east-1",
})

# Azure Blob Storage.
conn = infino.connect("az://container/prefix", storage_options={
    "azure_storage_account_name": "...",
    "azure_storage_account_key": "...",
})

index = InfinoIndex.create(
    conn, "kb", embed_documents=embed_documents, embed_query=embed_query, dim=384,
)

Pass validate=True to connect to probe the store at connect time so bad credentials fail there rather than on first read.

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.2.tar.gz (22.2 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.2-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file crewai_infino-0.1.2.tar.gz.

File metadata

  • Download URL: crewai_infino-0.1.2.tar.gz
  • Upload date:
  • Size: 22.2 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.2.tar.gz
Algorithm Hash digest
SHA256 d5b3f1b9d177c58431c769209e0fb53e84d8a6169990ec943309514c31393a88
MD5 8d56caaf9a81ec89ea11fbda7fd7ddbe
BLAKE2b-256 94f7f805c752fe7c66174df1a06884fb4fc68ea089f4c26458c0f2d10ffd4982

See more details on using hashes here.

Provenance

The following attestation bundles were made for crewai_infino-0.1.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: crewai_infino-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for crewai_infino-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 af5816841877196b1f2b4b63b2a4e9c89266f76f8b53bc4bd389eb2238d04352
MD5 3f994c36320178781d613949b2ddf8bf
BLAKE2b-256 f928393b0d759140bb864701b49203f7f10cbcb4eadc3da64477a3b6e03578ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for crewai_infino-0.1.2-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