Documentation

Complete technical documentation for the Laintas product suite. Installation, API reference, configuration guides, and best practices.

Pricing

$0Free

Pay-as-you-go

  • · Helpwo: $3.96/$7.91 per 1M tokens
  • · Kline-de-pre: $1/call
  • · Laintas CLI: Free
  • · PPOS: $1/review · 5 MB
$19.9Pro

/mo · Single product

  • · Helpwo: 10,000/mo
  • · CLI: 12,000/mo
  • · Laintas Search: 20,000/mo
  • · Laintas Fin: 40 shared/mo
$49.9Gen

/mo · All products

  • · Helpwo: 10,000/mo · CLI: 12,000/mo
  • · Search: 10,000/mo · Fin: 30 shared/mo
  • · PPOS: 2,000/mo · 50 MB
  • · Includes future products
View full pricing →

Kline-de-pre

Web · Node.js 18+Open Source

AI-powered candlestick volatility & scenario tool. Built on a HAR-RV volatility + diffusion generator dual-model pipeline with screenshot-to-K-line recognition, a volatility uncertainty cone, and future scenario sampling (forecasts the volatility range, not direction). Open source with self-deployment; online service is pay-per-use ($1/call).

Visit Product

Kline-de-pre is an AI-powered candlestick volatility & scenario tool. Upload a K-line screenshot from any trading platform — the system uses OpenCV computer vision to detect candlestick bodies, a HAR-RV model to estimate future volatility and draw a 50/80/95% uncertainty cone, and a diffusion generator to sample plausible future candle scenarios. It forecasts the future volatility range and scenarios, not up/down direction (raw candles carry no reliable directional signal at short horizons). The code is open source for self-deployment; the hosted version is available through the Laintas platform.

Core Capabilities

CapabilityDescription
Image → OHLCOpenCV.js screenshot recognition, reconstructing OHLC data from the image
Volatility (HAR-RV)HAR-RV model estimates next-60-min volatility from three-scale realized volatility and draws the 50/80/95% uncertainty cone
Scenario GeneratorDiffusion generator (built-in GAF-CNN encoder) samples future candle scenarios, scaled to the predicted volatility
MarketWatchBackend service auto-fetches BTC data hourly and refreshes the global volatility cone & scenarios
Live TradingServer-side shared trading account: an AI host checks TP/SL and makes trade decisions every 15 min based on predictions; all viewers see the same account and can chat (paid).

Inference Pipeline (3 stages)

1Image Detection (OpenCV.js) — Load screenshot → HSV color space → green/red mask extraction → contour detection → projection-based OHLC reconstruction, outputting pixel-space statistics (std/base).
2Volatility Estimation (HAR-RV) — From the window's 1m/5m/15m three-scale realized volatility, a linear HAR-RV model predicts the next-60-min volatility scale ŝ (out-of-sample R²≈0.56 on 1M BTC bars). The 50/80/95% uncertainty cone is then drawn, widening as √(k/60) (Brownian).
3Scenario Generation (Diffusion Generator) — 60 candles become a 12-channel GAF feature [1,12,60,60] fed to the generator's built-in CNN encoder. Conditioned on ŝ, the generator samples in shape space via DDIM reverse diffusion, reconstructed as ghost = last + ŝ·shape scenario candles. Sampling calibration: ~0.76 band coverage, ~1.0 total-variation ratio (realistic shapes, no mean-collapse).

Dual Runtime Architecture

The browser only does what you can see: screenshot detection (OpenCV.js) and the GAF feature preview. All inference runs on the server — model weights are never shipped to the browser; the page gets the volatility cone and scenarios from /api/v1/infer (billed per call, login required). Server-side (MarketWatch.cjs): an Express + node-cron backend runs the same pipeline via ONNX Runtime Node and refreshes the global cone & scenarios on a schedule; the MarketWatch page fetches results from /api/latest-prediction.

Risk Disclaimer

All predictions are probabilistic extrapolations of historical patterns, for reference only, and do not constitute investment advice. Financial markets are highly uncertain — always apply your own judgment with fundamentals and risk management.

Quick Start

Prerequisites

DependencyRequirement
Node.jsVersion 18 or later (with npm)
GitFor cloning the repository
BrowserChrome / Firefox / Edge with WebGL support

Install & Run

1. Clone and install dependencies

git clone https://github.com/lin7c/kline_de_pre.git cd Kline-de-pre npm install

2. Place the model files (server-side only)

Put kline_generator.onnx (generator) and har_coef.json (HAR volatility coefficients) under server-models/not under public/, which would publish them as static assets. Self-deployments must supply their own weights.

3. Start the frontend dev server

npm run dev

Runs at http://localhost:5173 by default. Open it in a browser to use AI prediction.

4. (Optional) Start the backend prediction service

node MarketWatch.cjs

Runs on port 5000, fetching BTC data and running AI inference at the top of every hour. Results are served at /api/latest-prediction for the MarketWatch page. Make sure the /api proxy in vite.config.js points to localhost:5000.

Usage Flow

1Open the home page (PredictorPage), click upload and select a clear K-line screenshot
2The system auto-runs OpenCV.js to detect candlestick bodies in the image
3Click "Estimate Volatility" to run HAR-RV and draw the 50/80/95% uncertainty cone
4Click "Generate Scenarios" to run the generator and sample plausible future candle scenarios
5Use scroll-wheel zoom and drag-pan on the Canvas chart to explore predictions
6Switch to the MarketWatch page to see real-time BTC data with hourly AI prediction overlay

API Reference

Backend Prediction Endpoint

GET/api/latest-prediction

Served by MarketWatch.cjs (Express 5 backend, port 5000). The full BTC inference pipeline runs at the top of each hour, updating the global prediction cache. The frontend can poll for the latest result at any time. No authentication required.

Success Response (200)

{ "aiResult": [ { "type": "ai_trend", "data": [{ "time": 1702..., "value": 67890.12 }, ...] }, { "type": "vol_cone", "data": [ { "name": "95", "upper": [{ "time": 1702..., "value": 68210 }, ...], "lower": [...] }, { "name": "80", "upper": [...], "lower": [...] }, { "name": "50", "upper": [...], "lower": [...] } ]}, { "type": "full", "data": [ { "time": 1702..., "open": 67901, "high": 67950, "low": 67880, "close": 67920 }, ... ]} ], "anchorTime": 1702000000, "startPrice": 67850.00, "serverTime": 1702000300000 }

Response Fields

FieldTypeDescription
aiResult[type=ai_trend]arrayCone midline points (≈ current price, center of the symmetric cone), each with time (Unix seconds) and value (price)
aiResult[type=vol_cone]arrayVolatility uncertainty cone: 3 nested bands (name=95/80/50), each with per-point upper/lower arrays that widen over time
aiResult[type=full]arrayOne generator-sampled future OHLC scenario candlestick array
anchorTimenumberPrediction anchor time (timestamp of the last known candle, Unix seconds)
startPricenumberPrediction start price (close price of the last known candle)
serverTimenumberUnix millisecond timestamp when the prediction was generated

Error Responses

StatusMeaningHow to Handle
503Server initializing (model loading takes ~10–30 s on first startup)Poll and retry from the frontend

FAQ

What AI models does Kline-de-pre use?

Two models: (1) Model 1 HAR-RV — a pure linear volatility model (4 coefficients in a server-side har_coef.json) that predicts the next-60-min volatility scale ŝ from three-scale realized volatility, out-of-sample R²≈0.56; (2) Model 2 generator kline_generator.onnx — a built-in GAF-CNN encoder + conditional diffusion UNet that, conditioned on ŝ, samples future candle scenarios via DDIM. The generator is exported to ONNX and runs server-side only (ONNX Runtime Node, CPU) — the weights are not published and cannot be downloaded.

How accurate are the predictions? What does "for reference only" mean?

Financial markets are highly uncertain and stochastic. This system forecasts the future volatility range, NOT up/down direction — raw candles carry no reliable directional signal at short horizons, so the system honestly outputs a symmetric uncertainty cone and scenarios rather than buy/sell signals. The volatility part has an out-of-sample R²≈0.56 (genuine predictive power), but results remain a probabilistic extrapolation of historical patterns and do NOT constitute investment advice. Real trading decisions should incorporate fundamentals, market sentiment, and risk management.

