> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dify.ai/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).
  * The New Agent is in beta, available in Dify [1.16.0-rc1](https://github.com/langgenius/dify/releases).
</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.

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

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

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