An async-first Python SDK for interacting with the RAGFlow API.
Provides clean, typed, and production-ready access to RAGFlow features such as:
- Dataset & document management
- Document chunking & ingestion
- File & folder management
- Knowledge Graph (GraphRAG)
- Background tasks (parsing, knowledge construction)
- Chat & Agent sessions with streaming (SSE) support
This SDK version 0.1.x supports the following RAGFlow versions:
| SDK Version | RAGFlow Version | Support Level | Notes |
|---|---|---|---|
| 0.1.x | >= 0.22 | Fully tested | |
| 0.1.x | 0.21 and earlier | Partial / untested |
Requires Python 3.10+.
pip install ragflow-async-sdkAll operations in the RAGFlow SDK are asynchronous. To use the SDK, first initialize the client and then run async calls inside Python's asyncio event loop.
from ragflow_async_sdk import AsyncRAGFlowClient
client = AsyncRAGFlowClient(
server_url="http://your-ragflow-address",
api_key="YOUR_API_KEY",
)import asyncio
async def main():
# Example: Health check
system_health = await client.systems.healthz()
print(system_health.status)
# Run the async main function
asyncio.run(main())If you encounter any issues or have suggestions, please feel free to open an issue.
Contributions are always welcome! You can submit pull requests or propose improvements via GitHub.
Apache License 2.0
See the LICENSE file for details.