Investigate Media with a Detect Agent
Choose one of Resemble’s managed Detect Agents, stream an investigation, and retrieve the persisted result for later review.
What You Will Build
This walkthrough covers the complete public Detect Agent lifecycle:
- List the six available Detect Agents.
- Select an agent and run it against a public media URL.
- Read the Server-Sent Events (SSE) stream.
- Retrieve the saved investigation and its run history.
Prerequisites
- A Resemble API token with Detect Agents access
- A publicly accessible media URL, or a local file to upload
curlandjq
Set your API token:
1. Choose a Detect Agent
List the Detect Agents available to your team:
Choose the agent that matches your investigation and save its uuid. For example:
Agent names and capabilities are managed by Resemble and may evolve. Use the list response as the source of truth instead of hard-coding the available set.
2. Run an Investigation
Set a public media URL and the question you want the agent to investigate:
Start the investigation and save the complete SSE stream:
To upload a local file instead, replace the url form field with:
You can also attach supporting evidence with repeated evidence[] fields or provide related pages through check_urls.
The public API runs Resemble-managed Detect Agents. It does not create agents or accept prompt, configuration, tier, or memory overrides.
3. Follow the Event Stream
Each line beginning with data: contains a JSON event. The most important events are:
Extract the run ID from the saved stream:
The service continues recording the investigation if the client disconnects, so you can still retrieve the saved run.
4. Retrieve the Investigation
Fetch the persisted run after the stream finishes:
The response includes:
statusand a compactresult- The submitted
inputs - The replayable event
transcript - The effective
config_snapshot memory_beforeandmemory_after- A terminal
error, when one occurred
Use the stored result when your application needs to show the investigation again without replaying the live stream.
5. List Recent Runs
Retrieve up to 100 of the selected agent’s most recent investigations:
The list contains compact summaries in newest-first order. Retrieve an individual run when you need its transcript, snapshots, or media details.
Troubleshooting
Errors that occur after the stream opens arrive as error SSE events while the HTTP response remains 200 OK.
