> ## Documentation Index
> Fetch the complete documentation index at: https://dify-6c0370d8-release-1-16-0.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# New Agent API

> API for New Agent apps, covering streaming chat messages, conversation management, file uploads, and app configuration

<Info>
  New Agent is a separate app type from the Agent app (`agent-chat`) covered on [Chatbot and Agent](/en/api-reference/guides/chat).
</Info>

[New Agent apps](/en/self-host/use-dify/build/new-agent/overview) run in `agent` mode: you send a message, stream the reply as it generates, and keep multi-turn context in conversations.

The model reasons and calls tools autonomously, and the stream shows that work: the reply text streams incrementally as `agent_message` events, with `agent_thought` events carrying each reasoning step and tool call alongside.

The turn closes with a single `message` event carrying the complete answer, then `message_end`. Render the `agent_message` deltas live and treat the closing `message` as the final answer rather than appending it.

Each `agent_thought` event carries the step's `thought`, the `tool` it called with its `tool_input`, and the tool's `observation`. The full stream shape is on [Send Chat Message](/en/api-reference/chat-messages/send-chat-message).

<Info>
  Authentication, the base URL, and the `user` field that scopes end-user data are covered in [Get Started](/en/api-reference/guides/get-started) and [End User Identity](/en/api-reference/guides/end-user-identity).
</Info>

## Send Messages and Stream Replies

* **[Send Chat Message](/en/api-reference/chat-messages/send-chat-message)**: send a query to your New Agent app. Streaming mode only; blocking mode returns a 400 `bad_request` error.

  The closing `message_end` event reports token usage; it never includes knowledge-retrieval citations (`retriever_resources`).

* **[Stop Chat Message Generation](/en/api-reference/chat-messages/stop-chat-message-generation)**: interrupt a streaming reply before it finishes.

* **[Get Next Suggested Questions](/en/api-reference/chat-messages/get-next-suggested-questions)**: propose follow-up questions after a reply completes, based on the conversation so far.

## Manage Conversations

* **[List Conversations](/en/api-reference/conversations/list-conversations)**: the current user's conversations, ordered by most recent activity.
* **[List Conversation Messages](/en/api-reference/conversations/list-conversation-messages)**: one conversation's message history, for a scrolling chat UI. Each message's `agent_thoughts` array carries the reasoning steps for that turn.
* **[Rename Conversation](/en/api-reference/conversations/rename-conversation)**: set a conversation's name, or have one generated from its content.
* **[Delete Conversation](/en/api-reference/conversations/delete-conversation)**: remove a conversation and its messages.

## Upload Files

* **[Upload File](/en/api-reference/files/upload-file)**: upload an image, document, audio, or video file, scoped to the uploading end user.

  Files passed to [Send Chat Message](/en/api-reference/chat-messages/send-chat-message) are surfaced to the agent as downloadable references it can fetch and inspect in its sandbox.

* **[Get End User Info](/en/api-reference/end-users/get-end-user-info)**: look up an end user's details from an end-user ID, such as the `created_by` in the Upload File response.

## Transcribe and Synthesize Speech

* **[Convert Audio to Text](/en/api-reference/audio/convert-audio-to-text)**: transcribe an uploaded audio file (MP3, M4A, WAV, AMR, or MPGA, up to 30 MB) so end users can speak their input instead of typing it.
* **[Convert Text to Audio](/en/api-reference/audio/convert-text-to-audio)**: synthesize a reply back into speech.

## Retrieve App Info and Settings

* **[Get App Info](/en/api-reference/applications/get-app-info)**: the app's name, description, tags, and mode.
* **[Get App Parameters](/en/api-reference/applications/get-app-parameters)**: the fields your calls send in `inputs` (names, types, defaults) plus the app's feature switches—the basis for building requests or a client UI.
* **[Get App Meta](/en/api-reference/applications/get-app-meta)**: app metadata; the `tool_icons` map is empty for New Agent apps.
* **[Get App WebApp Settings](/en/api-reference/applications/get-app-webapp-settings)**: the WebApp's site configuration, theme, and customization options.
