---
title: "Propose better prompts from the agent's feedback, streaming the work"
method: POST
path: "/outbound-agents/{agent_id}/proposals/stream/"
tags: ["outbound-agents"]
---

# Propose better prompts from the agent's feedback, streaming the work

`POST /outbound-agents/{agent_id}/proposals/stream/`

## Request

- Base URL: `https://api.getoneprofile.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.getoneprofile.ai/outbound-agents/{agent_id}/proposals/stream/`
- Auth: HTTP bearer

The same rewrite as proposing better prompts, as a stream of Server-Sent Events: a `step` frame for each piece of work once it is done (reading what people said needs work, then each prompt it rewrote), each with its measured duration, then one `result` frame whose `data` is the proposal, the before and after for each prompt. Nothing is written until the proposal is accepted. Spends one of the workspace's daily assistant turns.

Failures arrive as an `error` frame, because the stream has already answered 200: reason `not_found` when the agent is not this workspace's, `limit` when the workspace has used today's AI Assistant allowance, `paused` when the AI Assistant is paused, and no reason for anything else, including no feedback to learn from, whose sentence says so.

Closing the connection does not stop the rewrite.

## Path parameters

- `agent_id` string, uuid, required

## Request body

- OutboundPromptProposalRequestSchema: Ask for a rewrite of the agent's prompts from its feedback.
  - `also_slots` string[], nullable: Teach the same feedback to these prompts too, even though none was given on their messages. Feedback names the one message it was given on, so without this a note on the opener can only ever change the opener. Each prompt is still rewritten against its own wording.
  - `revision_request` string: What to change about a proposal already seen.
  - `slot_keys` string[], nullable: Only rewrite these prompts; every prompt that has feedback when null.

## Response `200`

A stream of Server-Sent Events; the final `result` frame's `data` is the proposal.

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `422`: Invalid request made to the API.
- `500`: Internal server error.
- `502`: Bad gateway error.
- `503`: Service unavailable.

---

[API](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile.md) · [All operations](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/llms.txt) · [OpenAPI document](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/revisions/4a6bd71e3f02?raw)
