Implementation:AMAP ML SkillClaw SkillClawLauncher
| Knowledge Sources | |
|---|---|
| Domains | Service_Orchestration, Developer_Tools |
| Last Updated | 2026-10-22 00:00 GMT |
Overview
Concrete tool for orchestrating SkillClaw service startup — proxy server, skill manager, PRM scorer, validation worker, and CLI agent auto-configuration.
Description
The SkillClawLauncher class coordinates the lifecycle of all client-side SkillClaw components. On `start()`, it reads config, creates a SkillManager (if skills are enabled), creates a PRMScorer (if PRM is configured), optionally auto-pulls shared skills from storage, creates and starts the SkillClawAPIServer proxy, auto-configures the target CLI agent via configure_claw, and optionally starts a background ValidationWorker.
Usage
Import and use when you need to:
- Start the full SkillClaw proxy stack via `skillclaw start` CLI command
- Understand the initialization order of SkillClaw components
- Programmatically launch the proxy with custom configuration
Code Reference
Source Location
- Repository: SkillClaw
- File: `skillclaw/launcher.py:L40-198`, `skillclaw/claw_adapter.py:L70-83`
Signature
class SkillClawLauncher:
"""Orchestrates SkillClaw proxy + skills + PRM + validation startup."""
def __init__(self, config_store: ConfigStore | None = None):
"""Initialize with optional ConfigStore (defaults to standard config)."""
async def start(self) -> None:
"""Read config, create components, start proxy, configure CLI agent."""
def stop(self) -> None:
"""Signal stop, stop validation worker and API server, remove PID file."""
async def _run(self, cfg: SkillClawConfig) -> None:
"""Internal: create SkillManager, PRMScorer, auto-pull, start server."""
def configure_claw(cfg: SkillClawConfig) -> None:
"""Dispatch to the appropriate CLI agent adapter based on cfg.claw_type."""
Import
from skillclaw.launcher import SkillClawLauncher
from skillclaw.claw_adapter import configure_claw
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| config_store | None | No | Config source (defaults to ConfigStore()) |
| cfg | SkillClawConfig | Yes (internal) | Typed config from ConfigStore.to_skillclaw_config() |
Outputs
| Name | Type | Description |
|---|---|---|
| start() side effects | Running services | FastAPI proxy on cfg.proxy_host:cfg.proxy_port, optional ValidationWorker, auto-configured CLI agent |
| stop() side effects | Stopped services | All services stopped, PID file removed |
Usage Examples
Standard Startup
import asyncio
from skillclaw.launcher import SkillClawLauncher
# Start SkillClaw (reads config from ~/.skillclaw/config.yaml)
launcher = SkillClawLauncher()
asyncio.run(launcher.start())
# Proxy is now running, CLI agent is auto-configured
Programmatic Control
import asyncio
from skillclaw.launcher import SkillClawLauncher
launcher = SkillClawLauncher()
# Start in background task
async def main():
task = asyncio.create_task(launcher.start())
await asyncio.sleep(60) # Run for 1 minute
launcher.stop()
await task
asyncio.run(main())