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

# Design a PPT Generation Agent

> Learn how the official PPT Assistant combines a model, system prompt, skills, and plugins, and how to build your own artifact-producing agent from that design.

Creating presentations is a common use case for Kimi Hosted Agents. This page explains the design of the official **PPT Assistant** to help you build your own artifact-producing agents with the API.

Treat the official configuration as a starting point and adapt it to your business needs; the reusable part is the design method.

| Path | Who it's for | How to use it |
| - | - | - |
| Use the official agent | You want to generate presentations out of the box | Select **PPT Assistant** (marked as official) in the Console, or reference its agent ID via the API |
| Build your own from this guide | You need custom templates, content rules, or plugin combinations | Follow the design breakdown below to create your own agent |

> [!TIP]
>
> Open the PPT Assistant's detail page in the Console to copy its agent ID, or call `GET /v1/agents` and find **PPT Assistant** in the list. Official agents are read-only; see [Agents](https://platform.kimi.ai/docs/hosted-agents/agents.md) for details.

## Scenarios and goals

A typical task is to generate a well-structured, visually consistent PPTX file from source materials or a given topic, which users can continue editing in Microsoft PowerPoint or WPS Office. The official PPT Assistant focuses on three goals:

* **Grounded content**: Use source materials first; when none are provided, gather information with built-in search; for data-driven tasks, call data plugins to fetch data;
* **Editable file output**: Generate a natively editable PPTX (text boxes, tables, and native charts) by default rather than slide images or web screenshots;
* **Programmatic retrieval**: Write files to an agreed directory so the client can retrieve them without anyone entering the sandbox to look for files.

Every configuration choice below supports these three goals.

## Design approach

The official PPT Assistant combines a model, a system prompt, skills, plugins, and the default built-in toolset, without declaring `tools` or `mcp_servers`. The sections below explain each part and when to adjust it.

### Model: prioritize long context and instruction following

The official agent uses `kimi-k3.1-pro`. Presentation tasks must process full source documents, skill instructions, and layout constraints at the same time, and generate files strictly according to the skill's rules, placing high demands on long-context handling, instruction following, and structured generation.

### System prompt: four reusable conventions

The official system prompt encodes four core conventions that also apply to other artifact-producing agents:

1. **Two-dimensional skill system**: Skills fall into two categories—capability (methodology) skills, which determine how work is done (such as deep research), and artifact skills, which determine the output format (such as presentations, documents, or spreadsheets). When a task uses both, research and plan with the capability skill first, then produce the deliverable according to the artifact skill; if the two conflict, the artifact skill's technical constraints take precedence.
2. **Progressive loading**: Do not pre-read every skill's instructions. Read only the `SKILL.md` for the domain relevant to the task, keeping multiple skill manuals from filling the context window and driving up token costs.
3. **Output contract**: Write all output files to the workspace `output/` directory (`/mnt/agents/output/` inside the sandbox) and list each one by relative path in the final reply (for example, `output/industry_analysis.pptx`). Clients can list this directory and retrieve the files, matching the session file APIs described in [Files](https://platform.kimi.ai/docs/hosted-agents/files.md).
4. **Communication style**: Reply only with what was produced and where the files are located, without listing the commands or libraries used along the way.

### Skills: artifact skills define the output format

The official agent currently attaches the presentation artifact skill `ha-slides-pptx`. This skill defines slide structure, layout rules, and PPTX generation, producing natively editable PPTX slides rather than full-page images. Adjust skills as needed:

* Choose the skill by output type: use a document skill for Word reports and a spreadsheet skill for data tables;
* Add a capability skill, such as deep research, when the task requires a specific research method;
* For general information gathering, no extra skill is needed—the platform's built-in search tools are sufficient.

Skills are referenced by `skill_id`. Omitting `version` pins the latest version available at write time; specifying an exact version pins that version; explicitly passing `"latest"` retains the literal value and re-resolves it whenever the agent is read or awakened. See [Skills](https://platform.kimi.ai/docs/hosted-agents/skills.md) for details. Skills attached to official agents evolve with platform updates; refer to the current configuration returned by `GET /v1/agents`.

### Plugins: swap data sources by industry

Data-driven presentations get their data from plugins. Finance is a common presentation scenario, so the official agent comes preconfigured with financial data plugins covering market quotes, financial statements, and corporate disclosures. When building your own agent, select data plugins for your industry and combine multiple plugins as needed.

Plugins package MCP servers and bundled skills together: select them in the Console or declare them in the create request, and they take effect without per-item configuration. Some data plugins require authorization or access credentials. Credentials are not stored in the agent configuration; instead, inject them at runtime through [Vaults](https://platform.kimi.ai/docs/hosted-agents/vaults.md). See [Plugins](https://platform.kimi.ai/docs/hosted-agents/plugins.md) for how to reference plugins and how versions are pinned.

### Tools: use the default built-in toolset

The official agent does not declare `tools`, so the platform loads the default built-in toolset. File read/write, command execution, and web search in the cloud sandbox work out of the box, so there is no need to declare `tools` or `mcp_servers`. Connect an MCP server only when you need capabilities outside the platform; see [Configure MCP Servers](https://platform.kimi.ai/docs/hosted-agents/mcp.md).

## Starter template

Below is a minimal runnable configuration based on the system prompt, skill, and plugin combination above. It is not a verbatim copy of the official configuration; refer to `GET /v1/agents` for the official agent's current configuration.

Create the agent:

```bash cURL theme={null}
curl -sS -X POST "https://api.moonshot.ai/v1/agents" \
  -H "Authorization: Bearer $KIMI_API_KEY" \
  -H "kimi-api-version: 2026-09-01-beta" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My PPT Assistant",
    "model": {"id": "kimi-k3.1-pro"},
    "system": "You are a presentation creation assistant.\n- When no source materials are provided, gather information with built-in search first, then build the presentation.\n- Read skill files on demand; do not load all skill instructions at once.\n- Write all output files to the workspace output/ directory and list each one by relative path in your final reply (for example, output/report.pptx).\n- Produce a .pptx file in which every element is editable; do not paste slide images.\n- In your reply, state only what you produced and where it is saved; do not narrate implementation details.",
    "skills": [
      {"skill_id": "ha-slides-pptx", "version": "latest"}
    ],
    "description": "Custom PPT assistant based on the official recipe, with customizable templates and plugins"
  }'
```

```bash CLI theme={null}
kha agents create --file - <<'JSON'
{
    "name": "My PPT Assistant",
    "model": {"id": "kimi-k3.1-pro"},
    "system": "You are a presentation creation assistant.\n- When no source materials are provided, gather information with built-in search first, then build the presentation.\n- Read skill files on demand; do not load all skill instructions at once.\n- Write all output files to the workspace output/ directory and list each one by relative path in your final reply (for example, output/report.pptx).\n- Produce a .pptx file in which every element is editable; do not paste slide images.\n- In your reply, state only what you produced and where it is saved; do not narrate implementation details.",
    "skills": [
      {"skill_id": "ha-slides-pptx", "version": "latest"}
    ],
    "description": "Custom PPT assistant based on the official recipe, with customizable templates and plugins"
}
JSON
```

Once created, save the `id` from the response as `AGENT_ID`. Adjust the following fields to fit your needs:

| Field | How often to adjust | Guidance |
| - | - | - |
| `system` | Frequently | Add company templates, brand visual guidelines, and content rules; keep the four conventions above |
| `skills` | Per output type | Swap the artifact skill or add a capability skill |
| `plugins` | Per industry | Add `{"plugin_id": "<plugin ID>"}`; look up plugin IDs with `GET /v1/plugins` or select plugins directly in the Console agent form |
| `model` | Usually keep defaults | `kimi-k3.1-pro` is well suited to long-context artifact generation |
| Toolset | Usually keep defaults | The default built-in toolset is sufficient; no extra declaration is needed |

## Resource preparation

* **Execution environment**: Create a general-purpose cloud sandbox environment by passing `{"type": "cloud"}` for `config` to use default values for all other settings; see [Quickstart](https://platform.kimi.ai/docs/hosted-agents/quickstart.md). Presentation generation requires no custom dependencies or network configuration.
* **Source materials (optional, recommended)**: Upload data or text files via `POST /v1/files` to obtain a `file_id`, then mount them in `resources` when creating the session. Files appear as read-only copies under `/mnt/agents/upload/` in the sandbox. Source materials improve the accuracy and relevance of the presentation; see [Files](https://platform.kimi.ai/docs/hosted-agents/files.md).
* **Credentials (optional)**: If your data plugins require authorization, configure credentials in Vaults ahead of time for automatic runtime injection; see [Vaults](https://platform.kimi.ai/docs/hosted-agents/vaults.md).

## Run with mounted source materials

[Quickstart](https://platform.kimi.ai/docs/hosted-agents/quickstart.md) covers the full flow of selecting an agent, creating an environment and session, subscribing to the event stream, sending messages, and retrieving files. This section adds the steps for working with source materials.

First upload the source file and save the `id` from the response as `FILE_ID`. The `/v1/files*` endpoints select the API version used in this documentation through the `kimi-api-version: 2026-09-01-beta` header; omitting it falls back to legacy behavior (such as returning HTTP 200 instead of 201 on upload), so always include it:

```bash cURL theme={null}
curl -sS -X POST "https://api.moonshot.ai/v1/files" \
  -H "Authorization: Bearer $KIMI_API_KEY" \
  -H "kimi-api-version: 2026-09-01-beta" \
  -F "file=@industry_data.xlsx"
```

```bash CLI theme={null}
kha files upload --file industry_data.xlsx
```

Mount the file in `resources` when creating the session; if you have no source materials, omit `resources`:

```bash cURL theme={null}
curl -sS -X POST "https://api.moonshot.ai/v1/sessions" \
  -H "Authorization: Bearer $KIMI_API_KEY" \
  -H "kimi-api-version: 2026-09-01-beta" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "'"$AGENT_ID"'",
    "environment_id": "'"$ENVIRONMENT_ID"'",
    "title": "Industry Analysis Presentation",
    "resources": [
      {"type": "file", "file_id": "'"$FILE_ID"'"}
    ]
  }'
```

```bash CLI theme={null}
kha sessions create --file - <<JSON
{
    "agent_id": "$AGENT_ID",
    "environment_id": "$ENVIRONMENT_ID",
    "title": "Industry Analysis Presentation",
    "resources": [
      {"type": "file", "file_id": "$FILE_ID"}
    ]
}
JSON
```

`AGENT_ID` is the ID of the official PPT Assistant or your custom agent, and `ENVIRONMENT_ID` is the execution environment ID. Save the session `id` from the response as `SESSION_ID`, then subscribe to the event stream and submit the task (see [Quickstart](https://platform.kimi.ai/docs/hosted-agents/quickstart.md) for subscription and message formats):

```bash cURL theme={null}
curl -sS -X POST "https://api.moonshot.ai/v1/sessions/$SESSION_ID/events" \
  -H "Authorization: Bearer $KIMI_API_KEY" \
  -H "kimi-api-version: 2026-09-01-beta" \
  -H "Content-Type: application/json" \
  -d '{
    "events": [
      {
        "type": "user.message",
        "data": {
          "content": [
            {"type": "text", "text": "Based on the attached industry data, create a 12-slide industry analysis presentation covering the market landscape, value chain, comparison of leading companies, and key investment highlights. Use a clean business style with a dark blue primary color, and deliver a .pptx file in which all elements are editable."}
          ]
        }
      }
    ]
  }'
```

```bash CLI theme={null}
kha sessions send "$SESSION_ID" "Based on the attached industry data, create a 12-slide industry analysis presentation covering the market landscape, value chain, comparison of leading companies, and key investment highlights. Use a clean business style with a dark blue primary color, and deliver a .pptx file in which all elements are editable."
```

Once the session returns to `idle`, the finished deck delivered by the agent is registered as an **artifact**. List the session's artifacts, locate the generated PPTX, and save its `id`:

```bash cURL theme={null}
curl -sS "https://api.moonshot.ai/v1/artifacts?session_id=$SESSION_ID" \
  -H "Authorization: Bearer $KIMI_API_KEY" \
  -H "kimi-api-version: 2026-09-01-beta"
```

```bash CLI theme={null}
kha artifacts list --session "$SESSION_ID"
```

Then download the file by artifact `id`:

```bash cURL theme={null}
curl -sS "https://api.moonshot.ai/v1/artifacts/$ARTIFACT_ID/content" \
  -H "Authorization: Bearer $KIMI_API_KEY" \
  -H "kimi-api-version: 2026-09-01-beta" \
  -o industry_analysis.pptx
```

```bash CLI theme={null}
kha artifacts download "$ARTIFACT_ID" --out industry_analysis.pptx
```

If the artifact list is empty or you need to inspect intermediate files, browse subdirectories level by level with `GET /v1/sessions/$SESSION_ID/filesystem` and the `prefix` parameter, then download via `filesystem/raw` using the file entry's `path`; see [Files](https://platform.kimi.ai/docs/hosted-agents/files.md).

> [!TIP]
>
> Presentation generation is a long-running task and can take several to a dozen-plus minutes when research is involved. If the event stream disconnects, resubscribe with the `id:` field of the last SSE frame received before the disconnect as the `cursor` to resume reading; see [Event Stream](https://platform.kimi.ai/docs/hosted-agents/event-stream.md).

## Monitoring runs

You can monitor task progress through the event stream. For a typical presentation task, watch these signals:

* **`session.status`**: A transition from `idle` to `running` means the task has started; a return to `idle` means the turn is complete and files are ready to retrieve.
* **`agent.thinking`**: Shows task planning, including the order in which source materials are read, research steps, outline structure, and slide content. If the outline goes in the wrong direction, cancel the session at this stage and submit a clearer prompt.
* **`agent.tool_use` / `agent.tool_result`**: Show which data plugins or search tools the agent called and the data definitions used. When data looks wrong, check the selected data source first.
* **`agent.message`**: The final reply lists relative paths under `output/` as required by the output contract. Clients can parse this list, but for reliability we recommend retrieving finished files directly through the artifacts API (`GET /v1/artifacts?session_id=...`).
* **`session.error`**: Emitted when the task fails, with the error type and message.

## Write clear task prompts

The task prompt is the biggest factor in presentation quality. Follow these four principles.

### 1. Provide source materials first

Upload data or text files, mount them in `resources` when creating the session, and then submit the task. Source materials improve content accuracy and relevance.

* Recommended: upload a financial-report spreadsheet and ask for "a quarterly business review presentation based on the attached data";
* Without source materials, you can provide only a topic and let the agent gather information with built-in search. This covers broader ground but takes longer, and the content may be less tailored than with your own materials.

### 2. Specify slide count, style, and audience

Leave other layout details to the presentation skill's defaults so constraints do not conflict.

> Example: "Create a 12-slide presentation on the renewable energy industry in a clean business style with a dark blue primary color, for an investment committee."

### 3. Data-driven decks: specify the data source

If the agent has data plugins attached, you can name the data source directly in the prompt without preparing data yourself.

> Example: "Use the financial data plugins to pull the last four quarters of financial reports for a given company and create a fundamental analysis presentation."

### 4. Require an editable format

> Example: "Deliver a .pptx file in which all elements are editable, not slide images."

The presentation skill generates natively editable PPTX elements (text boxes, tables, and native charts) by default. Stating the editable-format requirement explicitly in the prompt reduces the risk of getting full-slide images.

When you request revisions in the same session later, the new version is still written to `output/`; list the directory again and retrieve the updated file.

## Going further

* **Batch production**: Create separate sessions for each presentation task and run them concurrently, retrieving outputs per session so runs do not interfere with one another. Sessions are isolated from one another.
* **Embed in your own system**: Integrate approval and preview interfaces into your own business dashboard while the agent only generates PPTX files. Your business system subscribes to the event stream and retrieves files via the `output/` convention, so end users never need to interact with the agent directly.
* **Build custom variants**: Adapt the starter template and field table above: edit the system prompt to enforce company templates and content rules, adjust output formats through `skills`, and match industry data sources through `plugins`.
* **Human review before publishing**: For external-facing content such as financial or brand materials, add a human review step in your own system. After your business system receives the files from the event stream, route them for human approval before publishing.

## Next steps

> [card] [Run the official PPT Assistant](https://platform.kimi.ai/docs/hosted-agents/quickstart.md)
>
> Walk through a complete call with the official PPT Assistant from scratch.

> [card] [Inspect presentation events](https://platform.kimi.ai/docs/hosted-agents/event-stream.md)
>
> Subscribe to streams, resume after disconnects, and reconcile incremental events.

> [card] [Upload source materials](https://platform.kimi.ai/docs/hosted-agents/files.md)
>
> Upload source files, mount them to sessions, and retrieve output files.
