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.0.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.0-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: crewai_infino-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 f54c75cadd391b822a049bb18ab820f050b0234dfd1cbb3cd710f72696dc61e4
MD5 5d546e0e2795994ed214521235cd937a
BLAKE2b-256 0f0e8dd0c02530eba19ac4dc9f5b605ec87d904fdb7c7cb048eca580e91c0957

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: crewai_infino-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.7 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 359d823fed433e0a72f81ebd022a294ff8ab0e3768980a8cca24d6f62ba04bb9
MD5 bffe42bc689a1850a9d5622cd8832186
BLAKE2b-256 8391c7b5590455b0e81f38bda15c3ef5ee601675a068c8ca40eb692561e54cba

See more details on using hashes here.

Provenance

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