Skip to content

docs(evaluator): showcase custom AgentStreamTranslator hook on the Hermes example #750

Merged
ngoncharenko merged 9 commits into
mainfrom
ngoncharenko/aalgo-353-hermes-custom-stream-parsing
Jul 25, 2026
Merged

docs(evaluator): showcase custom AgentStreamTranslator hook on the Hermes example #750
ngoncharenko merged 9 commits into
mainfrom
ngoncharenko/aalgo-353-hermes-custom-stream-parsing

Conversation

@ngoncharenko

@ngoncharenko ngoncharenko commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a runnable Hermes /v1/responses SSE evaluation using GenericAgent
  • translate the terminal response.completed frame into ATIF-v1.7 with token metrics
  • score the extracted response with a deterministic keyword metric
  • document where response_path is applied to SSE data: frames and how custom translators consume captured frames
  • cover the request contract, authentication, ATIF evidence, metric pass/fail behavior, and malformed terminal streams with a recorded transcript

Why

Customers evaluating custom streaming agents need a concrete example of keeping the shared HTTP/SSE transport generic while translating application-specific frames into canonical trajectory evidence.

The example validates API_SERVER_KEY before transport, points to the Hermes API-server setup documentation when it is missing, and never embeds or prints the credential.

Validation

  • example.py is tested on a local Hermes deployment
  • uv run --frozen pytest packages/nemo_evaluator_sdk/tests/agent_eval/test_hermes_example.py -q — 7 passed
  • scoped ruff check and ruff format --check
  • scoped ty check
  • make docs-check
  • git diff --check origin/main...HEAD

Live Hermes validation was skipped because API_SERVER_KEY is not exported in this environment; the recorded-SSE path validates the complete request and response flow.

Linear

AALGO-353 — GenericAgent Custom Stream Parsing Docs

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Added customer-facing support for streaming SSE agent evaluations, including response-frame extraction and ATIF-v1.7 translation for candidate outputs.
    • Introduced a Hermes Responses SSE example with an async keyword-containment metric and evidence capture.
  • Documentation

    • Updated evaluator architecture and added guidance for “Streaming SSE agents” behavior and configuration.
  • Bug Fixes

    • Improved demo server logging suppression and made trial output reporting resilient to missing outputs.
  • Tests

    • Added end-to-end Hermes SSE tests, metric and translator validation, incomplete-stream error handling, and missing-token failure checks.

@github-actions github-actions Bot added the docs label Jul 17, 2026
@ngoncharenko
ngoncharenko marked this pull request as ready for review July 17, 2026 03:44
@ngoncharenko
ngoncharenko requested review from a team as code owners July 17, 2026 03:44
@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 27239/34958 77.9% 62.2%
Integration Tests 15999/33670 47.5% 19.9%

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 34335518-b3db-497a-a351-7d591569b701

📥 Commits

Reviewing files that changed from the base of the PR and between 1094538 and 479e9c2.

📒 Files selected for processing (4)
  • docs/evaluator/agent-eval/evaluate-deployed-agent.mdx
  • packages/nemo_evaluator_sdk/examples/hermes/example.py
  • packages/nemo_evaluator_sdk/src/nemo_evaluator_sdk/agent_eval/docs/architecture.md
  • packages/nemo_evaluator_sdk/tests/agent_eval/test_hermes_example.py
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/nemo_evaluator_sdk/examples/hermes/example.py
  • docs/evaluator/agent-eval/evaluate-deployed-agent.mdx
  • packages/nemo_evaluator_sdk/src/nemo_evaluator_sdk/agent_eval/docs/architecture.md

📝 Walkthrough

Walkthrough

Adds Hermes Responses SSE evaluation through GenericAgent, ATIF-v1.7 translation, keyword scoring, streaming documentation, and tests covering successful, incomplete, malformed, and credential-missing flows.

Changes

Hermes SSE evaluation

Layer / File(s) Summary
Streaming architecture and Hermes flow
packages/nemo_evaluator_sdk/src/nemo_evaluator_sdk/agent_eval/docs/architecture.md
Documents Hermes SSE parsing, event handling, evidence retention, translation, reporting, and evaluator integration.
Hermes example implementation
packages/nemo_evaluator_sdk/examples/hermes/example.py
Adds Hermes response translation, keyword scoring, token validation, streaming evaluator setup, and an async entry point.
Example replay and failure validation
packages/nemo_evaluator_sdk/tests/agent_eval/test_hermes_example.py
Tests request configuration, output, scoring, evidence, translation validation, incomplete streams, and missing credentials.
Evaluation usage documentation
docs/evaluator/agent-eval/evaluate-deployed-agent.mdx
Updates async evaluation examples and adds streaming SSE and Hermes configuration guidance.

Sequence Diagram(s)

sequenceDiagram
  participant GenericAgent
  participant HermesEndpoint
  participant AgentEvaluator
  participant HermesStreamTranslator
  GenericAgent->>HermesEndpoint: Send streaming Responses request
  HermesEndpoint-->>AgentEvaluator: Return SSE frames
  AgentEvaluator->>HermesStreamTranslator: Translate completed response
  HermesStreamTranslator-->>AgentEvaluator: Return trajectory and metrics
Loading

Possibly related PRs

Suggested labels: feat