What types of K-line screenshots are supported?

The system extracts green (up) and red (down) pixel regions via HSV color space, so any chart with green-up/red-down coloring works. Upload clear, unobstructed screenshots at 800×600+ resolution for best results. Transparent or non-black backgrounds are auto-filled with a black canvas.

How often does the backend prediction update?

MarketWatch.cjs uses node-cron to run the full BTC inference pipeline at the top of every hour (0 * * * *), and also runs initial inference on startup. The MarketWatch frontend refreshes market data every 5 seconds and fetches the latest AI prediction 10 seconds after each new hour.

Can I use it for other trading pairs?

MarketWatch.cjs is currently hardcoded for BTC/USD via the CryptoCompare API. To support other pairs, modify the API request URL in MarketWatch.cjs. The frontend screenshot detection works for any K-line chart regardless of the trading pair.

What is the GAF transform and why is it needed?

GAF (Gramian Angular Field) encodes 1D time series as 2D images. This system uses the GASF (Summation) variant, converting 60 candles × 12 channels of multi-timeframe data (1m/5m/15m, OHLC each) into [60,60] matrices, fed to the generator's built-in CNN encoder to provide morphological context of the current regime for scenario generation.

Can I download the model weights? Why does prediction need a connection?

No. The weights live only in a server-side directory, are not part of the frontend build, and every /models/ path on the site returns 404. So the AI prediction page always calls the cloud inference endpoint (billed per call, login required) — there is no local in-browser inference mode anymore, and everyone is served by the same up-to-date model.

How much does Kline-de-pre cost?

The live and market-watch pages are free to watch, with no time limit — that forecast is computed once on a schedule and shared by everyone. You only pay when the server runs something just for you, priced at $1 per call: one cloud inference (AI prediction page / MCP) or one live chat message. Laintas Fin Pro ($19.9/mo) includes 40 monthly financial calls shared across Kline-de-pre and Value-de-pre; Gen ($49.9/mo) includes 30 shared monthly calls. Neither has a 5-hour burst limit. Past the quota, billing falls back to $1 per call. The code is open source — self-deploy and use it for free.

Helpwo

Web (Browser)Open Source

AI-powered cloud IDE with a built-in custom Agent engine. Supports natural-language-driven code generation, intelligent refactoring, and context-aware completion. Paired with Laintas CLI for seamless browser-to-local programming. Open source with self-deployment; online version billed by token usage.

Visit Product

Helpwo is an AI-powered Web IDE that runs entirely in the browser — no client installation. It ships with a built-in code editor, a virtual file system, and an AI chat panel offering three working modes: Chat, Agent, and Engine. Paired with Laintas CLI, it enables seamless browser-to-local programming. The core is open source for self-deployment; the online version is billed by token usage.

Three Working Modes

ModeFile AccessBest For
ChatNoneCode Q&A, concept explanations, technical discussion — AI replies in text only
AgentFull autonomyComplex coding tasks — AI plans and executes autonomously with all tools and sub-agent spawning, up to 10 loop iterations
EngineNoneVisual presentation — outputs natural language while rendering charts, tables, and cards in HTML

UI Layout

1Left sidebar — File tree + Agent panel + conversation list.
2Center editor — CodeMirror 6 with syntax highlighting, code folding, and multi-language support.
3AI panel — ChatGPT-style chat interface with docked, floating, and maximized display modes.
4Bottom command line — Built-in and custom CLI commands, through which the AI also executes its operations.

Data Storage

All files are stored in the browser’s IndexedDB and are never automatically uploaded to a server. Clearing browser data will lose your files — export periodically as a backup.

Quick Start

Access

Helpwo is a pure web application — all data and computation happen locally in your browser. No download, installation, or configuration required.

Getting Started

1. Open the website

https://helpwo.laintas.com

We recommend a modern browser such as Chrome, Firefox, or Edge.

2. Register / Sign in

