---
title: POST /agent/feedback
description: Report the outcome of a previous run
full: true
---

**Auth:** optional. The route accepts anonymous calls; send an `ivy_` API key (`Authorization: Bearer ivy_…` or `X-Ivy-Api-Key`) or a Clerk session JWT (`Authorization: Bearer …`) to call as your own account. See [Authentication](/docs/api/authentication).

Agent reports success/wrong_tool/incomplete/factually_wrong/timeout/rate_limited/other for a previous run. Persisted to harness_event_log for meta-learning. Anonymous feedback is logged but not yet contributed to the __guest_aggregate__ until verified.

## Request

#### Request body

- `run_id` (string) —

- `session_id` (string) —

- `outcome` (enum (&quot;success&quot; | &quot;wrong_tool&quot; | &quot;incomplete&quot; | &quot;factually_wrong&quot; | &quot;timeout&quot; | &quot;rate_limited&quot; | &quot;other&quot;)) —

- `correct_tool_suggestion` (string) —

- `comment` (string) —

- `rating` (integer) —

## Responses

### `202` Accepted

Feedback recorded

Response shape: `object`

### `400` Bad Request

Invalid request

Response shape: `object`

**curl**

```bash
curl -X POST 'https://ivybiosciences.com/api/v1/agent/feedback' \
  -H "Authorization: Bearer $IVY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "outcome": "success"
}'
```

**JavaScript**

```js
const res = await fetch('https://ivybiosciences.com/api/v1/agent/feedback', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.IVY_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "outcome": "success"
}),
});
const data = await res.json();
```

**Python**

```python
import os, requests

res = requests.post(
    "https://ivybiosciences.com/api/v1/agent/feedback",
    headers={"Authorization": f"Bearer {os.environ['IVY_API_KEY']}"},
    json={
  "outcome": "success"
},
)
data = res.json()
```
