Skip to main content

Python SDK for Dialetica AI - Multi-agent conversational AI platform

Project description

Dialetica AI Python SDK

Official Python SDK for the Dialetica AI platform - a multi-agent conversational AI system.

Installation

pip install dialetica

Quick Start

from dialetica import Dialetica, AgentRequest, ContextRequest, MessageRequest

# Initialize the client
client = Dialetica(api_key="dai_your_api_key_here")
# Or use environment variable: DIALETICA_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:

cd backend
python -m build

To publish to PyPI (test first with TestPyPI):

# 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.dialetica-ai.com

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dialetica-1.0.23.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dialetica-1.0.23-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file dialetica-1.0.23.tar.gz.

File metadata

  • Download URL: dialetica-1.0.23.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for dialetica-1.0.23.tar.gz
Algorithm Hash digest
SHA256 13a735da1b5da94737bbb55a5915e1c346e04be3d0172c107226b08da842df99
MD5 b24649d31e80d66d9cacd4ce089aefcd
BLAKE2b-256 ab5957168e9e8d2a9f6ac5e56f2c0796468811b8457f4c8477b689073cf56c36

See more details on using hashes here.

File details

Details for the file dialetica-1.0.23-py3-none-any.whl.

File metadata

  • Download URL: dialetica-1.0.23-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for dialetica-1.0.23-py3-none-any.whl
Algorithm Hash digest
SHA256 47c0eecbd9baac2484e0844b7c8b731a77cf1b552d64e9bcc16cb6f6df2dab8c
MD5 6f9b65cdcfb7db61bc0d5cb09a6a29da
BLAKE2b-256 fd4491ecfb221afc4dadf78f8264573f285f65a75357327a341d7fffcc29d9e2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page