> For the complete documentation index, see [llms.txt](https://underdogcowboy.gitbook.io/underdogcowboy-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://underdogcowboy.gitbook.io/underdogcowboy-docs/basics/dialog-manager-in-underdog-cowboy.md).

# Dialog Manager in Underdog Cowboy

The Dialog Manager is the heart of Underdog Cowboy. It's like a smart assistant that helps manage conversations between you, your AI agents, and language models. Think of it as a conductor in an orchestra, making sure all the different parts work together smoothly.

### What Does It Do?

1. **Manages Conversations**: It keeps track of who's talking to whom and what they're saying.
2. **Processes Messages**: When you or an AI agent says something, the Dialog Manager makes sure it gets to the right place.
3. **Coordinates Different Parts**: It helps all the pieces of Underdog Cowboy work together.

### How to Use It

Here's a simple example of how you might use the Dialog Manager:

```python
from underdogcowboy import adm, TechStartupIdeaGenerator
adm | [TechStartupIdeaGenerator]
TechStartupIdeaGenerator >> "Hi, I'm interested in AI and sustainable energy."
```

Let's break this down:

1. `adm` is your Dialog Manager. It's like your main control panel.
2. `|` is how you add an AI agent to your Dialog Manager. Here, we're adding the TechStartupIdeaGenerator.
3. `>>` is how you send a message to an agent. It's like typing a message in a chat app.

### Key Features

1. **Easy Agent Management**: You can easily add or remove AI agents as needed.
2. **Simple Message Sending**: Sending messages to agents is as easy as using `>>`.
3. **Flexible**: You can use it for simple conversations or complex multi-agent interactions.

### Best Practices

1. **Start Simple**: Begin with one agent and simple interactions.
2. **Experiment**: Try different messages and see how your agents respond.
3. **Build Gradually**: As you get comfortable, try adding more agents or creating more complex conversations.

Remember, you don't need to understand all the technical details. The Dialog Manager is designed to make your life easier, allowing you to focus on creating and using AI agents without worrying about the complex stuff happening behind the scenes.


---

# 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, and the optional `goal` query parameter:

```
GET https://underdogcowboy.gitbook.io/underdogcowboy-docs/basics/dialog-manager-in-underdog-cowboy.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
