> ## 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

<Steps>
  <Step title="Complete Chat Session">
    Have a successful conversation that achieves desired outcome
  </Step>

  <Step title="Click 'Create Agent'">
    Button appears at end of chat session
  </Step>

  <Step title="AI Generates Prompt">
    Cotool analyzes conversation and generates system prompt
  </Step>

  <Step title="Review & Customize">
    Edit the generated prompt as needed
  </Step>

  <Step title="Add Triggers">
    Set up automation (Jira, Slack, cron, etc.)
  </Step>
</Steps>

## 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 title="Creating Agents" href="/agents/creating-agents">
  Learn more about agent creation
</Card>
