Skip to content

Documented journal schema or event sink, so blocked calls can reach audit trails #20

Open

Description

@blitzcrieg1

Thanks for releasing this. Because a blocked call is replaced before the harness sees it, hook-based recorders never see that attempt, so the blocked call exists only in calls.jsonl.

I maintain Agentmetry (https://github.com/blitzcrieg1/agentmetry), an open-source sensor that records the tool calls agents report through their hooks in a tamper-evident trail and forwards to a SIEM. A blocked attempt is exactly what a security team would want in that record, and the two tools seem complementary.

Would you be open to one of these?

  1. Documenting the calls.jsonl fields as a stable format.
  2. A session or conversation ID on each entry, so a blocked call can be linked to the rest of that session.
  3. An optional event sink, such as a command or webhook called for each non-pass verdict.

Even just the first would make an adapter possible. If this is out of scope, no problem. I'm happy to write the adapter on my side if the format is stable.

Activity

  1. younesbelkada commented on Nov 9, 2026

    @younesbelkada
    Collaborator

    Hi @blitzcrieg1 thanks a lot for the request ! Very interesting work on your library !
    I made 1- in 2a178aa (let me know if you want me to elaborate further)

    Regarding 2-, we will need a way to store session IDs so that it will be compatible with most of coding harnesses. I was thinking of creating a unique hash derived from the system prompt + first user question + harness name (I need to check how we can retrieve this from a bare request). Let me know if there is a better way.

    About 3-, this would be interesting indeed, but I need more details if possible. Would it be possible for you to file a small RFC by following the guideline in https://github.com/huggingface/safeagents/blob/main/CONTRIBUTING.md and we'll take it from there 🙏 ?

    Happy also to document / mention your work as done in 353bcaa recently

  2. blitzcrieg1 commented on Nov 9, 2026

    @blitzcrieg1
    ContributorAuthor

    Thanks, this is great, and thank you for documenting the journal so quickly. That is exactly what an adapter needs. A mention in Related work would be very welcome: Agentmetry records the tool calls agents report through their hooks in a tamper-evident trail and forwards to a SIEM, so the two tools cover different layers.

    On session IDs, a hash could work as a fallback, but two sessions that start the same way would collide, and it couldn't be matched to the session ID a hook reports. Some harnesses already send one on each request: Claude Code documents x-claude-code-session-id, and Codex sends session-id and thread-id. Reading those first and falling back to your hash would give a real ID where one exists. I haven't confirmed yet that those values equal the session ID each harness gives its hooks, and I can test that if useful.

    For the sink, I'll open a short RFC following CONTRIBUTING.md.

  3. younesbelkada commented on Nov 10, 2026

    @younesbelkada
    Collaborator

    Thanks a lot @blitzcrieg1 !
    Just added a mention of Agentmetry on the README. Thanks also for the RFC, I'll look at everything shortly and revert back!

  4. blitzcrieg1 commented on Nov 10, 2026

    @blitzcrieg1
    ContributorAuthor

    Thanks, Younes. The README description captures the distinction well, and I appreciate you documenting the journal format. I'll wait for your feedback on #24 before proceeding with the sink proposal.

  5. blitzcrieg1 commented on Nov 28, 2026

    @blitzcrieg1
    ContributorAuthor

    Update from the Agentmetry side: the opt-in sink we proposed in #24 has landed (merged in #30 with docs/sink.md), which answers the event-sink half of this issue. We now consume blocked guard calls through the sink.

    The remaining half is the documented, stable calls.jsonl schema: field list, types, and what a consumer can rely on. Happy to draft that documentation as a PR if useful. If the sink plus its docs cover what you want to support, this issue can be narrowed or closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions