Skip to main content

Example use case

Your app joins a user’s meetings, learns the transcript as people speak, and answers questions by voice or in chat: during the meeting about the last few minutes, and afterwards about every meeting it has heard. “What did Rahul agree to last Tuesday?” and “What are my tasks this week?” both work.

Set up

  • One project for the app, with a service account that holds the Project admin role, so your code can create and delete agents. See Set up your organization.
  • One agent per user. It holds all of that user’s meetings, so they can ask across every meeting. Store the agent_id on your user record.
  • One thread per meeting.
  • Send X-SP-End-User with your user’s id on every call made for that user.
Optional: one agent per meeting series, such as a weekly standup or one client’s calls, which carries what earlier meetings agreed into the next one. A meeting in a series can go to the series agent and to the user’s own agent. Each agent learns it separately. Create the agent when a user turns the notetaker on, then poll GET/v2/agents/ until status is ready:
The objective decides what the agent keeps, so make it specific to the outcome you want. metadata is stored and returned, but it is not searchable.

Flow 1: start a meeting

Recording is opt-in per meeting. When the user starts the notetaker, create the meeting’s thread with POST/v2/agents//threads. Give it a title with the meeting name and date. The thread is ready at once. A meeting that the notetaker never joins leaves nothing in memory.

Flow 2: learn the transcript as it is spoken

Every one to two minutes, send the new transcript lines to the meeting’s thread with POST…/observe, oldest first:
  • Send the transcript, not a summary. A summary loses who said what and the corrections people made along the way.
  • Set timestamp to when each line was said.
  • Send Idempotency-Key: <meeting id>-<batch number>, so a retried batch is never learned or billed twice.
  • Poll GET…/observe/ until committed before you send the next batch to the same agent. An agent learns one batch at a time. See Ordering of learning.
When the meeting ends, you can send your own summary and action items as one more observe on the same thread, with speaker set to the notetaker and the meeting’s end time as timestamp. The transcript stays the source. The summary helps with questions such as “what are my tasks”.

Flow 3: answer questions

Flow 4: delete a meeting

What goes wrong

Deleting a thread keeps the memories made from it. A user who asks you to forget a meeting expects its content gone: delete the memories first, then the thread.
  • Batches sent out of order or in parallel to one agent: the second one waits behind the first. Wait for committed before you send the next batch.
  • No speaker or timestamp: the agent cannot say who decided what, or when.
  • No X-SP-End-User: every call acts as the service account, and all your users share one rate-limit window.

Calls used