본문으로 건너뛰기
cccskills
무료GitHub에 공개

openclaw

References OpenClaw internals and integration points. Covers Gateway protocol, agent runtime, session management, tool system, and serverless integration. Use when working with OpenClaw APIs or debugging agent behavior.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

serithemage/serverless-openclaw스타 196(GitHub 196 + cccskills 0)
연동 도구AWS

실행 점수 미검증

설치 방법 보기

포함된 파일(1)

  • SKILL.md5.1 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

OpenClaw Internals Reference

Full analysis: docs/openclaw-analysis.md

Key Facts

PropertyValue
Version pinnedv2026.2.13 (v2026.2.14 breaks — default-deny scope)
Codebase size~675K lines TypeScript
RuntimeNode.js >=22.12.0, pnpm monorepo, tsdown bundler
Gateway WS port:18789
HTTP port:18790
Config path~/.openclaw/openclaw.json (NOT ~/.config/openclaw/)
Session files~/.openclaw/agents/{id}/sessions/{sid}.jsonl

Entry Points

EntryPurpose
runEmbeddedPiAgent()Run agent in-process, independent of Gateway WS server — the key Lambda integration point
extensionAPI.jsLibrary entry point (NOT in package.json exports map — must use file:// URL import)
openclaw gateway runStart full Gateway WS server (subcommand required, plain openclaw gateway just waits)
// Correct import pattern for Lambda
const ocRoot = process.env.OPENCLAW_ROOT!;
const { extensionAPI } = await import(`file://${ocRoot}/dist/extensionAPI.js`);

SessionManager

  • SessionManager.open(id) — synchronous fs read, JSONL format
  • Returns [] if session file is missing (safe to call on first run)
  • Sessions are append-only JSONL transcripts, compacted periodically
  • SessionLock prevents concurrent access to same session (critical for Lambda concurrency)

Gateway Protocol (JSON-RPC 2.0 over WebSocket)

Handshake Sequence

1. GW → client:  { type: "event", event: "connect.challenge", data: { challenge } }
2. client → GW:  { type: "req", id: 1, method: "connect", params: { client: { id: "gateway-client", mode: "backend" }, response: <challenge-response> } }
3. GW → client:  { type: "res", id: 1, result: { status: "hello-ok", snapshot: { sessionDefaults: { mainSessionKey } } } }

Sending a Message

// sessionKey obtained from hello-ok snapshot
{ type: "req", id: 2, method: "chat.send", params: { sessionKey, message: "..." } }

Streaming Response

// Stream chunks
{ type: "event", event: "chat", data: { state: "delta", content: "..." } }
// Final
{ type: "event", event: "chat", data: { state: "final", content: "..." } }
// Error
{ type: "event", event: "chat", data: { state: "error", error: "..." } }

Valid client Field Values

  • client.id: "cli", "gateway-client", "webchat-ui", etc. (TypeBox Literal)
  • client.mode: "cli", "backend", "ui", "node" — NOT "operator" (invalid)
  • device field: Optional — omit entirely (empty publicKey/signature strings fail validation)

Config Requirements

{
  "gateway": { "mode": "local" },
  "auth": { "method": "env" }
}
  • auth.method key: removed in recent versions (invalid if present)
  • gateway.mode: "local" required for embedded operation
  • API keys via env vars only — never write to openclaw.json

Serverless Blockers (and How We Solved Them)

BlockerProblemSolution
Persistent WS serverAlways-running :18789Use runEmbeddedPiAgent() instead
Long-lived runs (10 min)Lambda timeoutLambda 15-min timeout + structured streaming
In-process tools (filesystem)/tmp only in LambdaHOME=/tmp, sessions in /tmp
SQLite vector storeWrite access needed/tmp mount
Plugin loading (~30-35s)Cold start overheadBedrock discovery disabled, pre-loaded
Bedrock auto-discovery56s scan on startupbedrockDiscovery.enabled: false

Fargate vs Lambda Runtime

AspectFargate (Phase 1)Lambda (Phase 2)
Entryopenclaw gateway runrunEmbeddedPiAgent()
Session statePersistent (~/.openclaw)/tmp (ephemeral)
Cold start40-57s1.35s
Concurrent users1 per taskMany (separate invocations)
Cost~$0/month idlePer-invocation

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

References Serverless OpenClaw architecture. Covers network design, CDK stack structure, DynamoDB data model, API protocols, and container design.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

serithemage/serverless-openclaw1962026년 3월 29일 업데이트

References cold start optimization history and techniques. Covers Docker image optimization, Fargate CPU tuning, SOCI lazy loading, and Lambda Bedrock discovery fix. Use when optimizing startup performance.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

serithemage/serverless-openclaw1962026년 3월 29일 업데이트

context

무료

Loads Serverless OpenClaw project context. Provides background knowledge needed for development including project overview, tech stack, architecture decisions, and data models.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

serithemage/serverless-openclaw1962026년 3월 29일 업데이트

cost

무료

References Serverless OpenClaw cost optimization guidelines. Validates that no resources exceeding the cost target ($1/month) are created during implementation. Use when writing CDK stacks or making infrastructure changes.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

serithemage/serverless-openclaw1962026년 3월 29일 업데이트

deploy

무료

Deploys Serverless OpenClaw CDK stacks to AWS. Handles SecretsStack parameter injection, full/individual stack deployment, and Docker image push.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

serithemage/serverless-openclaw1962026년 3월 29일 업데이트

dev

무료

Development workflow guide. Covers build, test, lint, format commands, package structure, Git hooks, TDD methodology, and coding conventions. Use when setting up dev environment, running tests, or following project conventions.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

serithemage/serverless-openclaw1962026년 3월 29일 업데이트

serithemage의 스킬 모두 보기

이 스킬의 문제 신고