# Send Ragie.ai-RAG to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "ragie-rag",
    "name": "Ragie.ai-RAG",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/Hatim-BE/ragie-rag",
    "canonicalUrl": "https://clawhub.ai/Hatim-BE/ragie-rag",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/ragie-rag",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=ragie-rag",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "scripts/ingest.py",
      "scripts/manage.py",
      "scripts/retrieve.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "ragie-rag",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T22:00:04.659Z",
      "expiresAt": "2026-05-14T22:00:04.659Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=ragie-rag",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=ragie-rag",
        "contentDisposition": "attachment; filename=\"ragie-rag-1.0.2.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "ragie-rag"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/ragie-rag"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/ragie-rag",
    "downloadUrl": "https://openagent3.xyz/downloads/ragie-rag",
    "agentUrl": "https://openagent3.xyz/skills/ragie-rag/agent",
    "manifestUrl": "https://openagent3.xyz/skills/ragie-rag/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/ragie-rag/agent.md"
  }
}
```
## Documentation

### Ragie.ai RAG Skill (OpenClaw Optimized)

This skill enables grounded question answering using Ragie.ai as a RAG backend.

Ragie handles:

Document chunking
Embedding
Vector indexing
Retrieval
Optional reranking

The agent handles:

Deciding when to ingest
Triggering retrieval
Constructing grounded prompts
Producing final answers

### Core Principles

Never answer without retrieval.
Never hallucinate information not present in retrieved chunks.
Always cite the document_name when referencing specific facts.
If retrieval returns zero relevant chunks, explicitly say:

"I don't have that information in the current knowledge base."


Do not expose API keys or raw API payloads in final answers.

### Case A — User Provides a File or URL

IF the user provides:

A file
A document path
A PDF/URL to ingest

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).

### List documents

python \`skills/scripts/manage.py\` list

### Check document status

python \`skills/scripts/manage.py\` status --id <document_id>

### Delete a document

python \`skills/scripts/manage.py\` delete --id <document_id>

Return structured results to the user.

### Case C — Retrieval (Grounded Question Answering)

Execute:

python \`skills/scripts/retrieve.py\` \\
  --query "<user_question>" \\
  --top-k 6 \\
  --rerank

Optional flags:

--partition <name>
--filter '{"key":"value"}'

### Retrieval Output Format

Expected output:

[
  {
    "text": "...",
    "score": 0.87,
    "document_name": "Policy Handbook",
    "document_id": "doc_abc123"
  }
]

### Grounded Prompt Construction

After retrieval:

Extract all chunk text.
Concatenate with separators.
Construct this prompt:

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}

Generate final answer.
Cite document_name when referencing information.

### Output Contract

The final response MUST:

Be grounded only in retrieved chunks
Cite document_name for factual claims
Avoid hallucinations
Avoid mentioning internal execution steps
Avoid exposing API keys or raw responses
Clearly state when information is missing

If no chunks are returned:

I don't have that information in the current knowledge base.

### API Reference

Base URL:

https://api.ragie.ai

OperationMethodEndpointIngest filePOST/documentsIngest URLPOST/documents/urlRetrieve chunksPOST/retrievalsList documentsGET/documentsGet documentGET/documents/{id}Delete documentDELETE/documents/{id}

### Error Handling

HTTP CodeMeaningAction404Document not foundVerify document_id422Invalid payloadValidate request schema429Rate limitedRetry with backoff5xxServer errorRetry or check Ragie status

If ingestion fails:

Report failure clearly.
Do not proceed to retrieval.

If retrieval fails:

Retry once.
If still failing, inform user.

### Decision Rules Summary

If user uploads content → ingest → wait until ready → retrieve.
If user asks question → retrieve immediately.
If zero chunks → state knowledge gap.
Always use reranking unless explicitly disabled.
Never answer without retrieval.

### Advanced Usage

Use metadata filter to narrow retrieval scope.
Use partitions to separate tenant data.
Use recency_bias only when time relevance matters.
Adjust top_k depending on query complexity.

### Security

API keys must be loaded from environment variables.
.env must not be committed.
Do not log sensitive headers.

### Summary

This skill provides:

Deterministic ingestion
Deterministic retrieval
Strict grounded answering
Complete Ragie lifecycle management
Safe and hallucination-resistant RAG execution

End of Skill.
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: Hatim-BE
- Version: 1.0.2
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-07T22:00:04.659Z
- Expires at: 2026-05-14T22:00:04.659Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/ragie-rag)
- [Send to Agent page](https://openagent3.xyz/skills/ragie-rag/agent)
- [JSON manifest](https://openagent3.xyz/skills/ragie-rag/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/ragie-rag/agent.md)
- [Download page](https://openagent3.xyz/downloads/ragie-rag)