Register a Laintas account on your first visit. Supports email registration, or quick sign-in with Google or GitHub. After login, your username and balance are displayed in the top-right corner.

3. Top up or subscribe

The online version is billed by actual token usage: $3.96/1M input and $7.91/1M output. Both Pro and Gen include 10,000 monthly AI calls for Helpwo. Visit the pricing page for details, or top up your balance in settings.

4. Start using

Create files or import local projects in the file area, write code in the editor, and interact with the AI via the Chat / Agent / Engine mode selector. Start with Chat mode to get familiar, then try Agent mode to let the AI autonomously complete coding tasks, and finally explore Engine mode for rich HTML-rendered output.

Recommended Workflow

1Ask (Chat) — Encounter unfamiliar code? Switch to Chat mode and have the AI explain the logic and design intent.
2Auto-code (Agent) — Need to complete a coding task? Switch to Agent mode, describe your goal in one sentence, and the AI autonomously plans, searches files, and executes.
3Visualize (Engine) — Need rich visual output? Switch to Engine mode — the AI renders charts, tables, and other rich content in HTML alongside natural language.
4Local sync — Install Laintas CLI to let the Agent directly operate on your local files and shell through a remote connection.

API Reference

The Helpwo backend provides RESTful APIs consumed by the web frontend and the Laintas CLI. All APIs require authentication (Cookie or X-User-Id header).

AI Chat

POST/api/chat/stream

SSE streaming AI chat. Supports OpenAI-compatible function calling (messages + tools) — the AI invokes frontend tools (file read/write, code search, etc.) via tool_calls. Each call checks balance before execution and deducts the actual token cost from the laintas.com account after the response; _billing info is returned at stream end.

Body FieldTypeDescription
messagestringThe current user message
messagesarrayFull conversation history (OpenAI format: role + content)
toolsarrayOptional. OpenAI-format tool definitions for the AI to issue tool_calls
langstringReply language, e.g. "CN" / "EN"
currentPathstringCurrent working directory context
maxTokensnumberMax tokens for the reply
{ "message": "重构 src/utils 下的所有文件", "lang": "CN", "currentPath": "~/project", "messages": [ { "role": "system", "content": "..." }, { "role": "user", "content": "重构 src/utils 下的所有文件" } ], "tools": [ ... ], "maxTokens": 2000 }

Balance & Billing

EndpointDescription
GET /api/balanceQuery balance. Returns {"balance": 1000, "balanceFormatted": "$10.00", "pricing": {...}}; balance is null when unauthenticated

Remote Agent Management

These endpoints form the remote-control protocol between Helpwo and Laintas CLI: the CLI registers as a remote agent, the Web UI dispatches commands, and the CLI polls, executes, and streams events back.

EndpointDescription
POST /api/agents/registerRegister a CLI instance; a unique agentId is assigned. Returns {"agentId": "remote-xxxxxxxx", "status": "registered"}
POST /api/agents/:id/sendWeb UI sends a command to an agent. Supports chat / exec / delegate / abort / approval-response kinds. Returns {"ok": true, "messageId": "..."}
GET /api/agents/:id/updatesWeb UI polls the agent event stream; incremental fetch via ?since=N cursor. Returns {"events": [...], "seq": 42, "state": {...}}
GET /api/agents/:id/pollCLI polls for pending commands. Returns {"inputs": [{...}]} — empty array when none are pending

FAQ

Does Helpwo require installation? Where is my data stored?

No installation needed. Helpwo is a pure web app that runs in your browser. All files are stored in your browser's IndexedDB database and are never automatically uploaded to any server. You can export files to your local machine at any time, or upload local files into Helpwo for editing. Switching browsers or clearing browser data will lose your files — export periodically as a backup.

What's the difference between Chat, Agent, and Engine modes? When should I use each?

Chat mode is pure conversation — the AI won't touch your files; perfect for questions, learning concepts, and discussing approaches. Agent mode gives the AI maximum freedom to autonomously plan multi-step tasks, search files, spawn sub-agents, and even remotely operate your local machine — best for complex tasks like large-scale refactoring. Engine mode outputs natural language while rendering rich content in HTML format (charts, tables, cards) — ideal for visual presentation of results.

