Phoenix ATIF exporter misses tool spans from IntermediateStepToATIFConverter and ends the workflow span before a trailing tool call

Open
#2,532 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@anishmehta24 is already working on this.

Since Oct 31, 2026.

  • #2533 by @anishmehta24 — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
observability

Research direction

Read nat/plugins/phoenix/scripts/export_trajectory_to_phoenix/atif_trajectory_exporter.py and nat/utils/atif_converter.py to see the two metadata shapes. Inspect _per_toolcall_meta and _trajectory_time_bounds for missed cases. Done means both converter trajectories yield tool spans and workflow span covers trailing tool call.

Written by the indexing model from the issue text.

Description

bug
Version

develop (9e614099)

Which installation method(s) does this occur on?

Source

Describe the bug.

ATIFTrajectorySpanExporter (nat/plugins/phoenix/scripts/export_trajectory_to_phoenix/atif_trajectory_exporter.py) reads tool call metadata from one place when it builds tool spans and from another when it computes the workflow span's time range, and each misses one of the two forms NAT produces:

  • IntermediateStepToATIFConverter (nat/utils/atif_converter.py) writes tool ancestry and timing as the step-level extra.tool_ancestry and extra.tool_invocations arrays, and leaves tool_calls[*].extra empty. _per_toolcall_meta only reads tool_calls[*].extra, so no tool span is created for these trajectories at all.
  • The ATOF converter in nvidia-nat-atif writes them on each tool call (tool_calls[*].extra.invocation). _trajectory_time_bounds only reads extra.tool_invocations, so when a trajectory ends with a tool call, the workflow span ends before its last child does.
Minimum reproducible example
# user -> LLM -> pow tool -> LLM, converted with IntermediateStepToATIFConverter
trajectory = IntermediateStepToATIFConverter().convert(intermediate_steps)
spans = ATIFTrajectorySpanExporter().convert(trajectory.model_dump(mode="json", exclude_none=True))
[span.name for span in spans]
# ['my_agent', 'llm', 'llm']  -- no 'pow' span

# A v1.7 trajectory (tool call metadata on the tool call) that ends with the pow call (2.0 to 3.0):
# workflow span: 1.0 to 2.0, pow span: 2.0 to 3.0
Relevant log output

No response

Other/Misc.

No response

Code of Conduct
  • I agree to follow this project's Code of Conduct
  • I have searched the open bugs and have found no duplicates for this bug report
Dominant language
Python
Stars
2.7k
Forks
814
Avg merge
1d 10h
Merged PRs (30d)
128

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NVIDIA/NeMo-Agent-Toolkit

All issues in NVIDIA/NeMo-Agent-Toolkit

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.