Local mode can point at your own Ollama runtime on the same machine. Hosted setups can still be useful when you want speed or remote access, but the tradeoff should stay visible.
ROK is the AI workspace for work you want to keep yours.
ROK is built around control. Sessions stay in browser storage on this device by default, you can switch between hosted and local runtimes, and the product should tell you clearly when work stays here and when it leaves your machine.
Getting Started
Use this as the shortest path to understanding how ROK is meant to be used.
ROK works best when the conversation, draft text, and project files stay in the same session instead of living in separate tools.
Use normal chat for discussion, ROK CODE for file-based work, and ROK MATH for graphing or algebra help.
ROK CODE is meant to propose changes in a reviewable way. Inspect the plan, preview the files, then apply only when the request looks right.
Core Surfaces
General prompting, drafting, explanation, troubleshooting, and back-and-forth thinking.
An editable writing surface where you can draft, improve, copy, and download content in context.
Upload files, ask for changes, review a file-by-file plan, and apply or undo the last AI apply.
A graphing-oriented surface for algebra help, expressions, and visual math workflows.
Attach screenshots, images, and common text/code files so the session can reference real material.
An experimental image workflow that fits inside the broader workspace instead of living as a separate app.
ROK is strongest when you are building or figuring something out over a longer session, especially when code, notes, files, and iteration all matter at once.
How ROK Works
Intent-driven behavior
ROK looks at the prompt, the active workspace, recent messages, and attachments to decide how to respond. You do not need a slash-command system to switch between normal chat, study help, code work, or document assistance.
Persistent local sessions
The default experience keeps session history in browser storage on the current device, which makes it feel more like a personal working environment than a disposable prompt tab.
Model-aware UI
The app can expose different model options and runtime limits through the backend, while keeping the surface consistent for the user.
Plan-first coding flow
ROK CODE is built around reviewable proposals instead of silent edits. The goal is readable change plans, visible file impact, and safer apply behavior.
Privacy and Storage
What stays local by default
- Chat sessions are stored in browser local storage on the current device.
- Session-level preferences such as model choice and onboarding state are also stored locally.
- Local runtime setups can point at services running on the same machine.
What may leave the device
- Hosted model requests obviously travel to the configured backend or provider.
- Uploaded prompts, files, or images may be sent to the selected AI runtime to generate a response.
- Public tunnel or hosted deployments should be treated as networked environments, not offline mode.
ROK's privacy model is about disclosure and choice. Local-first does not mean every deployment is offline; it means you should be able to tell what stays here, what leaves the device, and why.
FAQ
Is ROK fully offline?
No. Hosted providers, remote endpoints, and tunnels still require network access. Use a local runtime when you want requests to stay on your machine, and treat hosted deployments as networked environments.
Where are my chats stored by default?
On this browser, on this device, using local storage unless you build a different persistence layer around it.
What is the main difference between chat and ROK CODE?
Chat is for discussion and reasoning. ROK CODE is for file-based work where the assistant proposes concrete code changes that you can review before applying.
Can I switch models per session?
Yes. Model selection is part of the session experience and is remembered locally on the current device.
Roadmap
- Sharper workspace identity: make the product feel more like one serious workstation.
- Stronger privacy controls: clearer runtime badges, better disclosure, and safer local storage defaults.
- Cleaner onboarding: better setup guidance for local, hosted, and mixed deployments.
- Community-ready foundations: make self-hosting and user-controlled setups easier to understand and trust.
API Access
ROK exposes an API for external integrations. During beta, API keys are manually reviewed. Use your key in
X-ROK-API-Key when you are not already in a trusted browser session.
https://rokbackendreal.kyklos.online
Keys can include request caps. When a key reaches its assigned limit, protected endpoints can return
429 with {"error":"API key request limit exceeded"}.
Main Endpoints
| Method | Path | Description |
|---|---|---|
POST |
/api/chat |
Streaming chat responses over SSE. |
POST |
/api/intent |
Intent classification for a message and workspace context. |
POST |
/api/sandbox |
ROK CODE analysis that returns a file-by-file change plan. |
GET |
/api/models |
Available models, default model, and tool-calling capabilities. |
GET |
/api/client-config |
Client limits, auth config, and quota metadata. |
GET |
/api/health |
Health check endpoint. |
/api/chat Request Body
| Field | Type | Required | Description |
|---|---|---|---|
message |
string | Yes | The latest user prompt. |
history |
array | Yes | Conversation history as role/content objects. |
model |
string | No | Requested model id for the session. |
workspace_context |
string | No | Optional workspace text to include alongside the prompt. |
attachments |
array | No | Optional file or image attachments. |
enable_thinking |
boolean | No | Enables reasoning mode where the chosen model supports it. |
enable_web_search |
boolean | No | Requests web-augmented responses when enabled. |
skip_tools |
boolean | No | Skips tool-calling behavior. |
tools |
array | No | OpenAI-style function definitions for client-side tool execution. |
Authentication Errors
| Status | Meaning |
|---|---|
401 |
Missing API key when a trusted browser context is not present. |
403 |
Invalid key or blocked request context. |
429 |
Rate limit or per-key usage cap reached. |
Code Examples
JavaScript SSE Example
async function runRokChat() {
const response = await fetch("https://rokbackendreal.kyklos.online/api/chat", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Accept": "text/event-stream",
"X-ROK-API-Key": "YOUR_KEY"
},
body: JSON.stringify({
message: "Summarize this error log in 3 bullets.",
history: []
})
});
if (!response.ok) throw new Error(`Request failed (${response.status})`);
const reader = response.body.getReader();
const decoder = new TextDecoder();
let pending = "";
while (true) {
const { value, done } = await reader.read();
if (done) break;
pending += decoder.decode(value, { stream: true });
const blocks = pending.split("\\n\\n");
pending = blocks.pop() || "";
for (const block of blocks) {
for (const line of block.split("\\n")) {
if (!line.startsWith("data:")) continue;
const payload = JSON.parse(line.slice(5).trim());
if (typeof payload.token === "string") {
console.log(payload.token);
}
}
}
}
}
Python SSE Example
import json
import requests
with requests.post(
"https://rokbackendreal.kyklos.online/api/chat",
headers={
"Content-Type": "application/json",
"Accept": "text/event-stream",
"X-ROK-API-Key": "YOUR_KEY",
},
json={"message": "Explain this stack trace.", "history": []},
stream=True,
timeout=(10, 300),
) as response:
response.raise_for_status()
for raw_line in response.iter_lines(decode_unicode=True):
if not raw_line or not raw_line.startswith("data:"):
continue
payload = json.loads(raw_line[5:].strip())
token = payload.get("token", "")
if token:
print(token, end="", flush=True)
cURL Example
curl -N -X POST "https://rokbackendreal.kyklos.online/api/chat" \
-H "Content-Type: application/json" \
-H "Accept: text/event-stream" \
-H "X-ROK-API-Key: YOUR_KEY" \
-d '{"message":"Refactor this function and explain why.","history":[]}'
Tool Calling
ROK supports client-side tool calling in an OpenAI-style function format. The model can suggest a tool call, but your client is responsible for executing that tool and sending the result back through conversation history.
The backend does not execute your custom tools for you. It emits tool call suggestions and leaves execution to the caller.
Basic Flow
- Send
/api/chatwith atoolsarray. - Parse any emitted
tool_callsevent from the SSE stream. - Run the tool locally in your own client application.
- Send a follow-up request with the tool result included in
history.
Tool Definition
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get current weather",
"parameters": {
"type": "object",
"properties": {
"location": {"type": "string"}
},
"required": ["location"]
}
}
}
SSE Event Example
data: {"tool_calls":[{"id":"call_abc123","type":"function","function":{"name":"get_weather","arguments":"{\"location\":\"NYC\"}"}}],"assistant_content":""}
Follow-Up History Example
{
"message": "",
"history": [
{"role": "user", "content": "What's the weather in NYC?"},
{"role": "assistant", "content": "", "tool_calls": [
{"id": "call_abc123", "type": "function", "function": {"name": "get_weather", "arguments": "{\"location\":\"NYC\"}"}}
]},
{"role": "tool", "name": "get_weather", "tool_call_id": "call_abc123", "content": "{\"temp\":72,\"condition\":\"sunny\"}"}
],
"tools": [ ... ]
}
Limits
| Limit | Value |
|---|---|
| Max tools per request | 100 |
| Max tool name length | 64 characters |
| Max tool description length | 512 characters |
| Max parameters schema size | 4096 characters |
| Max tool result content | 50,000 characters |
Contributing
Good contributions are focused, testable, and tied to the actual product direction. That usually means docs improvements, reproducible bug reports, UX cleanup, or scoped feature work that strengthens the workspace.
- Start small and make the change easy to evaluate.
- When changing behavior, explain the user-facing impact clearly.
- When proposing architecture shifts, describe the migration cost and why it is worth it.