Skip to content

Commit 02df4b5

Browse files
committed
docs: define OpenClaw profile layers
1 parent 8333199 commit 02df4b5

1 file changed

Lines changed: 69 additions & 56 deletions

File tree

rfcs/0009-agent-profiles.md

Lines changed: 69 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@ rfc_pr: https://github.com/openclaw/rfcs/pull/18
1515
## Summary
1616

1717
Replace OpenClaw's binary `experimental.localModelLean` behavior with a
18-
versioned Agent Profile system. An Agent Profile is a bounded, declarative
19-
artifact that tells an agent harness which shared behavior and harness-specific
20-
behavior to use for a resolved model: tool exposure, Tool Search defaults,
21-
system prompt sources, and supported thinking levels. It is separate from
22-
model identity, provider drivers, and managed-local serving presets. Phase one
23-
preserves four requested model-size classes as metadata, ships two size-derived
24-
behavioral baselines, migrates existing Lean/GPT-5/Claude model-specific
25-
behavior onto profiles, and leaves KV cache and engine tuning outside profiles.
18+
schema-validated Agent Profile system. An Agent Profile is a bounded,
19+
declarative artifact that tells an agent harness which shared behavior and
20+
harness-specific behavior to use for a resolved model: tool exposure, Tool
21+
Search defaults, system prompt sources, and supported thinking levels. It is
22+
separate from model identity, provider drivers, and managed-local serving
23+
presets. Phase one preserves four requested model-size classes as metadata,
24+
ships `openclaw/base` plus size-derived child profiles, migrates existing
25+
Lean/GPT-5/Claude model-specific behavior onto profiles, and leaves KV cache
26+
and engine tuning outside profiles.
2627

2728
## Motivation
2829

@@ -53,13 +54,13 @@ hosted providers a consistent way to opt into portable model-family behavior.
5354

5455
## Goals
5556

56-
- Replace `experimental.localModelLean` with versioned, testable Agent Profiles.
57+
- Replace `experimental.localModelLean` with named, testable Agent Profiles.
5758
- Preserve current Lean behavior exactly during migration.
5859
- Centralize existing GPT-5 response-style and Claude/Opus thinking-default
5960
behavior under the profile resolution system.
6061
- Keep four model size classes available as model metadata and diagnostics.
61-
- Ship a conservative phase-one fallback: lean behavior for trusted models up
62-
to 20B parameters and full behavior otherwise.
62+
- Ship `openclaw/base` plus size-derived OpenClaw child profiles, with Lean
63+
behavior preserved in `openclaw/small`.
6364
- Make model identity, harness behavior, driver behavior, and local serving
6465
configuration separate ownership layers.
6566
- Provide deterministic selection, clear precedence, and explainable
@@ -167,7 +168,7 @@ Size-derived fallback requires trusted structured metadata:
167168
Generic OpenAI-compatible endpoints, including common vLLM and SGLang
168169
discovery paths, often expose only model ids. They report unknown model size
169170
unless a registry/artifact binding supplies the missing fact. Unknown model
170-
size uses the full profile.
171+
size uses `openclaw/base`.
171172

172173
### Registry and manifest format
173174

@@ -239,7 +240,7 @@ An Agent Profile pack is a directory with a required `profile.yaml` file. The
239240
folder is the boundary for any files the profile references:
240241

241242
```text
242-
qwen3-6-35b-a3b-profile-v1/
243+
acme-1-30b/
243244
├── profile.yaml
244245
├── prompts/
245246
│ └── system.md
@@ -253,7 +254,7 @@ apiVersion: agentprofiles.io/v1
253254
kind: AgentProfile
254255
metadata:
255256
namespace: openclaw
256-
name: qwen3-6-35b-a3b-profile-v1
257+
name: acme-1-30b
257258
spec:
258259
common:
259260
systemPrompt:
@@ -308,7 +309,7 @@ Profile resolution is deterministic and chooses one profile:
308309
4. Exact canonical-model binding.
309310
5. Provider-scoped model-family binding.
310311
6. Trusted model-size-class binding.
311-
7. `openclaw/full-profile-v1`.
312+
7. `openclaw/base`.
312313

313314
```ts
314315
type AgentProfileSelectionSource =
@@ -339,28 +340,30 @@ diagnostics; it does not invent a provider payload.
339340

