deer-flow/backend/packages/harness/deerflow/config/subagent_runtime_config.py
Aurora_ c5d072af91
feat(subagents): add optional SQLite checkpoint history (#8265)
* feat(subagents): add optional SQLite checkpoint history

* docs(subagents): clarify checkpoint history limits

* fix(subagents): resolve checkpoint factory at startup

---------

Co-authored-by: Nan Gao <thunderggnn@gmail.com>
2026-11-16 13:29:26 +08:00

38 lines
1.2 KiB
Python

"""Startup-only capacity and checkpoint settings for native subagents."""
from typing import Literal
from pydantic import BaseModel, Field
class SubagentRuntimeConfig(BaseModel):
"""Process-local execution capacity and optional native task history."""
checkpoint_enabled: bool = Field(
default=False,
description="Persist native task checkpoint history through a loop-owned saver. Requires file-backed SQLite checkpoint storage and a Gateway restart.",
)
max_running: int = Field(
default=3,
ge=1,
le=64,
description="Maximum native subagents that may execute concurrently in one Gateway process.",
)
max_queued: int = Field(
default=64,
ge=0,
le=10_000,
description="Maximum native subagents waiting for a process execution slot.",
)
admission_policy: Literal["queue", "reject"] = Field(
default="queue",
description="Whether a full execution pool queues work or rejects it immediately.",
)
queue_timeout_seconds: int = Field(
default=300,
ge=1,
le=86_400,
description="Maximum wait for a queued native subagent before it fails admission.",
)