Contact Us

December 24, 2024

May 13, 2026 1:27 pm

Retrieving generation id for agent responses using miau API

Share with

Watch related videos on YouTube — Search results for: Retrieving generation id for agent responses using miau API

Understanding the MIAW API and Agent API

The MIAW API predates Agentforce, and its APIs may not provide full coverage of the required functionality. The Agent API, on the other hand, is more suited for headless agent development. However, when using the MIAW API for custom UIs, it may not be possible to use the Agent API directly.

Root Cause of the Issue

The root cause of the issue is the limitations of the MIAW API in providing the generation id for agent responses. The MIAW API is designed for custom UIs, while the Agent API is designed for headless agent development.

Possible Solutions

One possible solution is to use the Agent API to retrieve the generation id, but this may require significant changes to the custom UI. Another possible solution is to query the agent session and/or generation id given any of the MIAW API data.

example.js

const miauApiData = { /* MIAW API data */ };
const agentApiData = { /* Agent API data */ };
// Use the Agent API to retrieve the generation id
const generationId = agentApiData.generationId;

Checklist for Implementing the Solution

  • Use the Agent API to retrieve the generation id
  • Query the agent session and/or generation id given any of the MIAW API data
  • Modify the custom UI to use the Agent API
  • Test the solution thoroughly to ensure it works as expected
  • Document the solution and any limitations or workarounds

Frequently Asked Questions

What is the MIAW API?

The MIAW API is a set of APIs for building custom UIs.

What is the Agent API?

The Agent API is a set of APIs for headless agent development.

Can I use the Agent API with the MIAW API?

It may not be possible to use the Agent API directly with the MIAW API, due to their different design purposes.

How do I retrieve the generation id for an agent response?

You can use the Agent API to retrieve the generation id, or query the agent session and/or generation id given any of the MIAW API data.

Genetrix Technology · Salesforce Marketing Cloud Partner

Need help shipping this in production?

Genetrix builds and untangles Salesforce Marketing Cloud and Agentforce setups for teams that want it done right the first time. If anything in this post sounds familiar, talk to us before it ships.

Get in Touch with Genetrix →

Blogs for the

Business-Savvy!​

Let’s Connect

A 30 min no cost strategy session
with cloud support expert

Let’s Connect

A 30 min no cost strategy session
with cloud support expert