# Docs Agent Slack bot

import { Aside, Steps } from '@astrojs/starlight/components';

<Aside type="note" title="Beta">
  Docs Agent is in beta. Contact **support@ekline.io** to request access.
</Aside>

Create documentation without leaving Slack. @mention EkLine in any channel or thread, and the bot generates a draft you can review and edit in EkLine.

## Prerequisites

Before you begin, you need:

- An EkLine organization account.
- Slack workspace administrator access to install the app.
- Docs Agent access enabled for your organization.

## Connect your Slack workspace

<Steps>
1. Go to **Settings > Organization > Integrations** in your EkLine dashboard.

2. Find **Slack** in the integrations list.

3. Click **Connect**.

4. Allow EkLine to access your Slack workspace in the OAuth 2.0 popup.

5. Complete the Slack authorization flow.

6. Verify the integration shows as **Connected**.
</Steps>

Once connected, anyone in the Slack workspace can mention `@EkLine` to create documentation drafts.

## Create documentation from Slack

<Steps>
1. In any Slack channel or thread, type `@EkLine` followed by your request.
   ```
   @EkLine create a troubleshooting guide based on this discussion
   ```

2. Wait for the bot to acknowledge with an eyes emoji and a message: "Got it! I'm looking into this now."

3. The bot analyzes the conversation and generates a draft, which typically takes 10-30 seconds.

4. Click the link in the bot's response to review and edit the draft in EkLine.

5. The Docs Agent automatically creates a pull request with the drafted changes. The PR link appears in the editor session.
</Steps>

## Automatic pull requests

When you @mention EkLine in Slack, the Docs Agent automatically opens a pull request with the drafted changes. This behavior **defaults to enabled** for all organizations.

The PR link appears in the editor session so you can review and merge the changes directly from GitHub.

### Disable automatic PRs

If you prefer to review drafts in the editor before creating a PR manually:

1. Go to **Settings > Organization > Docs Agent** in your EkLine dashboard.
2. Under **Slack triggers**, turn off the **Automatically raise PRs from Slack requests** toggle.
3. The setting takes effect on the next Slack request. Existing sessions are unaffected.

<Aside type="tip" title="Opt back in anytime">
  Turn the toggle back on to resume automatic PR creation from Slack.
</Aside>

## Context the bot captures

The bot gathers context from the conversation to produce accurate documentation:

| Context type | What the bot captures |
|--------------|-----------------------|
| Thread messages | All messages in the current thread |
| Channel messages | The last 10 messages before your @mention |
| File attachments | Images (JPEG, PNG, GIF, WebP), PDFs, and videos attached to the message |
| Reactions | Emoji reactions on messages |

<Aside type="tip" title="Get better results">
@mention the bot in threads with relevant discussion. The more context in the thread, the more accurate the generated documentation.
</Aside>

## Write effective prompts

The quality of your prompt determines the quality of the output.

| Instead of... | Try... |
|---------------|--------|
| "help with docs" | "Create a troubleshooting guide for the API timeout issue discussed here" |
| "document this" | "Write a how-to guide for the workaround Sarah described" |
| "make docs" | "Update the authentication docs based on the new flow we agreed on" |

**Include specific details:**

- Reference the type of documentation you need: tutorial, how-to guide, reference, troubleshooting.
- Name specific topics or features from the conversation.
- Mention existing documentation to update if applicable.
- Point to URLs or ticket IDs for more context.

## Troubleshooting

| Issue | Solution |
|-------|----------|
| Bot does not respond | Verify the workspace connection in **Settings > Organization > Integrations**. Check that the bot has access to the channel. |
| "Workspace not connected" error | Ask a workspace administrator to reconnect the integration in EkLine settings. |
| Draft does not match expectations | Give more specific instructions in your mention. Include the documentation type and key topics to cover. |
| Bot takes longer than expected | Complex requests may take longer. The bot notifies you if a request times out. |
| Bot responds but link is broken | Refresh the page and try the link again. If the issue persists, contact **support@ekline.io**. |

## Next steps

- [GitHub PR bot](/agent/github-integration/) — Trigger Docs Agent from pull request comments and code reviews.
- [Create documentation](/agent/create) — Generate READMEs, API references, and guides from your codebase.
- [Update and review](/agent/update-review) — Keep documentation in sync with code changes.
- [Integrations](/agent/integrations) — Connect Notion, Linear, Jira, and other tools.