How does AI billing work? What if I run out of balance?

AI conversations are billed by actual token usage: $3.96 per 1M input tokens and $7.91 per 1M output tokens. Both Pro ($19.9/mo) and Gen ($49.9/mo) include 10,000 monthly AI calls for Helpwo. Overage is deducted automatically after each AI response. Subscribe at /pricing or top up in settings. Helpwo is open source — self-deploy for free if you prefer.

What's the difference between Agent and Engine modes?

Agent mode is "AI completes your task autonomously" — you describe the goal, and the AI plans steps, searches files, modifies files, and decides execution order on its own, without asking for approval midway. It can also spawn sub-agents for parallel subtasks (e.g., refactoring three modules simultaneously). Engine mode focuses on output presentation — the AI generates natural language while simultaneously rendering rich content in HTML format (charts, tables, cards), ideal for structured visual output rather than plain text.

What are .cli.prop and .cli.js? How do I customize Helpwo?

.cli.prop is the system prompt template — it controls the system-level instructions sent to the AI (behavior rules, output format, etc.). .cli.js is the custom command registration file — write new CLI commands in JavaScript that can call built-in tools, access the database, and manipulate the editor. Both live in the system files area of the virtual filesystem and take effect immediately after editing.

How do I let the Agent operate on my local machine's files?

Install the Laintas CLI tool on your computer. Running laintas-cli registers it as a remote Agent for Helpwo. Your machine then appears in the Agent panel within Helpwo, and the AI in Agent mode can use remote_exec and remote_query tools to directly operate on your local file system and shell. Sensitive operations request your approval before execution.

Which programming languages are supported? What about syntax highlighting and code completion?

The editor is built on CodeMirror 6, supporting syntax highlighting and code folding for dozens of languages including JavaScript, TypeScript, HTML, CSS, JSON, Markdown, Python, Go, and Rust. The AST analysis tool (outline command) parses TypeScript/JavaScript code structure via tree-sitter. The AI itself is a general-purpose language model that can understand and generate code in virtually any programming language.

Laintas CLI

Linux · Source (Python 3.10+)Open Source (MIT)

An autonomous AI agent for your terminal. Natural-language-driven command execution, multi-agent collaboration, persistent memory, and a security policy engine — plus remote-agent registration for seamless Helpwo browser-to-local integration. Free and open source; AI calls billed via your account.

Visit Product

Laintas CLI is an autonomous AI agent that lives in your terminal. Type a natural-language task at the prompt — the AI calls the backend API, generates shell commands, executes them in a pseudo-terminal (PTY), reads the output, and iterates until the task is done. System commands typed directly are executed via PTY passthrough with no AI involvement. Once installed, it can also register as a remote agent for Helpwo, letting the AI in your browser operate directly on your local machine.

Input Routing

The REPL classifies every input line in the following order:

1Starts with / — meta command (/help, /login, /term, …), handled locally; unrecognized / commands fall through to the user-extensible .laintas/commands.py.
2First word matches a PATH executable or shell builtin — direct PTY passthrough with full terminal semantics (colors, progress bars), no AI involved.
3Everything else — treated as a natural-language task and routed into the AI agent loop (run_agent_loop).

Core Capabilities

CapabilityDescription
PTY ExecutionCommands run in a pseudo-terminal; interactive programs (vim, REPLs) get real TTY semantics. Inside tmux, a new window is spawned for native passthrough
Named Terminals/term creates persistent sub-terminals that survive across tasks; the AI sees a snapshot of each terminal's latest output every loop iteration
Multi-Agent/hire creates multiple AI agents with tree hierarchies, sub-agent spawning, inbox messaging, and abort
Tools & ExtensionsBuilt-in tool registry + user skills (~/.laintas/skills/) + MCP servers (~/.laintas/mcp.json)
Security PolicyA policy engine evaluates every command as allow / needs_approval / deny, with audit / enforce modes and a JSONL audit log
Persistent MemoryCross-session memory system (user / feedback / project / reference types), stored as Markdown files in ~/.laintas/memory/
Plan & Tasks/plan structured planning (explore → write plan → approve → execute), /workflow multi-phase workflows, persistent task list
Remote AgentRegisters as a Helpwo remote agent: heartbeat + command polling (chat / exec / delegate / abort), streaming events back to the browser

Relationship with Helpwo

Laintas CLI shares the same backend (/api/chat/stream) and the same Laintas account system as Helpwo. On startup, the CLI registers as a remote agent via the /api/agents/* protocol, so the AI in Helpwo’s Agent mode can operate your local files and shell through it.

Installation

System Requirements

DistributionFileRequirements
Linuxlaintas-cli_linux.tar.gzx86-64 standalone binary, no Python required
Sourcelaintas-cli_source.zipAny platform with Python 3.10+; best for auditing, debugging, and modification

Download & Install

Visit https://cli.laintas.com to download the Linux build or source package, or fetch them directly with curl:

# Linux curl -o laintas-cli_linux.tar.gz https://cli.laintas.com/releases/latest/laintas-cli_linux.tar.gz # Source curl -o laintas-cli_source.zip https://cli.laintas.com/releases/latest/laintas-cli_source.zip

Linux Install

tar xzf laintas-cli_linux.tar.gz sudo ./laintas-cli/install.sh laintas-cli

You can also run without installing: ./laintas-cli/laintas-cli.

Run from Source

unzip laintas-cli_source.zip cd laintas-cli-source python -m pip install -r requirements.txt python laintas_cli.py

Core dependencies: requests, certifi, rich, prompt_toolkit; optionally install mcp, playwright, websockets, and aiortc for MCP, browser automation, and WebRTC features.

First Run & Login

1Launch laintas-cli to enter the interactive REPL — the banner shows your account, working directory, and backend URL.
2Type /login — the CLI opens accounts.laintas.com and authenticates with OAuth Authorization Code + PKCE; the resulting session is cached in ~/.laintas/session.json (chmod 600).
3Type a natural-language task to get started, e.g. "list the 5 largest files in this project".

Non-interactive Mode

laintas-cli --execute "为这个项目生成 README" # 单任务执行后退出 laintas-cli --backend https://your-backend.com # 指定自部署后端

Command Reference

All meta commands start with / and are handled locally in the REPL. Full command reference:

Session & Account

CommandDescription
/helpShow help
/loginRe-authenticate with accounts.laintas.com (opens browser)
/model [id|reset]List available backend models, set the model, or reset to default
/name [name]Set the current agent name
/cwdShow current working directory
/clearClear screen
/exitLog out and exit (clears cached session)
/quit, /qExit without logging out (/q detaches from a sub-terminal)

Terminals & Agents

CommandDescription
/t, /term [name]List sub-terminals, or create a new named one
/send <name> <cmd>Send a command to a named terminal
/station [name]Station the agent in a persistent shell (current or named terminal)
/terminate <name>Close and destroy a terminal
/backDetach from a sub-terminal without closing it
/hireCreate a new AI agent (AI-1, AI-2, …)
/agents [name]List / switch agents; /agents name <n> renames

Planning, Memory & Extensions

CommandDescription
/planStructured planning (enter / approve / exit / status / list)
/workflowMulti-phase workflows (start / status / advance / end / list)
/memoryView project memory (.laintas/memory.json)
/propView the AI system prompt template (.laintas/cli.prop)
/skillSkill management (list / reload / new <name> / dir)
/toolsList registered AI tools
/configRuntime config (/config <key> <value>, /config reset)
/scanScan and list all available system commands on PATH
/debugBrowse debug entries (/debug <N> for detail, /debug clear to reset)

Configuration

Environment Variables

VariableDescription
LAINTAS_BACKENDBackend URL, defaults to laintas.com; can point to a self-hosted Helpwo backend
LAINTAS_HOMEConfig directory location, defaults to ~/.laintas/
LAINTAS_WORKSPACEDefault working directory for the Linux launcher, defaults to ~/laintas_workspace

Global Config Files (~/.laintas/)

All configuration lives in ~/.laintas/, auto-created with safe defaults on first access. Config files are mtime-cached — edits take effect immediately, no restart required.

FilePurpose
policy.jsonCommand security policy: allow / needs_approval / deny regex rules
hooks.json / hooks.pyEvent hooks: pre/post_command, pre/post_tool, session start/end, etc.
mcp.jsonMCP server configuration (one subprocess per server, tools auto-registered)
memory/Cross-session persistent memory (Markdown + frontmatter, indexed by MEMORY.md)
plans/Execution plans saved by /plan
tasks.jsonStructured task list (pending → in_progress → completed)
skills/User-installed skill directories (one skill.py each)
audit.logJSONL audit trail of command decisions
session.jsonAuthentication session (chmod 600)
config.jsonGlobal settings (agentName, backendUrl)

Project-level Files (.laintas/)

On first run in any directory, the CLI creates a .laintas/ subdirectory (add it to .gitignore — never commit it):

FilePurpose
cli.propAI system prompt template ({{var}} substitution)
memory.jsonPersisted AI memory / project rules
commands.pyCustom / command extensions (handle_extra_command)
loop.pyCommand-execution interception hook (return a string to inject synthetic output)

Runtime Parameters (/config)

KeyDefaultDescription
max_loops30Max AI loop iterations per task
max_tokens2000Max tokens per AI response
loop_delay1.5Seconds between loop iterations
output_truncate3000Char limit for the lastOutput tail
poll_timeout10.0Seconds to wait for first command output
terminal_tail_lines20Lines shown in sub-terminal snapshots
heartbeat_interval30Seconds between agent heartbeats
staleness_limit3Consecutive no-command steps before the loop auto-exits

Security Recommendation

Enable enforce mode in ~/.laintas/policy.json and configure needs_approval rules for dangerous commands (rm -rf, curl | sh, …). Every command decision is written to ~/.laintas/audit.log for auditing.

FAQ

How much does Laintas CLI cost?

The CLI tool itself is free and open source. AI calls are billed through your laintas.com account by token usage ($3.96/1M input and $7.91/1M output — same as Helpwo). Both Pro ($19.9/mo) and Gen ($49.9/mo) include 12,000 monthly AI calls for Laintas CLI. Direct system command execution (no AI) is completely free.

How does it integrate with Helpwo?

On startup the CLI registers as a remote agent via /api/agents/register and stays online with heartbeats. Open Helpwo (helpwo.laintas.com) and your machine appears in the Agent panel. The AI in Agent mode can then use remote_exec / remote_query to operate your local files and shell; sensitive operations request your approval on the CLI side first.

Is it safe to let the AI execute commands?

A built-in policy engine evaluates every command: allow (execute), needs_approval (ask first), or deny (reject). Rules are regex-based in ~/.laintas/policy.json with three modes — audit (log only), enforce, and disabled — and every decision is written to ~/.laintas/audit.log. You can interrupt a running task at any time with Ctrl+C.

Why does the download page only offer Linux and source packages?

The public download page currently ships the Linux x86-64 standalone binary and the source package. The Linux build is best for servers and daily terminal use with no Python required; the source package is best for macOS, ARM, auditing, debugging, and local modification, and requires Python 3.10+. If your platform does not have a standalone binary yet, run from source.

Does it support MCP (Model Context Protocol)?

Yes. Configure MCP servers in ~/.laintas/mcp.json — the CLI starts one subprocess per server and auto-registers their tools for the AI. The mcp Python package is required (pip install mcp); if missing, the /mcp command tells you how to install it.

Can I connect to a self-hosted backend?

Yes. Point the LAINTAS_BACKEND environment variable or the --backend flag at your self-hosted Helpwo backend. The backend protocol is POST /api/chat/stream (SSE streaming) with Cookie or Bearer token authentication.

How do I customize the AI's behavior?

Multiple layers are customizable: edit .laintas/cli.prop to change the system prompt template; register custom / commands in .laintas/commands.py; intercept command execution in .laintas/loop.py; install skill packages under ~/.laintas/skills/; and configure event hooks via ~/.laintas/hooks.json. All files take effect on save — no restart needed.

© 2026 Laintas — All rights reserved