340341
### Initial profiles
341342

342-
Phase one deliberately keeps four model size classes but ships two
343-
size-derived behavioral baselines:
343+
Phase one deliberately keeps four model size classes and gives OpenClaw one
344+
base profile plus size-derived child profiles:
344345

345346
| Profile | Parent | Binding intent | Purpose |
346347
| --- | --- | --- | --- |
347-
| `openclaw/full-profile-v1` | none | fallback; Medium/Large | general harness baseline |
348-
| `openclaw/lean-profile-v1` | `full-profile-v1` | trusted Tiny/Small; legacy config | exact Lean migration |
349-
| `openclaw/gpt-5-profile-v1` | `full-profile-v1` | current GPT-5 family behavior | system prompt source and response-style setting |
350-
| `openclaw/anthropic-profile-v1` | `full-profile-v1` | shared Anthropic/Claude behavior | base profile for Claude-family overrides |
351-
| `openclaw/claude-opus-4-7-profile-v1` | `anthropic-profile-v1` | current exact Opus 4.7/4.8 behavior | preserves thinking default |
352-
| `openclaw/claude-4-6-profile-v1` | `anthropic-profile-v1` | current direct Anthropic Claude 4.6 behavior | preserves adaptive thinking default |
348+
| `openclaw/base` | none | fallback; shared OpenClaw behavior | general harness baseline |
349+
| `openclaw/small` | `openclaw/base` | trusted Tiny/Small; legacy config | exact Lean migration |
350+
| `openclaw/medium` | `openclaw/base` | trusted Medium | stable medium-size layer |
351+
| `openclaw/large` | `openclaw/base` | trusted Large | stable large-size layer |
352+
| `openclaw/gpt-5` | `openclaw/base` | current GPT-5 family behavior | system prompt source and response-style setting |
353+
| `openclaw/claude` | `openclaw/base` | shared Claude behavior | base profile for Claude-family overrides |
354+
| `openclaw/claude-opus-4-7` | `openclaw/claude` | current exact Opus 4.7/4.8 behavior | preserves thinking default |
355+
| `openclaw/claude-4-6` | `openclaw/claude` | current direct Claude 4.6 behavior | preserves adaptive thinking default |
353356

354357
The exact model aliases and family identities remain in canonical model/provider
355358
catalogs. Registry bindings refer to normalized identity; profiles are not a
356359
second model catalog.
357360

358-
`full-profile-v1` is behaviorally neutral:
361+
`openclaw/base` is behaviorally neutral:
359362

360363
```json
361364
{
362365
"schemaVersion": 1,
363-
"id": "openclaw/full-profile-v1",
366+
"id": "openclaw/base",
364367
"spec": {
365368
"common": {
366369
"systemPrompt": {
@@ -373,15 +376,16 @@ second model catalog.
373376
}
374377
```
375378

376-
`lean-profile-v1` is the exact migration target for
379+
`openclaw/small` is the exact migration target for
377380
`experimental.localModelLean: true`:
378381

379382
```json
380383
{
381384
"schemaVersion": 1,
382-
"id": "openclaw/lean-profile-v1",
383-
"extends": "openclaw/full-profile-v1",
385+
"id": "openclaw/small",
386+
"extends": "openclaw/base",
384387
"spec": {
388+
"common": {},
385389
"openclaw.ai": {
386390
"toolProfile": "lean",
387391
"contextPosture": "constrained"
@@ -390,6 +394,10 @@ second model catalog.
390394
}
391395
```
392396

397+
`openclaw/medium` and `openclaw/large` inherit `openclaw/base` in phase one.
398+
They create stable size layers for future benchmark-backed overrides without
399+
changing the fallback profile.
400+
393401
The OpenClaw `lean` tool profile preserves today's behavior:
394402

395403
- filter `browser`, `cron`, and `message` from normal model tool exposure;
@@ -399,7 +407,7 @@ The OpenClaw `lean` tool profile preserves today's behavior:
399407

