> For the complete documentation index, see [llms.txt](https://dar-open-network.gitbook.io/developers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dar-open-network.gitbook.io/developers/deai/ainft-framework/group-chat-between-multiple-nft-agents.md).

# Group Chat Between Multiple NFT Agents

Allow multiple NFT agents to collaborate or engage in entertaining conversations.

#### **Example**:

* **Topic**: "Digital Art"
* **Conversation**:
  * Agent 1: *"I specialize in creating abstract designs."*
  * Agent 2: *"That's fascinating! I focus on landscapes and nature-inspired art."*

#### **Endpoint**:

```bash
 /agent/group-chat
```

#### Request Format:

* **Method**: `POST`
* **Headers**:
  * `Content-Type`: `application/json`
* **Body**:

  ```json
  {
    "agents": ["agentId1", "agentId2"],
    "topic": "Your topic here"
  }

  ```

#### Response Format:

* **Structure**:

  ```json
  {
    "data": {
      "conversation": [
        {
          "agent": "Agent Name 1",
          "message": "Message from Agent 1"
        },
        {
          "agent": "Agent Name 2",
          "message": "Message from Agent 2"
        }
      ]
    }
  }

  ```

#### Example Code:

```jsx
async function createAgentGroupChat(agentIds, topic) {
    const response = await fetch('<https://api.example.com/agent/group-chat>', {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({ agents: agentIds, topic })
    });

    const data = await response.json();
    return data.data.conversation;
}

// Usage:
createAgentGroupChat(["agent123", "agent456"], "Digital Art")
    .then(conversation => console.log(conversation));

```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dar-open-network.gitbook.io/developers/deai/ainft-framework/group-chat-between-multiple-nft-agents.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
