> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sourcery.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Fix a finding with an agent

Once you have a finding you want fixed, Sourcery can write the AI agent's prompt for you. Two actions on each finding hand it off, and both work on any issue type.

## Copy the prompt

Click **Copy agent prompt** to put a ready-made prompt on your clipboard. Paste it into whatever coding agent you use. The prompt is filled with the finding's details:

```text
Please fix the following security issue:

<issue>
[title]

[risk]

[cause]
</issue>

<locations>
src/api/handlers.py:12-34
</locations>

<fix>
[the recommended fix]
</fix>

<fix_impact>
[what the fix changes]
</fix_impact>

Keep the changes minimal - only make the necessary code changes to fix the security issue.
```

When a fix also needs configuration or infrastructure changes, the prompt ends by asking the agent to tell you about them.

## Open in Cursor

Click **Open in Cursor** to open the same prompt directly in Cursor through a deeplink, so you skip the copy and paste.

This action appears only when the Cursor integration is turned on for your account. An admin turns it on with the Cursor card on the [**Integrations**](https://app.sourcery.ai/dashboard/integrations) page. Until then, only **Copy agent prompt** shows.

## What's next
