web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Saving Subagent Output...
Copilot Studio
Suggested Answer

Saving Subagent Output as a variable

(1) ShareShare
ReportReport
Posted on by 4
Hi everyone,
 
I have a question about variables storage. My flow is leveraging a subbagent whose output is really important and which I would like to be saved. Nonetheless, skimming through documentation; I have seen that while this is perfectly feasible for generative answers, this is not the case for a subagent per se. 
 
 
Is there any way in which such output could be saved in a variable for subsequent storage, like in the attached screenshot? I would really appreciate some guidance on this matter!
Screenshot 2026-09-01 095302.png
  • Suggested answer
    11manish Profile Picture
    4,802 Super User 2026 Season 2 on at
    You don't need to abandon the subagent approach. Configure explicit outputs on the subagent and consume those outputs in the parent agent. If you're trying to capture an arbitrary final response generated by the subagent's orchestration layer, that is different and isn't reliably exposed as a normal variable; in that case, redesign the subagent to return the information you need as an explicit Text or structured output.
     
    Refer:
     
     
     
  • Suggested answer
    Valantis Profile Picture
    7,545 Super User 2026 Season 2 on at
     

    In the subagent, go to Settings > Agent outputs and define a Text output variable (e.g. OutputResult). At the end of the subagent's topic or flow, set that output variable to the value you want to return.

    then the  parent agent, after the subagent node, the output variable becomes available as a topic variable you can reference. Use a Set variable node to store it in a global variable if you need it across multiple topics:
    Set(Global.SavedOutput, SubagentName.OutputResult)

    This is the only supported way to pass structured data from a subagent back to the parent. The free-form conversational response the subagent generates isn't directly capturable as a variable, only explicitly defined output parameters are.
     
      Best regards,

    Valantis   ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/ 💼 LinkedIn   ▶️ YouTube
  • Valantis Profile Picture
    7,545 Super User 2026 Season 2 on at

    Hi @CU30050819-1,

    Just wanted to check in and see if everything is working now. If you still need any help, feel free to let me know.

    Also, if the issue is resolved, it would be great if you could mark the answer as solved so others with the same question can find it easily.

     

    Thanks and have a great day!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Copilot Studio

#1
Mohsin Ali Profile Picture

Mohsin Ali 360

#2
Valantis Profile Picture

Valantis 253 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 184 Super User 2026 Season 2

Last 30 days Overall leaderboard