Install
openclaw skills install ragie-ragExecute Retrieval-Augmented Generation (RAG) using Ragie.ai. Use this skill whenever the user wants to: - Search their knowledge base - Ask questions about u...
openclaw skills install ragie-ragThis skill enables grounded question answering using Ragie.ai as a RAG backend.
Ragie handles:
The agent handles:
document_name when referencing specific facts."I don't have that information in the current knowledge base."
IF the user provides:
THEN:
Execute ingestion:
python `skills/scripts/ingest.py` --file <path> --name "<document_name>"
OR
python `skills/scripts/ingest.py` --url "<url>" --name "<document_name>"
Capture returned document_id.
Poll document status:
python `skills/scripts/manage.py` status --id <document_id>
Repeat until status == ready.
Proceed to Retrieval (Case C).
python `skills/scripts/manage.py` list
python `skills/scripts/manage.py` status --id <document_id>
python `skills/scripts/manage.py` delete --id <document_id>
Return structured results to the user.
Execute:
python `skills/scripts/retrieve.py` \
--query "<user_question>" \
--top-k 6 \
--rerank
Optional flags:
--partition <name>--filter '{"key":"value"}'Expected output:
[
{
"text": "...",
"score": 0.87,
"document_name": "Policy Handbook",
"document_id": "doc_abc123"
}
]
After retrieval:
text.SYSTEM:
You are a helpful assistant.
Answer using ONLY the context provided below.
If the context does not contain the answer, say:
"I don't have that information in the current knowledge base."
CONTEXT:
[chunk 1 text]
---
[chunk 2 text]
---
...
USER QUESTION:
{original user question}
document_name when referencing information.The final response MUST:
document_name for factual claimsIf no chunks are returned:
I don't have that information in the current knowledge base.
Base URL:
https://api.ragie.ai
| Operation | Method | Endpoint |
|---|---|---|
| Ingest file | POST | /documents |
| Ingest URL | POST | /documents/url |
| Retrieve chunks | POST | /retrievals |
| List documents | GET | /documents |
| Get document | GET | /documents/{id} |
| Delete document | DELETE | /documents/{id} |
| HTTP Code | Meaning | Action |
|---|---|---|
| 404 | Document not found | Verify document_id |
| 422 | Invalid payload | Validate request schema |
| 429 | Rate limited | Retry with backoff |
| 5xx | Server error | Retry or check Ragie status |
If ingestion fails:
If retrieval fails:
filter to narrow retrieval scope.recency_bias only when time relevance matters.top_k depending on query complexity..env must not be committed.This skill provides:
End of Skill.