Skip to main content
A saved agent keeps your instructions, model and tools, so the same kind of research runs the same way each time. You send it a question, and a few minutes later it returns a Markdown reply that cites the SERFF tracking number behind each fact. This guide saves an agent that researches how insurers rate boatowners coverage, then asks it to compare two carriers in Florida. Here is part of a real reply to that request:
Bottom line: The two carriers with Florida boatowners rate filings that include rate pages are American Modern Property and Casualty (FL-26-028984) and Atlantic Specialty (FL-26-019149). American Modern prices named storm as its own hull coverage with 1%–20% options. Atlantic Specialty has no separate named-storm deductible and instead sets a minimum 10% windstorm deductible.
The full reply goes on to rating factors, deductibles, fees, and the conflicts and gaps it found in each filing. You need an Effective API key for a workspace member who can spend credits, and jq to build the request. To work from an AI assistant instead, see Run it from an AI assistant.

Save the agent

Write the instructions as plain text. Say what to report for each filing, how to cite it, and what to do when a filing does not show something or the request leaves a choice open.
Then save the agent with those instructions. Pick a model from GET /api/v2/agents/models.
inheritWorkspaceTools: true gives the agent the same tools as Effective’s own agent, within the access of whoever starts a session, so it can search filings and read their rate pages. The API returns 201 Created. Copy the agent’s id and version. Abbreviated response:
To research another line, keep the shape and change what to report. For pet insurance, ask about breed and age factors and reimbursement options. For motorcycle, ask about engine size, riding experience and seasonal lay-up. Keep the closing rules: they make replies easy to check, and they let the agent decide small things on its own instead of stopping to ask.

Ask it a question

Start a session with the agent’s id and version and your question. Use a new Idempotency-Key for each session, and the same key if you retry the request after a network error, so a retry does not start a second session. Any UUID works, for example from uuidgen or openssl rand -hex 16.
The response gives the session id and the message.id of your question:

Wait for the reply

Research across several filings takes a few minutes. Read the message until its status is no longer queued or running. This loop checks every 20 seconds and prints the reply:
When status is succeeded, reply holds the Markdown comparison shown at the top of this page. It is the agent’s final answer: what the agent wrote about its work along the way is left out. Abbreviated response:
The other statuses: To stop a reply, call POST /api/v2/sessions/{id}/messages/{messageId}/cancel. The message then ends as failed, with cancellationStatus cancelled. To ask a follow-up, such as another state or a third carrier, send it to POST /api/v2/sessions/{id}/messages and wait for its reply the same way. To be told when a reply is ready instead of polling, subscribe a webhook to session.message.completed.

Run it from an AI assistant

An assistant connected to Effective can save and run the same agent. Ask it in plain language:
Prompt
The assistant saves the agent with the mutate tool and runs it with the agent tool. It waits for the reply, and if the agent asks a question, it shows you the question and sends your answer back.

Next steps