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.21.tar.gz (15.8 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.21-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dialetica-1.0.21.tar.gz
  • Upload date:
  • Size: 15.8 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.21.tar.gz
Algorithm Hash digest
SHA256 a4076fe1e5e9792215b2dde71bdb07458383c20316ac8a0736ccf183a59689bf
MD5 c36f050f1f671ef032e8e4ded3676441
BLAKE2b-256 27057710e48556695ba9e68caa329d4a84e565653117c45b633807ab516aa6b1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dialetica-1.0.21-py3-none-any.whl
  • Upload date:
  • Size: 12.6 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.21-py3-none-any.whl
Algorithm Hash digest
SHA256 e7d740f7df2a2bbad4b5127ae3ee07f6200adbd0cd431a69f82153efb2151522
MD5 fe75c874b310c1c8a118b421922b8781
BLAKE2b-256 2bff81e1d2c3db190243ceaf63ff5192620cd60f4178ce2b50557413dee8fb8d

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