400408
The broader deny list proposed in local-model Lean PR `#87617` is not a
401409
compatible migration. It may be a later explicitly selected and benchmarked
402-
profile, such as `compact-profile-v2`, but must not alter `lean-profile-v1`.
410+
profile, such as `openclaw/compact`, but must not alter `openclaw/small`.
403411

404412
The routing mechanism explored in `#87587`, where named tools can remain
405413
direct, is useful as an implementation detail:
@@ -420,13 +428,13 @@ source:
420428
```json
421429
{
422430
"schemaVersion": 1,
423-
"id": "openclaw/gpt-5-profile-v1",
424-
"extends": "openclaw/full-profile-v1",
431+
"id": "openclaw/gpt-5",
432+
"extends": "openclaw/base",
425433
"spec": {
426434
"common": {
427435
"systemPrompt": {
428436
"file": {
429-
"path": "./prompts/gpt-5-v1.md"
437+
"path": "./prompts/gpt-5.md"
430438
}
431439
}
432440
},
@@ -445,8 +453,8 @@ The Claude/Opus profiles migrate only existing thinking-default selection:
445453
```json
446454
{
447455
"schemaVersion": 1,
448-
"id": "openclaw/claude-opus-4-7-profile-v1",
449-
"extends": "openclaw/anthropic-profile-v1",
456+
"id": "openclaw/claude-opus-4-7",
457+
"extends": "openclaw/claude",
450458
"spec": {
451459
"common": {
452460
"thinkingLevel": "off"
@@ -458,9 +466,10 @@ The Claude/Opus profiles migrate only existing thinking-default selection:
458466
```json
459467
{
460468
"schemaVersion": 1,
461-
"id": "openclaw/claude-4-6-profile-v1",
462-
"extends": "openclaw/anthropic-profile-v1",
469+
"id": "openclaw/claude-4-6",
470+
"extends": "openclaw/claude",
463471
"spec": {
472+
"common": {},
464473
"openclaw.ai": {
465474
"thinkingLevel": "adaptive"
466475
}
@@ -676,7 +685,7 @@ Phase one adds one narrow selector at defaults and agent scope:
676685
"list": [
677686
{
678687
"id": "local-helper",
679-
"agentProfileId": "openclaw/lean-profile-v1"
688+
"agentProfileId": "openclaw/small"
680689
}
681690
]
682691
}
@@ -693,7 +702,7 @@ Settings are namespaced to the selected profile's closed settings schema:
693702
{
694703
"agents": {
695704
"defaults": {
696-
"agentProfileId": "openclaw/gpt-5-profile-v1",
705+
"agentProfileId": "openclaw/gpt-5",
697706
"settings": {
698707
"responseStyle": "off"
699708
}
@@ -728,9 +737,9 @@ shapes.
728737

729738
| Legacy input | Canonical output | Notes |
730739
| --- | --- | --- |
731-
| default `experimental.localModelLean: true` | default `agentProfileId: "openclaw/lean-profile-v1"` | preserves explicit Lean intent |
732-
| agent `experimental.localModelLean: true` | agent `agentProfileId: "openclaw/lean-profile-v1"` | preserves stronger scope |
733-
| legacy Lean `false` | remove legacy field | no explicit full profile needed |
740+
| default `experimental.localModelLean: true` | default `agentProfileId: "openclaw/small"` | preserves explicit Lean intent |
741+
| agent `experimental.localModelLean: true` | agent `agentProfileId: "openclaw/small"` | preserves stronger scope |
742+
| legacy Lean `false` | remove legacy field | no explicit base profile needed |
734743
| GPT-5 overlay personality | GPT response-style setting | preserves `friendly`/`off` |
735744
| OpenAI plugin personality fallback | GPT response-style setting when no more-specific canonical value exists | preserves current precedence |
736745

@@ -796,17 +805,18 @@ serving boundary before any ClawHub or community registry is trusted.
796805
2. Open an implementation issue with owners across agent runtime, config/doctor,
797806
OpenAI, Anthropic, Codex, and local serving.
798807
3. Freeze initial profile ids and model size boundaries.
799-
4. Confirm that `lean-profile-v1` is an exact migration rather than an
808+
4. Confirm that `openclaw/small` is an exact Lean migration rather than an
800809
opportunity to expand its tool deny list.
801810
5. Add identity/model size types, registry schema, built-in registry,
802811
resolver, binding validation, and diagnostics.
803-
6. Add `full-profile-v1` and `lean-profile-v1`.
812+
6. Add `openclaw/base`, `openclaw/small`, `openclaw/medium`, and
813+
`openclaw/large`.
804814
7. Thread the resolved profile through run planning, tools, and prompt
805815
composition.
806816
8. Move Lean logic and doctor-migrate legacy Lean config.
807-
9. Add `gpt-5-profile-v1`, migrate response-style config, and replace direct
817+
9. Add `openclaw/gpt-5`, migrate response-style config, and replace direct
808818
prompt overlay resolution.
809-
10. Add `anthropic-profile-v1` plus exact Claude/Opus derived profiles, and move
819+
10. Add `openclaw/claude` plus exact Claude/Opus derived profiles, and move
810820
only existing thinking-default selection branches.
811821
11. Add profile inspection and documentation.
812822
12. Remove retired runtime config reads and helper/re-export paths.
@@ -890,7 +900,7 @@ Registry and resolver:
890900
- reject missing `profile.yaml` files, prompt paths that escape the profile
891901
folder, request-time remote fetches, and ambiguous inherited outputs;
892902
- table-test every model size boundary;
893-
- prove unknown/untrusted model size selects `full-profile-v1`;
903+
- prove unknown/untrusted model size selects `openclaw/base`;
894904
- prove exact artifact beats model, family, and model size;
895905
- prove explicit agent/default selection precedence;
896906
- prove selection source and selector diagnostics are stable.
@@ -926,7 +936,7 @@ Hosted provider regression:
926936

927937
Diagnostics:
928938

929-
- expose canonical model, model size/provenance, selected profile/version,
939+
- expose canonical model, model size/provenance, selected profile id,
930940
selection source, matching selector, and driver capability fallback;
931941
- never expose prompt text, credentials, raw provider errors, or local paths.
932942

@@ -950,22 +960,25 @@ portable harness behavior system. Calling a driver a profile would hide its
950960
protocol and payload responsibilities. The split makes ownership clear and
951961
prevents a local performance setting from reaching a public provider.
952962

953-
### Four model size classes, two phase-one baselines
963+
### Size-derived OpenClaw layers
954964

955965
The four requested model size classes are useful for reporting, bindings, and
956-
later benchmarking. They do not yet justify four different prompt/tool
957-
configurations. An `xsmall` class is intentionally omitted for now to keep
966+
later benchmarking. An `xsmall` class is intentionally omitted for now to keep
958967
phase one simple; it can be added later if evidence shows the `small` range
959968
needs to be split.
960969

961-
Two initial behavior baselines have a concrete purpose:
970+
OpenClaw ships one base profile and three size-derived child layers:
962971

963-
- `lean-profile-v1` is a compatibility target for existing explicit Lean users
964-
and trusted models up to 20B.
965-
- `full-profile-v1` is the safe fallback for larger and unknown models.
972+
- `openclaw/base` is the safe fallback for unknown or untrusted model size.
973+
- `openclaw/small` inherits `openclaw/base` and is the compatibility target for
974+
existing explicit Lean users and trusted Tiny/Small models.
975+
- `openclaw/medium` inherits `openclaw/base` and starts without extra behavior
976+
until benchmarks justify a medium-size override.
977+
- `openclaw/large` inherits `openclaw/base` and starts without extra behavior
978+
until benchmarks justify a large-size override.
966979

967-
This avoids premature tuning policy while retaining a stable place to add
968-
benchmark-backed profiles later.
980+
This avoids premature tuning policy while retaining stable profile ids for
981+
benchmark-backed size behavior later.
969982

970983
### Explicit system prompt sources
971984

0 commit comments

Comments
 (0)