mirror of
https://github.com/clawdbot/clawdbot.git
synced 2026-01-31 19:37:45 +01:00
chore: raise default agent concurrency
This commit is contained in:
@@ -6,6 +6,7 @@ Docs: https://docs.clawd.bot
|
|||||||
|
|
||||||
### Changes
|
### Changes
|
||||||
- Repo: remove the Peekaboo git submodule now that the SPM release is used.
|
- Repo: remove the Peekaboo git submodule now that the SPM release is used.
|
||||||
|
- Gateway: raise default lane concurrency for main and sub-agent runs.
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
- Web search: infer Perplexity base URL from API key source (direct vs OpenRouter).
|
- Web search: infer Perplexity base URL from API key source (direct vs OpenRouter).
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ We serialize inbound auto-reply runs (all channels) through a tiny in-process qu
|
|||||||
- Serializing avoids competing for shared resources (session files, logs, CLI stdin) and reduces the chance of upstream rate limits.
|
- Serializing avoids competing for shared resources (session files, logs, CLI stdin) and reduces the chance of upstream rate limits.
|
||||||
|
|
||||||
## How it works
|
## How it works
|
||||||
- A lane-aware FIFO queue drains each lane with a configurable concurrency cap (default 1).
|
- A lane-aware FIFO queue drains each lane with a configurable concurrency cap (default 1 for unconfigured lanes; main defaults to 4, subagent to 8).
|
||||||
- `runEmbeddedPiAgent` enqueues by **session key** (lane `session:<key>`) to guarantee only one active run per session.
|
- `runEmbeddedPiAgent` enqueues by **session key** (lane `session:<key>`) to guarantee only one active run per session.
|
||||||
- Each session run is then queued into a **global lane** (`main` by default) so overall parallelism is capped by `agents.defaults.maxConcurrent`.
|
- Each session run is then queued into a **global lane** (`main` by default) so overall parallelism is capped by `agents.defaults.maxConcurrent`.
|
||||||
- When verbose logging is enabled, queued runs emit a short notice if they waited more than ~2s before starting.
|
- When verbose logging is enabled, queued runs emit a short notice if they waited more than ~2s before starting.
|
||||||
|
|||||||
@@ -1840,7 +1840,7 @@ Example:
|
|||||||
|
|
||||||
`agents.defaults.subagents` configures sub-agent defaults:
|
`agents.defaults.subagents` configures sub-agent defaults:
|
||||||
- `model`: default model for spawned sub-agents (string or `{ primary, fallbacks }`). If omitted, sub-agents inherit the caller’s model unless overridden per agent or per call.
|
- `model`: default model for spawned sub-agents (string or `{ primary, fallbacks }`). If omitted, sub-agents inherit the caller’s model unless overridden per agent or per call.
|
||||||
- `maxConcurrent`: max concurrent sub-agent runs (default 1)
|
- `maxConcurrent`: max concurrent sub-agent runs (default 8)
|
||||||
- `archiveAfterMinutes`: auto-archive sub-agent sessions after N minutes (default 60; set `0` to disable)
|
- `archiveAfterMinutes`: auto-archive sub-agent sessions after N minutes (default 60; set `0` to disable)
|
||||||
- Per-subagent tool policy: `tools.subagents.tools.allow` / `tools.subagents.tools.deny` (deny wins)
|
- Per-subagent tool policy: `tools.subagents.tools.allow` / `tools.subagents.tools.deny` (deny wins)
|
||||||
|
|
||||||
@@ -1974,7 +1974,7 @@ Notes:
|
|||||||
|
|
||||||
`agents.defaults.maxConcurrent` sets the maximum number of embedded agent runs that can
|
`agents.defaults.maxConcurrent` sets the maximum number of embedded agent runs that can
|
||||||
execute in parallel across sessions. Each session is still serialized (one run
|
execute in parallel across sessions. Each session is still serialized (one run
|
||||||
per session key at a time). Default: 1.
|
per session key at a time). Default: 4.
|
||||||
|
|
||||||
### `agents.defaults.sandbox`
|
### `agents.defaults.sandbox`
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ Override via config:
|
|||||||
|
|
||||||
Sub-agents use a dedicated in-process queue lane:
|
Sub-agents use a dedicated in-process queue lane:
|
||||||
- Lane name: `subagent`
|
- Lane name: `subagent`
|
||||||
- Concurrency: `agents.defaults.subagents.maxConcurrent` (default `1`)
|
- Concurrency: `agents.defaults.subagents.maxConcurrent` (default `8`)
|
||||||
|
|
||||||
## Stopping
|
## Stopping
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,6 @@ import { setCommandLaneConcurrency } from "../process/command-queue.js";
|
|||||||
|
|
||||||
export function applyGatewayLaneConcurrency(cfg: ReturnType<typeof loadConfig>) {
|
export function applyGatewayLaneConcurrency(cfg: ReturnType<typeof loadConfig>) {
|
||||||
setCommandLaneConcurrency("cron", cfg.cron?.maxConcurrentRuns ?? 1);
|
setCommandLaneConcurrency("cron", cfg.cron?.maxConcurrentRuns ?? 1);
|
||||||
setCommandLaneConcurrency("main", cfg.agents?.defaults?.maxConcurrent ?? 1);
|
setCommandLaneConcurrency("main", cfg.agents?.defaults?.maxConcurrent ?? 4);
|
||||||
setCommandLaneConcurrency("subagent", cfg.agents?.defaults?.subagents?.maxConcurrent ?? 1);
|
setCommandLaneConcurrency("subagent", cfg.agents?.defaults?.subagents?.maxConcurrent ?? 8);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,10 +127,10 @@ export function createGatewayReloadHandlers(params: {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setCommandLaneConcurrency("cron", nextConfig.cron?.maxConcurrentRuns ?? 1);
|
setCommandLaneConcurrency("cron", nextConfig.cron?.maxConcurrentRuns ?? 1);
|
||||||
setCommandLaneConcurrency("main", nextConfig.agents?.defaults?.maxConcurrent ?? 1);
|
setCommandLaneConcurrency("main", nextConfig.agents?.defaults?.maxConcurrent ?? 4);
|
||||||
setCommandLaneConcurrency(
|
setCommandLaneConcurrency(
|
||||||
"subagent",
|
"subagent",
|
||||||
nextConfig.agents?.defaults?.subagents?.maxConcurrent ?? 1,
|
nextConfig.agents?.defaults?.subagents?.maxConcurrent ?? 8,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (plan.hotReasons.length > 0) {
|
if (plan.hotReasons.length > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user