Suggested reviewers: sandychapman

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: showcasing a custom AgentStreamTranslator hook in the Hermes example.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ngoncharenko/aalgo-353-hermes-custom-stream-parsing

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/evaluator/agent-eval/evaluate-deployed-agent.mdx`:
- Around line 113-160: Add a Fern tab-set around the Streaming SSE agents
example with separate Python SDK and CLI tabs. Keep the existing Python example,
and add the equivalent CLI configuration and invocation for the SSE workflow; if
the CLI cannot accept custom stream translators, explicitly state that
limitation and direct users to the Python example.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 5f1a9679-ec94-46b9-9497-b002670a9700

📥 Commits

Reviewing files that changed from the base of the PR and between 2412ab7 and 3c9b387.

📒 Files selected for processing (4)
  • docs/evaluator/agent-eval/evaluate-deployed-agent.mdx
  • packages/nemo_evaluator_sdk/examples/hermes/example.py
  • packages/nemo_evaluator_sdk/src/nemo_evaluator_sdk/agent_eval/docs/architecture.md
  • packages/nemo_evaluator_sdk/tests/agent_eval/test_hermes_example.py

Comment thread docs/evaluator/agent-eval/evaluate-deployed-agent.mdx

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/nemo_evaluator_sdk/examples/hermes/example.py`:
- Line 39: Restore the API_SERVER_KEY credential contract by defining and using
API_SERVER_KEY_ENV_NAME instead of HERMES_TOKEN_ENV_NAME. Update
_require_api_server_key() and SecretRef, including the related references, so
they read the API_SERVER_KEY environment variable and expose the expected
constant for missing-key tests.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 791674b0-8547-4c74-b3d3-7287a4d87143

📥 Commits

Reviewing files that changed from the base of the PR and between 3c9b387 and 3c671e9.

📒 Files selected for processing (2)
  • packages/nemo_evaluator_sdk/examples/hermes/example.py
  • packages/nemo_evaluator_sdk/tests/agent_eval/test_hermes_example.py

Comment thread packages/nemo_evaluator_sdk/examples/hermes/example.py
@ngoncharenko
ngoncharenko force-pushed the ngoncharenko/aalgo-353-hermes-custom-stream-parsing branch from cb8030a to 582e20a Compare July 17, 2026 05:01
@ngoncharenko ngoncharenko changed the title docs(evaluator): add Hermes SSE agent evaluation example docs(evaluator): showcase custom StreamTranslator hook with Hermes example Jul 17, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@packages/nemo_evaluator_sdk/src/nemo_evaluator_sdk/agent_eval/docs/architecture.md`:
- Line 2: Update the architecture document heading so it begins with the
required H1 title, then retain “GenericAgent streaming with optional
translation” as an H2 with blank lines before and after it to satisfy MD041 and
MD022.
- Around line 467-470: Add a tab set in the architecture documentation section
containing both the existing validated Python SDK configuration and an
equivalent validated CLI configuration for the GenericAgent setup. Preserve the
current Python example, add the required CLI alternative with matching URL and
agent settings, and use the documentation’s established tab-set syntax.
- Around line 525-529: Append a “Next Steps” section to the end of
architecture.md, adding cross-links to related streaming configuration and
reference documentation. Keep the existing architecture content unchanged and
use the repository’s established documentation link style and relevant
destination pages.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 229b67c9-42a7-4f81-add4-1e9ee5da1b4e

📥 Commits

Reviewing files that changed from the base of the PR and between cb8030a and 582e20a.

📒 Files selected for processing (4)
  • docs/evaluator/agent-eval/evaluate-deployed-agent.mdx
  • packages/nemo_evaluator_sdk/examples/hermes/example.py
  • packages/nemo_evaluator_sdk/src/nemo_evaluator_sdk/agent_eval/docs/architecture.md
  • packages/nemo_evaluator_sdk/tests/agent_eval/test_hermes_example.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • docs/evaluator/agent-eval/evaluate-deployed-agent.mdx
  • packages/nemo_evaluator_sdk/examples/hermes/example.py

@ngoncharenko ngoncharenko changed the title docs(evaluator): showcase custom StreamTranslator hook with Hermes example docs(evaluator): showcase custom AgentStreamTranslator hook on the Hermes example Jul 17, 2026
@ngoncharenko ngoncharenko self-assigned this Jul 17, 2026

@arpitsardhana arpitsardhana left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nits.

Comment thread packages/nemo_evaluator_sdk/examples/hermes/example.py
Comment thread packages/nemo_evaluator_sdk/examples/hermes/example.py Outdated
Comment thread packages/nemo_evaluator_sdk/examples/hermes/example.py
Signed-off-by: Nick Goncharenko <[email protected]>
Signed-off-by: Nick Goncharenko <[email protected]>
Signed-off-by: Nick Goncharenko <[email protected]>
Signed-off-by: Nick Goncharenko <[email protected]>
Signed-off-by: Nick Goncharenko <[email protected]>
@ngoncharenko
ngoncharenko force-pushed the ngoncharenko/aalgo-353-hermes-custom-stream-parsing branch from 3e2fba3 to 479e9c2 Compare July 21, 2026 00:07
@ngoncharenko
ngoncharenko added this pull request to the merge queue Jul 25, 2026
Merged via the queue into main with commit 4496535 Jul 25, 2026
106 of 109 checks passed
@ngoncharenko
ngoncharenko deleted the ngoncharenko/aalgo-353-hermes-custom-stream-parsing branch July 25, 2026 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants