# Create documentation with Docs Agent

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

Use the Docs Agent to write documentation that doesn't exist yet. It can write from your code, from videos and images you upload, or from content in your connected tools.

## From your codebase

The agent reads your repository's structure, source files, package configuration, and existing docs, then writes new content from them.

### README files

Generate a README when starting a new project or updating an outdated one.

```text
Generate a README for this repository. Include:
- Project overview and key features
- Installation with npm and yarn
- Quick start example
- Configuration options
- Contributing guidelines
```

**Tips:**
- Mention specific sections you need.
- Reference example code: `"Include examples similar to /examples"`
- Specify the audience: `"Write for developers familiar with React"`

### API reference

Document endpoints, functions, or modules from your source code.

```text
Document the authentication endpoints in src/api/auth.ts.
Include request parameters, response schema, example
requests, and error codes.
```

The agent extracts and documents:
- Endpoint URLs and HTTP methods
- Request parameters with types and descriptions
- Response schema with field descriptions
- Example request and response bodies
- Error responses and status codes

### How-to guides

Create task-oriented guides for common workflows.

```text
Create a how-to guide for setting up local development.
Cover environment setup, database configuration, and
running the test suite.
```

### Getting started guides

Help new users or contributors get up and running.

```text
Write a getting started guide for new contributors.
Include repo setup, coding standards, and how to
submit a pull request.
```

## From video uploads

Upload product demos, tutorials, or walkthroughs. The agent transcribes the video and writes docs from what it sees and hears.

<Aside type="note" title="Supported formats">
**Video formats:** MP4, WebM, MOV, AVI, MPEG
**Maximum size:** 500 MB
</Aside>

### How it works

<Steps>
1. Click the attachment icon in the chat panel.
2. Select your video file.
3. Wait for processing. Transcription may take a few minutes.
4. Describe what documentation you need.
</Steps>

### Example prompts

<Tabs>
  <TabItem label="Tutorial from demo">
    ```text
    Create a step-by-step tutorial from this product demo.
    Include descriptions of each screen and action shown.
    ```
  </TabItem>
  <TabItem label="Feature overview">
    ```text
    Write a feature overview document based on this
    walkthrough video. Focus on the key capabilities
    demonstrated.
    ```
  </TabItem>
  <TabItem label="Release notes">
    ```text
    Generate release notes from this demo of new features.
    Summarize each feature shown for end users.
    ```
  </TabItem>
</Tabs>

## From screenshots and images

Upload screenshots, diagrams, or other images, and the agent adds them to your docs.

<img
    className={'rounded-2xl'}
    width={1288}
    height={711}
    src={`/assets/images/docs-agent-image-upload.png`}
    alt={`Docs Agent drafting a documentation page from an uploaded image in the chat panel`}
/>

<Aside type="note" title="Supported formats">
**Image formats:** JPEG, PNG, GIF, WebP
**Maximum size:** 50 MB
</Aside>

### How it works

<Steps>
1. Click the attachment icon in the chat panel.
2. Select your image file.
3. Describe where and how you want the image placed.
4. The agent downloads the image into your repository and adds a markdown reference.
</Steps>

The agent can see what the image shows, so it can write alt text and captions for it.

### Example prompts

<Tabs>
  <TabItem label="Insert screenshot">
    ```text
    Insert this screenshot into the getting started guide
    after the installation section. Add a caption describing
    what the user should see.
    ```
  </TabItem>
  <TabItem label="Add diagram">
    ```text
    Add this architecture diagram to the overview page.
    Place it after the "How it works" section.
    ```
  </TabItem>
  <TabItem label="Multiple images">
    ```text
    Add these screenshots to the deployment guide. Place
    each one next to the step it illustrates.
    ```
  </TabItem>
</Tabs>

<Aside type="tip">
Images preview in the editor panel. Select the file to see it, and click the preview to open it larger. Other files that aren't text show as placeholders. Check the markdown references around them to confirm where they go.
</Aside>

## From external sources

Write docs from content in your connected tools. See [Integrations](/agent/integrations) to connect them.

### From Slack threads

Turn support conversations and team discussions into docs.

```text
Create a troubleshooting guide based on this Slack thread:
https://workspace.slack.com/archives/C01234/p1234567890
```

The agent reads the conversation, finds the problem and the fix, and writes them up as a doc. For the full Slack bot workflow, see [Turn a Slack support thread into a troubleshooting doc](/agent/slack-thread-to-troubleshooting-doc/).

### From Notion pages

Turn product specs, design docs, or meeting notes into docs for your users.

```text
Create API documentation based on the spec in this Notion page:
https://notion.so/your-workspace/api-spec-page
```

### From Confluence pages

Pull specs or internal notes into your docs.

```text
Create a deployment guide based on the runbook in this
Confluence page: https://your-org.atlassian.net/wiki/...
```

### Release notes from tickets

Generate changelogs from completed Linear or Jira tickets.

```text
Generate release notes for v2.1 based on Linear tickets
ENG-100 through ENG-110. Organize by Features,
Improvements, and Bug Fixes. Write for end users.
```

The agent reads each ticket's title, description, and comments, and sums up each one for your users.

## Tips for better output

<Aside type="tip" title="Write better prompts">
- **Name the sections**: list what you want included.
- **Point to existing docs**: `"Match the style of docs/quickstart.md"`.
- **Name the audience**: `"Write for developers new to Kubernetes"`.
- **Mention your stack**: `"This is a Django project using PostgreSQL"`.
- **Set the tone**: `"Keep it concise and focus on practical examples"`.
</Aside>

## Next

- [Create documentation from a demo video](/agent/create-docs-from-video/): turn a whole walkthrough into a written guide.
- [Capture screenshots from a video or browsing recording](/agent/screenshots-from-video/): put a frame from a recording into a page.
- [Generate an API reference from your codebase](/agent/generate-api-reference/): build reference pages from your source code.
- [Update and review documentation](/agent/update-review/): change pages that already exist.