---
title: "Upload Knowledge File"
method: POST
path: "/agents/{agent_id}/knowledge-files"
tags: ["agents"]
---

# Upload Knowledge File

`POST /agents/{agent_id}/knowledge-files`

Upload a knowledge file for an agent. Supports PDF, TXT, MD, DOCX, CSV.

## Path parameters

- `agent_id` string, uuid, required

## Response `201`

Successful Response

- AgentKnowledgeFileResponse — Response for an agent knowledge file.
  - `id` string, uuid, required
  - `agent_id` string, uuid, required
  - `filename` string, required
  - `mime_type` string, nullable
  - `file_size` integer
  - `created_at` string, date-time, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/meganova/apis/fastapi.md) · [All operations](https://skmtc.net/meganova/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/meganova/fastapi/revisions/2b2bab8b9017/schema)
