# Conversations

The Conversations API is the core interface for managing AI-powered interactions in the Amigo platform.

## Overview

Conversations are the primary way users interact with Amigo agents. Each conversation maintains context, manages state, and handles the flow of messages between users and AI.

## API Endpoints

### Conversation Management

* [**Create**](https://docs.amigo.ai/developer-guide/classic-api/core-api/conversations/conversations-create) - `POST /conversations` - Initialize new conversations with agents
* [**Starters**](https://docs.amigo.ai/developer-guide/classic-api/core-api/conversations/conversations-starters) - `POST /conversation/conversation_starter` - Generate contextual conversation starters
* [**Interact**](https://docs.amigo.ai/developer-guide/classic-api/core-api/conversations/conversations-interact) - `POST /conversations/{id}/messages` - Send messages and receive AI responses
* [**Events**](https://docs.amigo.ai/developer-guide/classic-api/core-api/conversations/conversations-events) - `GET /conversations/{id}/events` - Stream real-time conversation events
* [**Lifecycle**](https://docs.amigo.ai/developer-guide/classic-api/core-api/conversations/conversations-lifecycle) - `PATCH /conversations/{id}` - Manage conversation states and completion
* [**Voice**](https://docs.amigo.ai/developer-guide/classic-api/core-api/conversations/conversations-voice) - `POST /conversations/{id}/voice` - Enable voice interactions
* [**Real-time Voice**](https://docs.amigo.ai/developer-guide/classic-api/core-api/conversations/conversations-realtime) - `WSS /conversation/converse_realtime` - WebSocket endpoint for real-time voice conversations

## Key Features

* **Contextual Memory** - Conversations maintain context across multiple interactions
* **Multi-modal Support** - Text, voice, and structured data inputs
* **Real-time Streaming** - Server-sent events for live updates
* **WebSocket Support** - Low-latency bidirectional communication for real-time voice
* **Voice Activity Detection** - Automatic speech detection in real-time mode
* **State Management** - Track and control conversation flow
* **Voice Integration** - Voice-to-text and text-to-voice
* **Automatic Audio Fillers** - Intelligent latency management during voice interactions

## Common Use Cases

1. **Customer Support** - Automated support conversations with context awareness
2. **Virtual Assistants** - Personal AI assistants with memory and learning
3. **Interactive Workflows** - Guide users through complex processes
4. **Voice Interfaces** - Natural language voice interactions

## Quick Start

```javascript
// Create a new conversation
const conversation = await amigo.conversations.create({
  agent_id: "agent_123",
  user_id: "user_456"
});

// Send a message
const response = await amigo.conversations.interact(conversation.id, {
  message: "Hello, I need help with my order"
});

// Listen for events
const events = amigo.conversations.events(conversation.id);
events.on('message', (data) => {
  console.log('New message:', data);
});
```

## Related Documentation

* [Authentication](https://docs.amigo.ai/developer-guide/getting-started/authentication)
* [SDK Reference](https://docs.amigo.ai/developer-guide/classic-api/sdks)
* [Conversation History](https://docs.amigo.ai/developer-guide/classic-api/core-api/conversations/conversation-history)
