Skip to content

Share data between agents in liveAPI #1252

Closed
Closed

Description

@pretbc

** Please make sure you read the contribution guide and file the issues in the right place. **
Contribution guide.

Is your feature request related to a problem? Please describe.
I would like to pass to other sub agents AUDIO which was part of live_queue from liveAPi root agent

Describe the solution you'd like
root agent has 2 sub agents which should analyze audio captured by liveAPI and then root agent should be able to continue with knowledge from sub agents

Describe alternatives you've considered

Make sub agents to be ToolAgents of root agent

artifact_service = InMemoryArtifactService()
    runner = Runner(
    agent=root_agent,
    app_name="affect_pipeline",
    session_service=InMemorySessionService(),
    artifact_service=artifact_service,
)

# inside root_agent
async def _on_audio(ctx, audio_bytes: bytes):

    part = types.Part.from_bytes(audio_bytes, "audio/wav")
    fname = f"user_{ctx.session.id}.wav"

    ctx.save_artifact(fname, part)      # make it visible to all agents
    ctx.session.state["latest_audio"] = fname

    # now call the children — they can load the clip themselves
    await ctx.invoke_tool("affect_alignment_tool", audio_file=fname)
    await ctx.invoke_tool("engagement_tool", audio_file=fname)

Activity

  1. added
    live[Component] This issue is related to live, voice and video chat
    on Jun 9, 2025
  2. pretbc commented on Jun 18, 2025

    @pretbc
    Author

    As an another try I found that

    RunConfig(
                save_input_blobs_as_artifacts=True,
    )

    but it seems that artifacts are not saved.

    I tried even add before/after model callback to gather input data which will be used during model call. But also without any luck

  3. added theissue type on Jul 2, 2025
  4. self-assigned this
    on Oct 8, 2025
  5. klateefa commented on Oct 8, 2025

    @klateefa

    Hi @pretbc and thanks to everyone who participated in this thread.

    We're currently doing some housekeeping on our issue tracker. Given the rapid pace of development and the number of updates since this was last active, there's a good chance this issue has been resolved in a newer version. To help us keep our backlog focused on current issues, we are closing this as stale.

    If you're still facing this problem, could you please update to the very latest version of the library and confirm the issue still exists? If it does, please comment here, and we will be happy to reopen this issue and investigate further.

    Thanks for your contribution and understanding!

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

Metadata

Metadata

Labels

live[Component] This issue is related to live, voice and video chat

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions