Skip to main content

RAGfly Python SDK

Official Python client for RAGfly — retrieval infrastructure for your AI agents.

Using TypeScript/JavaScript? See the TypeScript SDK (npm install @ragfly/sdk) — same surface.

Install

pip install ragfly

Quick start

from ragfly import RAGfly

client = RAGfly(api_key="slm_live_...")

# Ask a question (RAG end-to-end)
resp = client.ask("What are the Q1 sales figures?")
print(resp.answer)

# Streaming
for chunk in client.ask("Summarize active contracts", stream=True):
    print(chunk.delta, end="", flush=True)

# Semantic search (retrieval only)
results = client.search("maintenance contracts", limit=5)
for doc in results.documents:
    print(doc.nombre, doc.similitud_max)

API Keys

Generate an API key from app.ragfly.ai → Settings → API Keys.

Methods

Method Description
client.ask(question, *, stream=False, conversation_id=None) RAG end-to-end: retrieve + generate
client.search(query, *, limit=10, min_similitud=0.0) Hybrid retrieval (vector + lexical + rerank)
client.list_documents(*, page=1, page_size=20) List corpus documents

Links

Download files

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

Source Distribution

ragfly-0.2.0.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

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

ragfly-0.2.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file ragfly-0.2.0.tar.gz.

File metadata

  • Download URL: ragfly-0.2.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ragfly-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4b62b12ba38a307751846044a29630b2d5bf1f14d1521c0d126fa8c04dcfdf9c
MD5 e785728f0b283f06877fe8ae328cd5bc
BLAKE2b-256 7b2f7c2f82de952938740c8c130b5296ac0d6ad78496d319e480c7d2772ba560

See more details on using hashes here.

File details

Details for the file ragfly-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: ragfly-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ragfly-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 710c4247c564216b8dee7dc4b6e1fae54b60782b24ed4d08d7e72193ffe96cbb
MD5 6a65506548df8c368371cfd4c7c33e2d
BLAKE2b-256 7cf4bdbdaad5357b9e5dc6d79c47d5739f8a10f50e4a911bae06c117be4bed75

See more details on using hashes here.

Supported by

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