> For the complete documentation index, see [llms.txt](https://ravenprotocol.gitbook.io/ravenverse/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ravenprotocol.gitbook.io/ravenverse/ravjs.md).

# RavJS

Javascript client library to retrieve and calculate operations

## Setup

### Clone

```
git clone https://github.com/ravenprotocol/ravjs.git
```

### Configure

* In `ravjs/raven.js` file update the `CID` variable to a unique string before opening a new client.

  const cid = "\<unique\_client\_id>"
* Point RAVSOCK\_SERVER\_URL to ravsock. It can be your local ravsock running on your local device.

  const RAVSOCK\_SERVER\_URL = "localhost" // local ravsock server or const RAVSOCK\_SERVER\_URL = "\<ravsock\_server\_url>" //remote ravsock server

### Start

* Open `worker.html` in a new browser tab to connect to ravsock
* Once connected, click on `Participate` button. This triggers the execution of a local client benchmarking code and returns its results to the server. The server utilizes this data for optimizing the scheduling algorithm.

The client will now dynamically receive groups of Ops from the server, compute them and return the results back to the server.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ravenprotocol.gitbook.io/ravenverse/ravjs.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
