# Create documentation with Docs Agent

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

Use create mode when you need documentation that doesn't exist yet. The agent can generate content from your code, uploaded videos, or content pulled from integrations.

## From your codebase

The agent analyzes your repository structure, source files, package configuration, and existing documentation to generate new content.

### README files

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

```
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.

```
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.

```
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.

```
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 to generate documentation. The agent transcribes the video and creates structured content from what it sees and hears.

<Aside type="note" title="Supported formats">
**Video formats:** MP4, WebM, MOV, AVI, MPEG, OGG
**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">
    ```
    Create a step-by-step tutorial from this product demo.
    Include descriptions of each screen and action shown.
    ```
  </TabItem>
  <TabItem label="Feature overview">
    ```
    Write a feature overview document based on this
    walkthrough video. Focus on the key capabilities
    demonstrated.
    ```
  </TabItem>
  <TabItem label="Release notes">
    ```
    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 inserts them directly into your documentation. The agent sees the image content and places it in the appropriate location within your repository.

<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 image content, so it understands what the screenshot shows and can write appropriate alt text and captions.

### Example prompts

<Tabs>
  <TabItem label="Insert screenshot">
    ```
    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">
    ```
    Add this architecture diagram to the overview page.
    Place it after the "How it works" section.
    ```
  </TabItem>
  <TabItem label="Multiple images">
    ```
    Add these screenshots to the deployment guide. Place
    each one next to the step it illustrates.
    ```
  </TabItem>
</Tabs>

<Aside type="tip">
Binary files like images appear as placeholders in the editor since they can't be previewed inline. You can verify image placement by checking the markdown references in the surrounding document.
</Aside>

## From external sources

Pull content from connected integrations to create documentation. See [Integrations](/agent/integrations) to connect your tools.

### From Slack threads

Turn support conversations and internal discussions into structured documentation.

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

The agent extracts the conversation, identifies the problem and solution, and formats it as documentation.

### From Notion pages

Transform product specs, design documents, or meeting notes into user-facing docs.

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

### From Confluence pages

Pull technical specifications or internal knowledge into your docs.

```
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.

```
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 to create user-facing summaries.

## Tips for better output

<Aside type="tip" title="Write better prompts">
- **Be specific about sections** — List exactly what you want included.
- **Reference existing docs** — `"Match the style of docs/quickstart.md"`.
- **Specify 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>