Skip to main content
Once your RAG Server is successfully launched and deployed, the final step is to test the integration and start querying your data.

Verify the Server Status

You can verify that your server is running correctly by hitting its health check endpoint. If you deployed your server locally on port 8080, simply navigate to or curl the following URL:
curl http://localhost:8080/api/health
A healthy server will return a 200 OK status with a confirmation message. Alternatively, you can view the interactive Scalar API documentation by visiting the server’s root URL:
Scalar API Documentation

Connecting via SDK

The easiest way to interact with your new RAG backend is by using the official LarkupRAG SDKs. They provide a type-safe, developer-friendly interface to query your documents.

TypeScript / JavaScript Integration

Install the SDK via npm, yarn, or pnpm:
npm install @larkup/rag-sdk
Initialize the client by passing the URL of your newly deployed RAG server:
import { LarkupClient } from '@larkup/rag-sdk';

// Point the client to your server's URL
const client = new LarkupClient({
  baseUrl: 'http://localhost:8080' // Or your production URL
});

async function runQuery() {
  const response = await client.query({
    text: "What are the core features of LarkupRAG?",
    limit: 5 // number of documents to retrieve
  });

  console.log("Retrieved Documents:", response.documents);
}

runQuery();

Python Integration

Install the SDK via pip:
pip install larkup-rag-sdk
Connect to your server using Python:
from larkup_rag import LarkupClient

# Initialize the client
client = LarkupClient(base_url="http://localhost:8080")

# Query your RAG server
response = client.query(
    text="What are the core features of LarkupRAG?",
    limit=5
)

for doc in response.documents:
    print(doc.content)

Next Steps

Now that your backend is up and running and you can successfully fetch relevant documents, you are ready to plug these retrieved contexts directly into an LLM using tools like the Vercel AI SDK, LangChain, or any standard inference pipeline.