semvec/pypi-packages huggingface dataset:
dialectical-ai 1.0.0
Python SDK for Dialectical AI - Multi-agent conversational AI platform
License: MIT
Requires Python: >=3.8
Keywords: ai, llm, multi-agent, conversational-ai, dialectical

# Dialectical AI Python SDK

Official Python SDK for the Dialectical AI platform - a multi-agent conversational AI system.

## Installation

```bash
pip install dialectical-ai
```

## Quick Start

```python
from dialectical_ai import DAIClient, AgentRequest, ContextRequest, MessageRequest

# Initialize the client
client = DAIClient(api_key="dai_your_api_key_here")
# Or use environment variable: DIALECTICAL_AI_API_KEY

# Create an agent
agent = client.agents.create(AgentRequest(
    name="Assistant",
    description="Helpful assistant",
    instructions=["Be helpful and concise"],
    model="gpt-4o"
))

# Create a context
context = client.contexts.create(ContextRequest(
    name="Support Chat",
    agents=[agent.id]
))

# Send a message
message = MessageRequest(
    role="user",
    sender_name="User",
    content="Hello!"
)

# Get response
responses = client.contexts.run(context, [message])
for response in responses:
    print(f"{response.sender_name}: {response.content}")
```

## Features

- **Multi-Agent Conversations**: Create contexts with multiple AI agents
- **Knowledge Management**: Store and query knowledge using semantic search
- **Streaming Support**: Real-time streaming responses with SSE
- **Type-Safe**: Full Pydantic models for request/response validation
- **Simple API**: Clean, intuitive interface following industry best practices

## Building and Publishing

To build the package:

```bash
cd backend
python -m build
```

To publish to PyPI (test first with TestPyPI):

```bash
# Test on TestPyPI first
python -m twine upload --repository testpypi dist/*

# Then publish to PyPI
python -m twine upload dist/*
```

## Documentation

For full documentation, visit [https://docs.dialectical-ai.com](https://docs.dialectical-ai.com)

## License

MIT License