Skip to content

Commit d5b0417

Browse files
committed
JFR configuration mentioned
1 parent 00373bf commit d5b0417

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,27 @@ Run it directly:
215215
./examples/calculator
216216
```
217217

218+
### JFR Configuration
219+
220+
zsmith emits JDK Flight Recorder events for every agent turn, Claude API call, tool invocation, sub-agent dispatch, skill load, and memory access — all under the `zsmith` category. To record them while running the calculator, add `-XX:StartFlightRecording` to the shebang:
221+
222+
```java
223+
#!/usr/bin/java -XX:StartFlightRecording=filename=calculator.jfr,dumponexit=true,settings=profile --class-path=../zsmith/zbo/zsmith.jar --source 25
224+
```
225+
226+
Open `calculator.jfr` in JDK Mission Control and filter the event browser by category `zsmith` to see:
227+
228+
| Event | Category | What it captures |
229+
|-------|----------|------------------|
230+
| `airhacks.zsmith.agent.Turn` | `zsmith / agent` | One iteration of the chat loop with stop reason and tool counts |
231+
| `airhacks.zsmith.claude.APICall` | `zsmith / claude` | HTTP call to the Anthropic Messages API with token usage |
232+
| `airhacks.zsmith.tools.Invocation` | `zsmith / tools` | Single tool execution with outcome and result size |
233+
| `airhacks.zsmith.subagent.Dispatch` | `zsmith / subagent` | Delegation to a sub-agent |
234+
| `airhacks.zsmith.skills.Load` | `zsmith / skills` | Skill read from disk during `SkillStore` init |
235+
| `airhacks.zsmith.memory.Access` | `zsmith / memory` | Read or write of a persistent memory store |
236+
237+
For a focused recording, pass a custom `.jfc` file enabling only the `airhacks.zsmith.*` events via `settings=zsmith.jfc`.
238+
218239
## Skills
219240

220241
Skills are reusable prompt snippets stored as `SKILL.md` files. Each skill uses frontmatter for metadata:

0 commit comments

Comments
 (0)