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.2.tar.gz (15.7 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.2-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dialetica-1.0.2.tar.gz
  • Upload date:
  • Size: 15.7 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.2.tar.gz
Algorithm Hash digest
SHA256 48e3cea957a66f0a917c7d0e9f2fee9ff0e6d380abe0ab8dc297e5ab131766bf
MD5 98b85412d80826e049f2c6c08de42526
BLAKE2b-256 12b189f7b06ac9e3aa4fe516a74195121eec9d5300359b708e90de9a61d101e3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dialetica-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 12.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 21d9135efed28ad032a5fa61e0f15c3dd1516a11e92810722786fd8835255625
MD5 1131aeb4c12e44b6821c6620f68f458a
BLAKE2b-256 d03869dd7df963db6bea5822840dfcadcab35504600db41c5caf2ca3a498b194

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