Documentation
Complete technical documentation for the Laintas product suite. Installation, API reference, configuration guides, and best practices.
Pricing
Pay-as-you-go
- · Laintas CLI: Free
- · Helpwo: live T1–T3 model-tier pricing
- · PPOS: $1/review · 5 MB
/mo · Single product
- · CLI: 12,000/mo
- · Helpwo: 10,000/mo
- · Laintas Search: 20,000/mo
/mo · All products
- · Helpwo: 10,000/mo · CLI: 12,000/mo
- · Search: 10,000/mo · Fin: 30 shared/mo
- · PPOS: 2,000/mo · storage sold separately
- · Includes future products
Laintas CLI
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 ProductLaintas 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:
/ — meta command (/help, /login, /term, …), handled locally; unrecognized / commands fall through to the user-extensible .laintas/commands.py.run_agent_loop).Core Capabilities
| Capability | Description |
|---|---|
| PTY Execution | Commands 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 & Extensions | Built-in tool registry + user skills (~/.laintas/skills/) + MCP servers (~/.laintas/mcp.json) |
| Security Policy | A policy engine evaluates every command as allow / needs_approval / deny, with audit / enforce modes and a JSONL audit log |
| Persistent Memory | Cross-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 Agent | Registers as a Helpwo remote agent: heartbeat + command polling (chat / exec / delegate / abort), streaming events back to the browser |
Relationship with Helpwo
/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
| Distribution | File | Requirements |
|---|---|---|
| Linux | laintas-cli_linux.tar.gz | x86-64 standalone binary, no Python required |
| Source | laintas-cli_source.zip | Any 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 Install
You can also run without installing: ./laintas-cli/laintas-cli.
Run from Source
Core dependencies: requests, certifi, rich, prompt_toolkit; optionally install mcp, playwright, websockets, and aiortc for MCP, browser automation, and WebRTC features.
First Run & Login
laintas-cli to enter the interactive REPL — the banner shows your account, working directory, and backend URL./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).Non-interactive Mode
Command Reference
All meta commands start with / and are handled locally in the REPL. Full command reference:
Session & Account
| Command | Description |
|---|---|
| /help | Show help |
| /login | Re-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 |
| /cwd | Show current working directory |
| /clear | Clear screen |
| /exit | Log out and exit (clears cached session) |
| /quit, /q | Exit without logging out (/q detaches from a sub-terminal) |
Terminals & Agents
| Command | Description |
|---|---|
| /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 |
| /back | Detach from a sub-terminal without closing it |
| /hire | Create a new AI agent (AI-1, AI-2, …) |
| /agents [name] | List / switch agents; /agents name <n> renames |
Planning, Memory & Extensions
| Command | Description |
|---|---|
| /plan | Structured planning (enter / approve / exit / status / list) |
| /workflow | Multi-phase workflows (start / status / advance / end / list) |
| /memory | View project memory (.laintas/memory.json) |
| /prop | View the AI system prompt template (.laintas/cli.prop) |
| /skill | Skill management (list / reload / new <name> / dir) |
| /tools | List registered AI tools |
| /config | Runtime config (/config <key> <value>, /config reset) |
| /scan | Scan and list all available system commands on PATH |
| /debug | Browse debug entries (/debug <N> for detail, /debug clear to reset) |
Configuration
Environment Variables
| Variable | Description |
|---|---|
| LAINTAS_BACKEND | Backend URL, defaults to laintas.com; can point to a self-hosted Helpwo backend |
| LAINTAS_HOME | Config directory location, defaults to ~/.laintas/ |
| LAINTAS_WORKSPACE | Default 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.
| File | Purpose |
|---|---|
| policy.json | Command security policy: allow / needs_approval / deny regex rules |
| hooks.json / hooks.py | Event hooks: pre/post_command, pre/post_tool, session start/end, etc. |
| mcp.json | MCP 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.json | Structured task list (pending → in_progress → completed) |
| skills/ | User-installed skill directories (one skill.py each) |
| audit.log | JSONL audit trail of command decisions |
| session.json | Authentication session (chmod 600) |
| config.json | Global 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):
| File | Purpose |
|---|---|
| cli.prop | AI system prompt template ({{var}} substitution) |
| memory.json | Persisted AI memory / project rules |
| commands.py | Custom / command extensions (handle_extra_command) |
| loop.py | Command-execution interception hook (return a string to inject synthetic output) |
Runtime Parameters (/config)
| Key | Default | Description |
|---|---|---|
| max_loops | 30 | Max AI loop iterations per task |
| max_tokens | 2000 | Max tokens per AI response |
| loop_delay | 1.5 | Seconds between loop iterations |
| output_truncate | 3000 | Char limit for the lastOutput tail |
| poll_timeout | 10.0 | Seconds to wait for first command output |
| terminal_tail_lines | 20 | Lines shown in sub-terminal snapshots |
| heartbeat_interval | 30 | Seconds between agent heartbeats |
| staleness_limit | 3 | Consecutive no-command steps before the loop auto-exits |
Security Recommendation
~/.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 model tier and token usage, using the same live T1/T2/T3 price sheet as Helpwo. Pro ($19.9/mo) includes 7,000 calls a month and Gen ($49.9/mo) 15,000, pooled across every Laintas product. 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.
Helpwo
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 ProductHelpwo 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
| Mode | File Access | Best For |
|---|---|---|
| Chat | None | Code Q&A, concept explanations, technical discussion — AI replies in text only |
| Agent | Full autonomy | Complex coding tasks — AI plans and executes autonomously with all tools and sub-agent spawning, up to 10 loop iterations |
| Engine | None | Visual presentation — outputs natural language while rendering charts, tables, and cards in HTML |
UI Layout
Data Storage
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
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 model tier and actual token usage using the live T1/T2/T3 price sheet. Pro includes 7,000 calls a month and Gen 15,000, pooled across every Laintas product. 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
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
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 Field | Type | Description |
|---|---|---|
| message | string | The current user message |
| messages | array | Full conversation history (OpenAI format: role + content) |
| tools | array | Optional. OpenAI-format tool definitions for the AI to issue tool_calls |
| lang | string | Reply language, e.g. "CN" / "EN" |
| currentPath | string | Current working directory context |
| maxTokens | number | Max tokens for the reply |
Balance & Billing
| Endpoint | Description |
|---|---|
| GET /api/balance | Query 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.
| Endpoint | Description |
|---|---|
| POST /api/agents/register | Register a CLI instance; a unique agentId is assigned. Returns {"agentId": "remote-xxxxxxxx", "status": "registered"} |
| POST /api/agents/:id/send | Web UI sends a command to an agent. Supports chat / exec / delegate / abort / approval-response kinds. Returns {"ok": true, "messageId": "..."} |
| GET /api/agents/:id/updates | Web UI polls the agent event stream; incremental fetch via ?since=N cursor. Returns {"events": [...], "seq": 42, "state": {...}} |
| GET /api/agents/:id/poll | CLI 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 model tier and actual token usage using the live T1/T2/T3 price sheet shown on the pricing page. Pro ($19.9/mo) includes 7,000 calls a month and Gen ($49.9/mo) 15,000, pooled across every Laintas product. 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.
© 2026 Laintas — All rights reserved