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
- Docs: https://api.ragfly.ai/docs
- Site: https://ragfly.ai
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b62b12ba38a307751846044a29630b2d5bf1f14d1521c0d126fa8c04dcfdf9c
|
|
| MD5 |
e785728f0b283f06877fe8ae328cd5bc
|
|
| BLAKE2b-256 |
7b2f7c2f82de952938740c8c130b5296ac0d6ad78496d319e480c7d2772ba560
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
710c4247c564216b8dee7dc4b6e1fae54b60782b24ed4d08d7e72193ffe96cbb
|
|
| MD5 |
6a65506548df8c368371cfd4c7c33e2d
|
|
| BLAKE2b-256 |
7cf4bdbdaad5357b9e5dc6d79c47d5739f8a10f50e4a911bae06c117be4bed75
|