Skip to content

fix(nemo-agents): Support Studio multi-turn transcript replay for Fabric agents - #1015

Merged
mmogallapalli merged 3 commits into
mainfrom
mmogallapall/aircore-969-support-studio-transcript-replay-for-fabric-backed-agent
Jul 31, 2026
Merged

fix(nemo-agents): Support Studio multi-turn transcript replay for Fabric agents#1015
mmogallapalli merged 3 commits into
mainfrom
mmogallapall/aircore-969-support-studio-transcript-replay-for-fabric-backed-agent

Conversation

@mmogallapalli

@mmogallapalli mmogallapalli commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Serialize the complete OpenAI chat transcript into Fabric invocation input for multi-message requests.
  • Preserve the existing input exactly for single-message, one-shot requests.
  • Retain message roles and ordering so Studio can provide conversational context without managing Fabric session IDs.

Studio already provides multi-turn chat for NAT-backed agents by retaining the conversation client-side and resending the full OpenAI messages transcript on every turn. NAT-backed serving uses that replayed transcript as context rather than relying on a platform-managed session.

This change gives Fabric-backed agents parity with that existing Studio behavior. The Fabric shim translates the replayed transcript into a role-aware input string, while each request remains an independent invocation. Native Fabric session management and session-ID wiring remain separate follow-up work.

Testing

  • Added coverage for unchanged single-message input.
  • Added coverage for role-aware serialization of system, assistant, and user messages.
  • Verified the Fabric server unit suite: 25 passed.
  • Verified Ruff and git diff --check pass.

Studio Before:
Screenshot 2026-07-31 at 1 04 45 PM

Studio After:
Screenshot 2026-07-31 at 1 15 38 PM

Summary by CodeRabbit

  • Bug Fixes
    • Improved chat interactions by preserving the full conversation history when sending requests.
    • System, assistant, and user messages are now included in the proper order, providing better context for responses.

Signed-off-by: Manjesh Mogallapalli <mmogallapall@nvidia.com>
Signed-off-by: Manjesh Mogallapalli <mmogallapall@nvidia.com>
@mmogallapalli
mmogallapalli marked this pull request as ready for review July 31, 2026 18:24
@mmogallapalli
mmogallapalli requested review from a team as code owners July 31, 2026 18:24
@mmogallapalli
mmogallapalli requested a review from tylersbray July 31, 2026 18:24
@github-actions github-actions Bot added the fix label Jul 31, 2026
@mmogallapalli mmogallapalli self-assigned this Jul 31, 2026
@coderabbitai

coderabbitai Bot commented Jul 31, 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: 3c63708d-aa04-4add-9224-803ec3c74791

📥 Commits

Reviewing files that changed from the base of the PR and between 12bfdeb and b4af99a.

📒 Files selected for processing (1)
  • plugins/nemo-agents/src/nemo_agents_plugin/fabric/server.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • plugins/nemo-agents/src/nemo_agents_plugin/fabric/server.py

📝 Walkthrough

Walkthrough

Fabric invocation requests now include the full role-prefixed chat transcript. Unit tests cover single-user messages and multi-turn conversations.

Changes

Fabric transcript serialization

Layer / File(s) Summary
Serialize complete chat transcripts
plugins/nemo-agents/src/nemo_agents_plugin/fabric/server.py, plugins/nemo-agents/tests/unit/test_fabric_server.py
_to_fabric_invocation_request now joins all messages with role prefixes and blank lines. Tests verify single-user and system/assistant/user transcripts.

Possibly related PRs

Suggested reviewers: stefan-kickoff

🚥 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 and concisely describes the main change: replaying multi-turn Studio transcripts for Fabric agents.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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 mmogallapall/aircore-969-support-studio-transcript-replay-for-fabric-backed-agent

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

@mmogallapalli
mmogallapalli requested a review from mikeknep July 31, 2026 18:27
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 29440/37448 78.6% 63.2%
Integration Tests 17382/36166 48.1% 20.6%

@tylersbray tylersbray 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.

lgtm

Comment thread plugins/nemo-agents/src/nemo_agents_plugin/fabric/server.py Outdated
Signed-off-by: Manjesh Mogallapalli <mmogallapall@nvidia.com>
@mmogallapalli
mmogallapalli added this pull request to the merge queue Jul 31, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 31, 2026
@mmogallapalli
mmogallapalli added this pull request to the merge queue Jul 31, 2026
Merged via the queue into main with commit fdf6e60 Jul 31, 2026
54 checks passed
@mmogallapalli
mmogallapalli deleted the mmogallapall/aircore-969-support-studio-transcript-replay-for-fabric-backed-agent branch July 31, 2026 22:54
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.

3 participants