Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions agent-forge.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Lousho Studio"
description: "Lousho Studio is a local web app for building, testing and watching every agent across your projects."
---
{/* Generated from docs/agent-forge.md in LinuxDevil/agent-sdk by scripts/sync-sdk-docs.mjs. Do not edit here. */}
{/* Generated from docs/agent-forge.md in LinuxDevil/lousho by scripts/sync-sdk-docs.mjs. Do not edit here. */}

It is a separate npm package, `@linuxdevil/studio` — the SDK (`@linuxdevil/lousho`)
does not contain it. One Studio server shows every agent you have: the spec-v2
Expand Down Expand Up @@ -256,7 +256,7 @@ approvals alongside them) - the same `.lousho/` layout `lousho dev`/`lousho
build` use, so the files travel with the project and stay diffable.
Studio-wide state (settings, secrets, the workspace registry) lives in
`~/.lousho/studio/` instead; see [Workspaces](#workspaces). Those YAML files
are [Agent spec v2](https://github.com/LinuxDevil/agent-sdk/blob/main/docs/agent-spec.md) documents, which that page explains
are [Agent spec v2](/agent-spec) documents, which that page explains
field by field.

The Agents screen's agent rail lists exactly the agents in that workspace's
Expand Down
16 changes: 8 additions & 8 deletions agent-spec.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ A minimal spec is four fields. This snippet parses one and runs it on the
built-in `mock` provider, so it works offline with no API key:

```ts
import { createMockProvider, LLMProviderRegistry, specV2ToAgent } from 'lousho';
import { parseAgentSpecV2 } from 'lousho/spec';
import { createMockProvider, LLMProviderRegistry, specV2ToAgent } from '@linuxdevil/lousho';
import { parseAgentSpecV2 } from '@linuxdevil/lousho/spec';

// 'mock' is a registered provider name; scripting its reply keeps the output deterministic.
LLMProviderRegistry.register('mock', () => createMockProvider({ responses: ['Hello!'] }));
Expand Down Expand Up @@ -132,7 +132,7 @@ with `LOUSHO_SPEC_UNSUPPORTED` naming the field.
| [`hooks`](/hooks) | `HookSpec[]` | Code that runs before or after tool calls and model calls. |
| [`output`](/structured-output) | `{ jsonSchema }` | A JSON Schema the final answer must match. |
| [`triggers`](/schedules) | `TriggerSpec[]` | What starts a run: chat, a schedule, a webhook, a channel or another agent finishing. |
| `abortListeners` | not supported yet | Events that cancel a queued or running run. |
| [`abortListeners`](/triggers#abort-listeners) | `AbortListenerSpec[]` | Events that cancel a queued or running run. |
| [`flow`](/flows) | `AgentFlow` | An optional step-by-step workflow the agent runs instead of a single chat turn. |
| `evals` | not supported yet | Datasets and pass gates checked before the agent is published. |

Expand Down Expand Up @@ -278,8 +278,8 @@ for when you want to build the agent yourself. v1's `specToAgent()` stays
separate: it is synchronous and takes a v1 spec, not v2 data.

```ts
import { compileSpec, specV2ToAgent, type SpecHost } from 'lousho';
import { parseAgentSpecV2 } from 'lousho/spec';
import { compileSpec, specV2ToAgent, type SpecHost } from '@linuxdevil/lousho';
import { parseAgentSpecV2 } from '@linuxdevil/lousho/spec';

const host: SpecHost = { baseDir: process.cwd() };
const spec = parseAgentSpecV2({ version: 2, name: 'Greeter', model: 'mock/greeter', instructions: 'Say hello.' });
Expand Down Expand Up @@ -307,14 +307,14 @@ and v1's `agentSpecSchema`. Node-only helpers (`specV2ToAgent`,
stay on the package root.

```ts
import { agentSpecV2JsonSchema } from 'lousho/spec';
import { agentSpecV2JsonSchema } from '@linuxdevil/lousho/spec';

const schema = agentSpecV2JsonSchema(); // the draft-07 JSON Schema of a spec, for forms and editors
console.log(schema.title); // 'AgentSpec v2'
```

```ts
import { parseAgentSpecV2, specToCode } from 'lousho/spec';
import { parseAgentSpecV2, specToCode } from '@linuxdevil/lousho/spec';

const spec = parseAgentSpecV2({ version: 2, name: 'Greeter', model: 'mock/greeter', instructions: 'Say hello.' });
console.log(specToCode(spec)); // the same spec as a readable createAgent({...}) module
Expand All @@ -329,7 +329,7 @@ is not re-validated - run it through `parseAgentSpecV2()` or use
version and always returns a validated `AgentSpecV2`.

```ts
import { loadSpecV2, upgradeSpec } from 'lousho';
import { loadSpecV2, upgradeSpec } from '@linuxdevil/lousho';

const v1 = {
name: 'support-bot',
Expand Down
6 changes: 3 additions & 3 deletions changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Changelog"
description: "Every notable change to lousho, newest first."
---
{/* Generated from CHANGELOG.md in LinuxDevil/agent-sdk by scripts/sync-sdk-docs.mjs. Do not edit here. */}
{/* Generated from CHANGELOG.md in LinuxDevil/lousho by scripts/sync-sdk-docs.mjs. Do not edit here. */}

## [Unreleased]

Expand All @@ -12,7 +12,7 @@ description: "Every notable change to lousho, newest first."
- Studio: the Code tab gains "Eject to project" (`POST /agents/:id/eject`), which writes the agent-directory form (`specToAgentDir`) to `agents/<id>/` in the workspace after a confirm dialog, with an explicit overwrite step when the folder already exists.
- New `@linuxdevil/lousho/observe` subpath: `startObserveDaemon`, `probeHealth`, `isObserveDaemon`, `defaultDbPath`, `OBSERVE_DEFAULT_PORT` and the daemon option/retention defaults, so a host process (Studio) can run and probe the collector through public exports.
- Install docs use the public npm packages again (`npm install @linuxdevil/lousho`, `npm create lousho`).
- `@linuxdevil/lousho/improve` (experimental): `improveAgent()` proposes tested edits to an agent's instructions and skills, offline, gated against the current harness and held-out cases. It applies nothing. See [Improving an agent](https://github.com/LinuxDevil/agent-sdk/blob/main/docs/improve.md).
- `@linuxdevil/lousho/improve` (experimental): `improveAgent()` proposes tested edits to an agent's instructions and skills, offline, gated against the current harness and held-out cases. It applies nothing. See [Improving an agent](/improve).
- `lousho bridge`: a new command that speaks Studio's bridge protocol (NDJSON on stdin/stdout, protocol 1) so Lousho Studio can build and run a project's agents with that project's own SDK and dependencies. It answers `hello`, `catalog`, `compile` and `shutdown`, and runs agents: `run`/`chat` start a run or chat turn, `steer`/`abort` control it, `resolveApproval`/`answerQuestion` resume a paused run, and every `AgentEvent`, trace span, steer join and run settle arrives as a pushed event (flows are refused with `LOUSHO_HOST_UNSUPPORTED`).
- Model strings resolve any official AI SDK provider: `mistral/...`, `groq/...`, `xai/...`, `bedrock/...`, `vertex/...`, `azure/...` and 13 more load `@ai-sdk/<vendor>` on the first call, and `ai-sdk/<vendor>/<model>` loads any other `@ai-sdk/*` package. The package reads its own credentials. See [Providers](/providers#any-ai-sdk-vendor-by-name).

Expand Down Expand Up @@ -189,7 +189,7 @@ description: "Every notable change to lousho, newest first."
## [1.0.0-alpha.32] - 2026-11-07

- Install docs use the public npm packages again (`npm install @linuxdevil/lousho`, `npm create lousho`).
- `@linuxdevil/lousho/improve` (experimental): `improveAgent()` proposes tested edits to an agent's instructions and skills, offline, gated against the current harness and held-out cases. It applies nothing. See [Improving an agent](https://github.com/LinuxDevil/agent-sdk/blob/main/docs/improve.md).
- `@linuxdevil/lousho/improve` (experimental): `improveAgent()` proposes tested edits to an agent's instructions and skills, offline, gated against the current harness and held-out cases. It applies nothing. See [Improving an agent](/improve).
- `agent.recover({ retryWithDiagnosis: true })` gives a run that reached `maxAttempts` one fork told why it failed, before quarantining it. `createOutputCheck()` is a new hook that runs your check after a tool succeeds and tells the model what it found. A fork no longer inherits `lastError` and `attempts` from its source.
- **Behavior change:** `agent.recover()` no longer resumes a failing run forever. It backs off exponentially from the last failure (up to 15 minutes) and stops after `maxAttempts` failures in a row (default 10), calling the new `onQuarantined(run)` once. `agent.resume()` still runs a quarantined run. Pass a larger `maxAttempts` to keep retrying longer.
- `lousho observe failures` also lists runs whose process died and scores below `--min-score` (default 0.5).
Expand Down
22 changes: 11 additions & 11 deletions cli.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "CLI"
---
{/* Generated from docs/cli.md in LinuxDevil/agent-sdk by scripts/sync-sdk-docs.mjs. Do not edit here. */}
{/* Generated from docs/cli.md in LinuxDevil/lousho by scripts/sync-sdk-docs.mjs. Do not edit here. */}

Installing the package also installs the `@linuxdevil/lousho` command. It scaffolds
projects, checks your setup, runs an agent locally, serves it over MCP, runs
Expand All @@ -22,7 +22,7 @@ Run it with `npx @linuxdevil/lousho <command>` inside a project that has the SDK
| `lousho build --target=<t> --agent=<spec>` | Build a deployable Node server, Docker image or Cloudflare Worker. | [Deployment](/deployment) |
| `lousho studio` | Open Lousho Studio (the separate `@linuxdevil/studio` package) on this project. | [Lousho Studio](/agent-forge) |
| `lousho bridge` | Speak Studio's bridge protocol on stdio; started by Studio, not run by hand. | [Below](#lousho-bridge) |
| `lousho workspace <init\|ls\|show\|validate\|run>` | Create, inspect, validate and run a workspace from a folder or a running service. | [Workspaces](https://github.com/LinuxDevil/agent-sdk/blob/main/docs/workspaces.md) |
| `lousho workspace <init\|ls\|show\|validate\|run>` | Create, inspect, validate and run a workspace from a folder or a running service. | [Workspaces](https://github.com/LinuxDevil/lousho/blob/main/docs/workspaces.md) |
| `lousho observe <sub>` | Run the local collector every agent reports to when `LOUSHO_OBSERVE` is set: `start`, `status`, `stop`, `rebuild-rollups`, `prune`, `export`, `failures`, `score`, `token`. | [Below](#lousho-observe) |
| `lousho improve <path> --check <module>` | Experimental. Run one self-healing cycle on an agent directory: propose edits to its instructions and skills from failed runs in your local observe database, gate them, replay them on fresh runs, and apply (auto mode, the default) or queue (manual mode) one that passes. `--watch` keeps it running; `pause`, `status`, `rollback`, `approve` and the other subcommands manage it. `--dry-run` prints the review card and applies nothing. | [Below](#lousho-improve) |

Expand Down Expand Up @@ -385,7 +385,7 @@ resolve them with `createAgent({ prompt: 'mira@latest' })` (or a label,

## `lousho improve`

Experimental, like the [`improveAgent()`](https://github.com/LinuxDevil/agent-sdk/blob/main/docs/improve.md) it runs.
Experimental, like the [`improveAgent()`](/improve) it runs.

```bash
npx @linuxdevil/lousho improve ./my-agent --check ./check.mjs --since 7d --out proposal.md
Expand Down Expand Up @@ -445,17 +445,17 @@ don't live in `instructions.md`, always runs dry.
`<id>.heal` fork from `agent.recover()` that finished and whose answer passes
`--check`, if there is one. It's evidence only: it never counts as a run and
never protects a case, and a fork you `--protect` is left out. See
[Recovery forks as evidence](https://github.com/LinuxDevil/agent-sdk/blob/main/docs/improve.md#recovery-forks-as-evidence).
[Recovery forks as evidence](/improve#recovery-forks-as-evidence).
- `--approval auto|manual` sets the approval mode, over the
`LOUSHO_IMPROVE_APPROVAL` variable, which wins over `"approval"` in
`improve.json` beside the agent. The default is `auto`. In `manual` mode an
edit that quotes a failed check word for word is kept and flagged on the card
for the person who approves it; in `auto` mode it is sent back to the editor
once and then dropped. An `improve.json` that doesn't validate stops the
run. See [Approval modes](https://github.com/LinuxDevil/agent-sdk/blob/main/docs/improve.md#approval-modes).
run. See [Approval modes](/improve#approval-modes).
- `--proposers <1-4>`, `--mode agg|seq`, `--select` and
`--no-parallel-editors` set the cycle's
[Harness² options](https://github.com/LinuxDevil/agent-sdk/blob/main/docs/improve.md#harness-options), over the `editors` block in
[Harness² options](/improve#harness-options), over the `editors` block in
`improve.json`. `--select` can only turn the selector on and
`--no-parallel-editors` can only turn parallel off. `--proposers k` runs k invariant and k domain editors (or k
rounds with `--mode seq`), and costs about k times the editor sessions and
Expand All @@ -477,7 +477,7 @@ budget if any. Every run and every editor call is billed to your models.
`--max-tokens` caps one cycle within `improve.json`'s daily caps.
It exits 1 on an `outage`: no run could be scored, or the editors' provider
failed. A `budget-exceeded` run exits 0, since you set the cap. Each run's error goes to
stderr. It reads nothing but your own database. See [Improving an agent](https://github.com/LinuxDevil/agent-sdk/blob/main/docs/improve.md#from-the-command-line).
stderr. It reads nothing but your own database. See [Improving an agent](/improve#from-the-command-line).

### Revisions, rollback and the audit log

Expand Down Expand Up @@ -532,7 +532,7 @@ npx @linuxdevil/lousho improve reject ./my-agent 3f9c0a1b2d4e --by ali --reason
[--read-only tool]... [--no-guard] [--db path]` applies the proposal through
`applyProposal()` as that person's approval and removes it from the queue.
With `canary.traffic` set, it starts the
[traffic canary](https://github.com/LinuxDevil/agent-sdk/blob/main/docs/improve.md#live-traffic-canary-opt-in) instead and writes
[traffic canary](/improve#live-traffic-canary-opt-in) instead and writes
nothing yet, reading the observe database at `--db` (default
`~/.lousho/observe.db`); the proposal is applied as that approval when the
canary passes, and the watcher guards it then. A
Expand Down Expand Up @@ -574,7 +574,7 @@ the stop file and `resume` removes it; both are audited. `resume` doesn't
undo `LOUSHO_IMPROVE=off` or `"enabled": false`. While the loop is paused, the
monitor doesn't run either, so nothing is rolled back automatically. Only a
watcher runs the monitor: a single `lousho improve` cycle doesn't. See
[Running it continuously](https://github.com/LinuxDevil/agent-sdk/blob/main/docs/improve.md#running-it-continuously).
[Running it continuously](/improve#running-it-continuously).

`lousho improve status <dir> [--json]` prints the mode and active revision, the
last 5 audit entries, pending proposals, the monitor's verdict (with a warning
Expand Down Expand Up @@ -613,7 +613,7 @@ defaults to `false` in manual mode.
are unset unless you set them. With `canary.traffic` set, a proposal that
passes the replay canary (in auto mode), or that a person approves (in manual
mode), starts the
[live traffic canary](https://github.com/LinuxDevil/agent-sdk/blob/main/docs/improve.md#live-traffic-canary-opt-in), which serves it
[live traffic canary](/improve#live-traffic-canary-opt-in), which serves it
to real sessions, instead of being written.
`loadImproveSettings()` reads the file. See
[Settings](https://github.com/LinuxDevil/agent-sdk/blob/main/docs/improve.md#settings) for what each key does.
[Settings](/improve#settings) for what each key does.
3 changes: 1 addition & 2 deletions comparison.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
title: "How Lousho compares"
sidebarTitle: "Comparison"
description: "This page compares Lousho with four other TypeScript agent libraries: the Vercel AI SDK (ToolLoopAgent), the OpenAI Agents SDK for JavaScript, Mastra and LangGraph.js. Each competitor cell comes from that project's official docs."
---
{/* Generated from docs/comparison.md in LinuxDevil/agent-sdk by scripts/sync-sdk-docs.mjs. Do not edit here. */}
{/* Generated from docs/comparison.md in LinuxDevil/lousho by scripts/sync-sdk-docs.mjs. Do not edit here. */}

Last checked: 9 Nov 2026. These projects move fast, so a cell may be out of
date. Corrections welcome: [open an issue](https://github.com/LinuxDevil/lousho/issues).
Expand Down
4 changes: 2 additions & 2 deletions configuration.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: "Configuration"
---
{/* Generated from docs/configuration.md in LinuxDevil/agent-sdk by scripts/sync-sdk-docs.mjs. Do not edit here. */}
{/* Generated from docs/configuration.md in LinuxDevil/lousho by scripts/sync-sdk-docs.mjs. Do not edit here. */}

## Agent spec files (`AgentSpec`)

> This page describes spec version 1. New specs use [Agent spec v2](https://github.com/LinuxDevil/agent-sdk/blob/main/docs/agent-spec.md); `upgradeSpec()` converts a v1 spec.
> This page describes spec version 1. New specs use [Agent spec v2](/agent-spec); `upgradeSpec()` converts a v1 spec.

A declarative agent is a YAML (`.yaml`/`.yml`) or JSON (`.json`) file,
validated with zod by `loadSpec()` (`src/spec/schema.ts`). It is the format
Expand Down
4 changes: 2 additions & 2 deletions durable-execution.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Durable execution"
---
{/* Generated from docs/durable-execution.md in LinuxDevil/agent-sdk by scripts/sync-sdk-docs.mjs. Do not edit here. */}
{/* Generated from docs/durable-execution.md in LinuxDevil/lousho by scripts/sync-sdk-docs.mjs. Do not edit here. */}

Give `createAgent()` a `store` and pass a `sessionId` to `send()`, and the
run survives a crash, a restart, an abort or a human approval that takes
Expand Down Expand Up @@ -311,7 +311,7 @@ without a checkpoint store. With a custom store that has no leases
(`acquireLease`), nothing stops it from resuming a run another process is
still running: run it in one process only.

For an overview of recovery alongside the progress guard and `improveAgent()`, see [Self-healing and self-improvement](https://github.com/LinuxDevil/agent-sdk/blob/main/docs/self-healing.md).
For an overview of recovery alongside the progress guard and `improveAgent()`, see [Self-healing and self-improvement](/self-healing).

## Run leases

Expand Down
8 changes: 6 additions & 2 deletions errors.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
---
title: "Errors"
description: "Nearly every error the SDK throws on purpose is an SDKError (or a subclass such as ConfigurationError, ValidationError or MissingPeerDependencyError) with:"
description: "Every deliberate SDK error is an SDKError with a stable LOUSHO_* code, a hint and a link to its section here; this page lists each code with its cause and fix."
---
{/* Generated from docs/errors.md in LinuxDevil/agent-sdk by scripts/sync-sdk-docs.mjs. Do not edit here. */}
{/* Generated from docs/errors.md in LinuxDevil/lousho by scripts/sync-sdk-docs.mjs. Do not edit here. */}

Nearly every error the SDK throws on purpose is an `SDKError` (or a subclass
such as `ConfigurationError`, `ValidationError` or `MissingPeerDependencyError`)
with:

- `code`: a stable string, `LOUSHO_<AREA>_<NAME>`. Branch on it, not on the
message text, which may get clearer over time.
Expand Down
Loading
Loading