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

# Creating Agents from Chat

> Convert successful chat conversations into reusable agents

Turn successful chat sessions into reusable, automated agents.

## Why Convert to Agent?

If you find yourself asking the same questions repeatedly in chat, convert to an agent:

* Automate with triggers
* Run on schedule
* Standardize process
* Share with team

## How to Convert

**1. Complete Chat Session**

Have a successful conversation that achieves desired outcome

**2. Click 'Create Agent'**

Button appears at end of chat session

**3. AI Generates Prompt**

Cotool analyzes conversation and generates system prompt

**4. Review & Customize**

Edit the generated prompt as needed

**5. Add Triggers**

Set up automation (Jira, Slack, cron, etc.)

## What Gets Captured

From your chat conversation:

* Tools used
* Investigation approach
* Decision-making logic
* Output format

## Example

**Chat conversation**:

```
You: Investigate alert SEC-123
Agent: [Checks SentinelOne, Splunk, VirusTotal]
Agent: Determined to be false positive
You: Update the ticket
Agent: [Updates Jira]
```

**Generated agent**:

```markdown theme={null}
You are an alert triage agent.

When given a ticket ID:

1. Fetch alert details from SentinelOne
2. Search Splunk for related activity
3. Check indicators in VirusTotal
4. Determine severity
5. Update Jira ticket with findings

[Rest of generated prompt...]
```

## Best Practices

* Use chat to prototype complex workflows
* Test the generated agent in Builder before deploying
* Refine the auto-generated prompt
* Add error handling and edge cases

> [card] [Creating Agents](https://docs.cotool.ai/agents/creating-agents.md)
>
> Learn more about agent creation


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.