smallestai 3.0.0__tar.gz → 3.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of smallestai might be problematic. Click here for more details.

Files changed (97) hide show
  1. {smallestai-3.0.0/smallestai.egg-info → smallestai-3.0.1}/PKG-INFO +120 -133
  2. {smallestai-3.0.0 → smallestai-3.0.1}/README.md +119 -133
  3. {smallestai-3.0.0 → smallestai-3.0.1}/pyproject.toml +3 -2
  4. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/agent_dto.py +2 -2
  5. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/create_agent_request.py +4 -4
  6. smallestai-3.0.0/smallestai/atoms/models/create_campaign200_response_inner.py → smallestai-3.0.1/smallestai/atoms/models/get_campaign_by_id200_response_data.py +11 -7
  7. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/update_agent_request.py +4 -4
  8. {smallestai-3.0.0 → smallestai-3.0.1/smallestai.egg-info}/PKG-INFO +120 -133
  9. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai.egg-info/SOURCES.txt +0 -5
  10. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai.egg-info/requires.txt +3 -0
  11. smallestai-3.0.0/smallestai/atoms/models/create_campaign200_response.py +0 -93
  12. smallestai-3.0.0/smallestai/atoms/models/create_campaign200_response_data.py +0 -106
  13. smallestai-3.0.0/smallestai/atoms/models/get_campaign_by_id200_response_data.py +0 -114
  14. smallestai-3.0.0/smallestai/atoms/models/get_conversation200_response.py +0 -93
  15. smallestai-3.0.0/smallestai/atoms/models/get_conversation200_response_data.py +0 -125
  16. {smallestai-3.0.0 → smallestai-3.0.1}/LICENSE +0 -0
  17. {smallestai-3.0.0 → smallestai-3.0.1}/setup.cfg +0 -0
  18. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/__init__.py +0 -0
  19. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/__init__.py +0 -0
  20. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/api/__init__.py +0 -0
  21. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/api/agent_templates_api.py +0 -0
  22. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/api/agents_api.py +0 -0
  23. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/api/calls_api.py +0 -0
  24. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/api/campaigns_api.py +0 -0
  25. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/api/knowledge_base_api.py +0 -0
  26. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/api/logs_api.py +0 -0
  27. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/api/organization_api.py +0 -0
  28. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/api/user_api.py +0 -0
  29. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/api_client.py +0 -0
  30. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/api_response.py +0 -0
  31. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/atoms_client.py +0 -0
  32. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/configuration.py +0 -0
  33. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/exceptions.py +0 -0
  34. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/__init__.py +0 -0
  35. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/agent_dto_language.py +0 -0
  36. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/agent_dto_synthesizer.py +0 -0
  37. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/agent_dto_synthesizer_voice_config.py +0 -0
  38. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/api_response.py +0 -0
  39. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/bad_request_error_response.py +0 -0
  40. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/create_agent_from_template200_response.py +0 -0
  41. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/create_agent_from_template_request.py +0 -0
  42. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/create_agent_request_language.py +0 -0
  43. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/create_agent_request_language_synthesizer.py +0 -0
  44. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/create_agent_request_language_synthesizer_voice_config.py +0 -0
  45. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/create_campaign201_response.py +0 -0
  46. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/create_campaign201_response_data.py +0 -0
  47. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/create_campaign_request.py +0 -0
  48. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/create_knowledge_base201_response.py +0 -0
  49. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/create_knowledge_base_request.py +0 -0
  50. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/delete_agent200_response.py +0 -0
  51. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/get_agent_by_id200_response.py +0 -0
  52. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/get_agent_templates200_response.py +0 -0
  53. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/get_agent_templates200_response_data_inner.py +0 -0
  54. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/get_agents200_response.py +0 -0
  55. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/get_agents200_response_data.py +0 -0
  56. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/get_campaign_by_id200_response.py +0 -0
  57. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/get_campaigns200_response.py +0 -0
  58. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/get_campaigns200_response_data_inner.py +0 -0
  59. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/get_campaigns200_response_data_inner_agent.py +0 -0
  60. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/get_campaigns200_response_data_inner_audience.py +0 -0
  61. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/get_campaigns_request.py +0 -0
  62. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/get_conversation_logs200_response.py +0 -0
  63. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/get_conversation_logs200_response_data.py +0 -0
  64. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/get_current_user200_response.py +0 -0
  65. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/get_current_user200_response_data.py +0 -0
  66. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/get_knowledge_base_by_id200_response.py +0 -0
  67. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/get_knowledge_base_items200_response.py +0 -0
  68. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/get_knowledge_bases200_response.py +0 -0
  69. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/get_organization200_response.py +0 -0
  70. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/get_organization200_response_data.py +0 -0
  71. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/get_organization200_response_data_members_inner.py +0 -0
  72. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/get_organization200_response_data_subscription.py +0 -0
  73. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/internal_server_error_response.py +0 -0
  74. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/knowledge_base_dto.py +0 -0
  75. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/knowledge_base_item_dto.py +0 -0
  76. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/start_outbound_call200_response.py +0 -0
  77. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/start_outbound_call200_response_data.py +0 -0
  78. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/start_outbound_call_request.py +0 -0
  79. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/unauthorized_error_reponse.py +0 -0
  80. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/update_agent200_response.py +0 -0
  81. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/update_agent_request_language.py +0 -0
  82. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/update_agent_request_synthesizer.py +0 -0
  83. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/update_agent_request_synthesizer_voice_config.py +0 -0
  84. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/update_agent_request_synthesizer_voice_config_one_of.py +0 -0
  85. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/update_agent_request_synthesizer_voice_config_one_of1.py +0 -0
  86. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/models/upload_text_to_knowledge_base_request.py +0 -0
  87. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/py.typed +0 -0
  88. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/atoms/rest.py +0 -0
  89. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/waves/__init__.py +0 -0
  90. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/waves/async_waves_client.py +0 -0
  91. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/waves/exceptions.py +0 -0
  92. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/waves/models.py +0 -0
  93. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/waves/stream_tts.py +0 -0
  94. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/waves/utils.py +0 -0
  95. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai/waves/waves_client.py +0 -0
  96. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai.egg-info/dependency_links.txt +0 -0
  97. {smallestai-3.0.0 → smallestai-3.0.1}/smallestai.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: smallestai
3
- Version: 3.0.0
3
+ Version: 3.0.1
4
4
  Summary: Official Python client for the Smallest AI API
5
5
  Author-email: Smallest <support@smallest.ai>
6
6
  License: MIT
@@ -20,6 +20,7 @@ Requires-Dist: urllib3<3.0.0,>=1.25.3
20
20
  Requires-Dist: python-dateutil>=2.8.2
21
21
  Requires-Dist: pydantic>=2
22
22
  Requires-Dist: typing-extensions>=4.7.1
23
+ Requires-Dist: audioop-lts; python_version >= "3.13"
23
24
  Provides-Extra: test
24
25
  Requires-Dist: jiwer; extra == "test"
25
26
  Requires-Dist: httpx; extra == "test"
@@ -53,19 +54,23 @@ Dynamic: license-file
53
54
 
54
55
  ## Official Python Client for Smallest AI API
55
56
 
56
- Smallest AI builds high-speed multi-lingual voice models tailored for real-time applications, achieving ultra-realistic audio generation in as fast as ~100 milliseconds for 10 seconds of audio. With this sdk, you can easily convert text into high-quality audio with humanlike expressiveness.
57
+ Smallest AI offers an end to end Voice AI suite for developers trying to build real-time voice agents. You can either directly use our Text to Speech APIs through the Waves Client or use the Atoms Client to build and operate end to end enterprise ready Voice Agents.
57
58
 
58
- Currently, the WavesClient supports direct synthesis and the ability to synthesize streamed LLM output, both synchronously and asynchronously.
59
+ With this sdk, you can easily interact with both Waves and Atoms from any Python 3.9+ application, by utilising WavesClient and AtomsClient classes respectively. Currently, the WavesClient supports direct synthesis and the ability to synthesize streamed LLM output, both synchronously and asynchronously. AtomsClient provides a simpler way of interacting with all our API's to develop and run agentic workflows.
60
+
61
+ To learn how to use our API's, check out our documentation for [Atoms](https://atoms-docs.smallest.ai/introduction) and [Waves](https://waves-docs.smallest.ai/content/introduction/)
59
62
 
60
63
  ## Table of Contents
61
64
 
62
65
  - [Installation](#installation)
63
66
  - [Get the API Key](#get-the-api-key)
64
- - [Atoms Documentation](#atoms-documentation)
65
- - [Getting Started](#getting-started)
66
- - [Documentation for API Endpoints](#documentation-for-api-endpoints)
67
- - [Documentation For Models](#documentation-for-models)
68
- - [Waves Documentation](#waves-documentation)
67
+ - [What are Atoms?](#what-are-atoms)
68
+ - [Creating your first Agent](#creating-your-first-agent)
69
+ - [Placing an outbound call](#placing-an-outbound-call)
70
+ - [Providing context to the agent](#providing-context-to-the-agent)
71
+ - [Configuring workflows to drive conversations](#configuring-workflows-to-drive-conversations)
72
+ - [Provisioning bulk calling using campaigns](#provisioning-bulk-calling-using-campaigns)
73
+ - [Getting started with Waves](#getting-started-with-waves)
69
74
  - [Best Practices for Input Text](#best-practices-for-input-text)
70
75
  - [Examples](#examples)
71
76
  - [Synchronous](#synchronous)
@@ -97,140 +102,122 @@ When using an SDK in your application, make sure to pin to at least the major ve
97
102
  4. Export the API Key in your environment with the name `SMALLEST_API_KEY`, ensuring that your application can access it securely for authentication.
98
103
 
99
104
 
100
- ## Atoms Documentation
105
+ ## What are Atoms
106
+
107
+ Atoms are agents that can talk to anyone on voice or text in any language, in any voice. Imagine an AI that you can hire to perform end-to-end tasks for your business. The following examples give an overview of how AtomsClient leverages abstractions such as KnowledgeBase, Campaigns and graph-based Workflows to let you build the smartest voice agent for your usecase.
101
108
 
102
- ### Getting Started
109
+ You can find the full reference for Atoms [here](./docs/atoms/Api.md).
103
110
 
104
- Please follow the [installation procedure](#installation--usage) and then run the following:
111
+ ### Creating your first Agent
105
112
 
106
113
  ```python
107
- import smallestai.atoms
108
- from smallestai.atoms.rest import ApiException
109
- from pprint import pprint
110
-
111
- # Defining the host is optional and defaults to https://atoms-api.smallest.ai/api/v1
112
- # See configuration.py for a list of all supported configuration parameters.
113
- configuration = atoms.Configuration(
114
- host = "https://atoms-api.smallest.ai/api/v1"
115
- )
114
+ from smallestai.atoms import AtomsClient
116
115
 
117
- # The client must configure the authentication and authorization parameters
118
- # in accordance with the API server security policy.
119
- # Examples for each auth method are provided below, use the example that
120
- # satisfies your auth use case.
116
+ TARGET_PHONE_NUMBER = "+919666666666"
117
+
118
+ def main():
119
+ # alternatively, you can export API Key as environment variable SMALLEST_API_KEY.
120
+ config = Configuration(
121
+ access_token = 'SMALLEST_API_KEY'
122
+ )
121
123
 
122
- # Configure Bearer authorization (JWT): BearerAuth
123
- configuration = atoms.Configuration(
124
- access_token = os.environ["BEARER_TOKEN"]
125
- )
124
+ atoms_client = AtomsClient(config)
125
+
126
+ agent_id = atoms_client.create_agent(
127
+ create_agent_request={
128
+ "name": "Atoms Multi-Modal Agent",
129
+ "description": "My first atoms agent",
130
+ "language": {
131
+ "enabled": "en",
132
+ "switching": False
133
+ },
134
+ "synthesizer": {
135
+ "voiceConfig": {
136
+ "model": "waves_lightning_large",
137
+ "voiceId": "nyah"
138
+ },
139
+ "speed": 1.2,
140
+ "consistency": 0.5,
141
+ "similarity": 0,
142
+ "enhancement": 1
143
+ },
144
+ "slmModel": "electron-v1",
145
+ }
146
+ ).data
147
+
148
+ print(f"Successfully created agent with id: {agent_id}")
126
149
 
127
- # Enter a context with an instance of the API client
128
- with atoms.ApiClient(configuration) as api_client:
129
- # Create an instance of the API class
130
- api_instance = atoms.AgentTemplatesApi(api_client)
131
- create_agent_from_template_request = atoms.CreateAgentFromTemplateRequest()
132
-
133
- try:
134
- # Create agent from template
135
- api_response = api_instance.create_agent_from_template(create_agent_from_template_request)
136
- print("The response of AgentTemplatesApi->create_agent_from_template:\n")
137
- pprint(api_response)
138
- except ApiException as e:
139
- print("Exception when calling AgentTemplatesApi->create_agent_from_template: %s\n" % e)
150
+ if __name__ == "__main__":
151
+ main()
140
152
  ```
141
153
 
142
- ### Documentation for API Endpoints
143
-
144
- All URIs are relative to *https://atoms-api.smallest.ai/api/v1*
145
-
146
- Class | Method | HTTP request | Description
147
- ------------ | ------------- | ------------- | -------------
148
- *AgentTemplatesApi* | [**create_agent_from_template**](docs/atoms/AgentTemplatesApi.md#create_agent_from_template) | **POST** /agent/from-template | Create agent from template
149
- *AgentTemplatesApi* | [**get_agent_templates**](docs/atoms/AgentTemplatesApi.md#get_agent_templates) | **GET** /agent/template | Get agent templates
150
- *AgentsApi* | [**create_agent**](docs/atoms/AgentsApi.md#create_agent) | **POST** /agent | Create a new agent
151
- *AgentsApi* | [**delete_agent**](docs/atoms/AgentsApi.md#delete_agent) | **DELETE** /agent/{id} | Delete an agent
152
- *AgentsApi* | [**get_agent_by_id**](docs/atoms/AgentsApi.md#get_agent_by_id) | **GET** /agent/{id} | Get agent by ID
153
- *AgentsApi* | [**get_agents**](docs/atoms/AgentsApi.md#get_agents) | **GET** /agent | Get all agents
154
- *AgentsApi* | [**update_agent**](docs/atoms/AgentsApi.md#update_agent) | **PATCH** /agent/{id} | Update an agent
155
- *CallsApi* | [**start_outbound_call**](docs/atoms/CallsApi.md#start_outbound_call) | **POST** /conversation/outbound | Start an outbound call
156
- *CampaignsApi* | [**create_campaign**](docs/atoms/CampaignsApi.md#create_campaign) | **POST** /campaign | Create a campaign
157
- *CampaignsApi* | [**delete_campaign**](docs/atoms/CampaignsApi.md#delete_campaign) | **DELETE** /campaign/{id} | Delete a campaign
158
- *CampaignsApi* | [**get_campaign_by_id**](docs/atoms/CampaignsApi.md#get_campaign_by_id) | **GET** /campaign/{id} | Get a campaign
159
- *CampaignsApi* | [**get_campaigns**](docs/atoms/CampaignsApi.md#get_campaigns) | **GET** /campaign | Retrieve all campaigns
160
- *CampaignsApi* | [**pause_campaign**](docs/atoms/CampaignsApi.md#pause_campaign) | **POST** /campaign/{id}/pause | Pause a campaign
161
- *CampaignsApi* | [**start_campaign**](docs/atoms/CampaignsApi.md#start_campaign) | **POST** /campaign/{id}/start | Start a campaign
162
- *KnowledgeBaseApi* | [**create_knowledge_base**](docs/atoms/KnowledgeBaseApi.md#create_knowledge_base) | **POST** /knowledgebase | Create a knowledge base
163
- *KnowledgeBaseApi* | [**delete_knowledge_base**](docs/atoms/KnowledgeBaseApi.md#delete_knowledge_base) | **DELETE** /knowledgebase/{id} | Delete a knowledge base
164
- *KnowledgeBaseApi* | [**delete_knowledge_base_item**](docs/atoms/KnowledgeBaseApi.md#delete_knowledge_base_item) | **DELETE** /knowledgebase/{knowledgeBaseId}/items/{knowledgeBaseItemId} | Delete a knowledge base item
165
- *KnowledgeBaseApi* | [**get_knowledge_base_by_id**](docs/atoms/KnowledgeBaseApi.md#get_knowledge_base_by_id) | **GET** /knowledgebase/{id} | Get a knowledge base
166
- *KnowledgeBaseApi* | [**get_knowledge_base_items**](docs/atoms/KnowledgeBaseApi.md#get_knowledge_base_items) | **GET** /knowledgebase/{id}/items | Get all knowledge base items
167
- *KnowledgeBaseApi* | [**get_knowledge_bases**](docs/atoms/KnowledgeBaseApi.md#get_knowledge_bases) | **GET** /knowledgebase | Get all knowledge bases
168
- *KnowledgeBaseApi* | [**upload_media_to_knowledge_base**](docs/atoms/KnowledgeBaseApi.md#upload_media_to_knowledge_base) | **POST** /knowledgebase/{id}/items/upload-media | Upload a media to a knowledge base
169
- *KnowledgeBaseApi* | [**upload_text_to_knowledge_base**](docs/atoms/KnowledgeBaseApi.md#upload_text_to_knowledge_base) | **POST** /knowledgebase/{id}/items/upload-text | Upload a text to a knowledge base
170
- *LogsApi* | [**get_conversation_logs**](docs/atoms/LogsApi.md#get_conversation_logs) | **GET** /conversation/{id} | Get conversation logs
171
- *OrganizationApi* | [**get_organization**](docs/atoms/OrganizationApi.md#get_organization) | **GET** /organization | Get organization details
172
- *UserApi* | [**get_current_user**](docs/atoms/UserApi.md#get_current_user) | **GET** /user | Get user details
173
-
174
- ### Documentation For Models
175
-
176
- - [AgentDTO](docs/atoms/AgentDTO.md)
177
- - [AgentDTOLanguage](docs/atoms/AgentDTOLanguage.md)
178
- - [AgentDTOSynthesizer](docs/atoms/AgentDTOSynthesizer.md)
179
- - [AgentDTOSynthesizerVoiceConfig](docs/atoms/AgentDTOSynthesizerVoiceConfig.md)
180
- - [ApiResponse](docs/atoms/ApiResponse.md)
181
- - [BadRequestErrorResponse](docs/atoms/BadRequestErrorResponse.md)
182
- - [CreateAgentFromTemplate200Response](docs/atoms/CreateAgentFromTemplate200Response.md)
183
- - [CreateAgentFromTemplateRequest](docs/atoms/CreateAgentFromTemplateRequest.md)
184
- - [CreateAgentRequest](docs/atoms/CreateAgentRequest.md)
185
- - [CreateAgentRequestLanguage](docs/atoms/CreateAgentRequestLanguage.md)
186
- - [CreateAgentRequestLanguageSynthesizer](docs/atoms/CreateAgentRequestLanguageSynthesizer.md)
187
- - [CreateAgentRequestLanguageSynthesizerVoiceConfig](docs/atoms/CreateAgentRequestLanguageSynthesizerVoiceConfig.md)
188
- - [CreateCampaign201Response](docs/atoms/CreateCampaign201Response.md)
189
- - [CreateCampaign201ResponseData](docs/atoms/CreateCampaign201ResponseData.md)
190
- - [CreateCampaignRequest](docs/atoms/CreateCampaignRequest.md)
191
- - [CreateKnowledgeBase201Response](docs/atoms/CreateKnowledgeBase201Response.md)
192
- - [CreateKnowledgeBaseRequest](docs/atoms/CreateKnowledgeBaseRequest.md)
193
- - [DeleteAgent200Response](docs/atoms/DeleteAgent200Response.md)
194
- - [GetAgentById200Response](docs/atoms/GetAgentById200Response.md)
195
- - [GetAgentTemplates200Response](docs/atoms/GetAgentTemplates200Response.md)
196
- - [GetAgentTemplates200ResponseDataInner](docs/atoms/GetAgentTemplates200ResponseDataInner.md)
197
- - [GetAgents200Response](docs/atoms/GetAgents200Response.md)
198
- - [GetAgents200ResponseData](docs/atoms/GetAgents200ResponseData.md)
199
- - [GetCampaignById200Response](docs/atoms/GetCampaignById200Response.md)
200
- - [GetCampaignById200ResponseData](docs/atoms/GetCampaignById200ResponseData.md)
201
- - [GetCampaigns200Response](docs/atoms/GetCampaigns200Response.md)
202
- - [GetCampaigns200ResponseDataInner](docs/atoms/GetCampaigns200ResponseDataInner.md)
203
- - [GetCampaigns200ResponseDataInnerAgent](docs/atoms/GetCampaigns200ResponseDataInnerAgent.md)
204
- - [GetCampaigns200ResponseDataInnerAudience](docs/atoms/GetCampaigns200ResponseDataInnerAudience.md)
205
- - [GetCampaignsRequest](docs/atoms/GetCampaignsRequest.md)
206
- - [GetConversationLogs200Response](docs/atoms/GetConversationLogs200Response.md)
207
- - [GetConversationLogs200ResponseData](docs/atoms/GetConversationLogs200ResponseData.md)
208
- - [GetCurrentUser200Response](docs/atoms/GetCurrentUser200Response.md)
209
- - [GetCurrentUser200ResponseData](docs/atoms/GetCurrentUser200ResponseData.md)
210
- - [GetKnowledgeBaseById200Response](docs/atoms/GetKnowledgeBaseById200Response.md)
211
- - [GetKnowledgeBaseItems200Response](docs/atoms/GetKnowledgeBaseItems200Response.md)
212
- - [GetKnowledgeBases200Response](docs/atoms/GetKnowledgeBases200Response.md)
213
- - [GetOrganization200Response](docs/atoms/GetOrganization200Response.md)
214
- - [GetOrganization200ResponseData](docs/atoms/GetOrganization200ResponseData.md)
215
- - [GetOrganization200ResponseDataMembersInner](docs/atoms/GetOrganization200ResponseDataMembersInner.md)
216
- - [GetOrganization200ResponseDataSubscription](docs/atoms/GetOrganization200ResponseDataSubscription.md)
217
- - [InternalServerErrorResponse](docs/atoms/InternalServerErrorResponse.md)
218
- - [KnowledgeBaseDTO](docs/atoms/KnowledgeBaseDTO.md)
219
- - [KnowledgeBaseItemDTO](docs/atoms/KnowledgeBaseItemDTO.md)
220
- - [StartOutboundCall200Response](docs/atoms/StartOutboundCall200Response.md)
221
- - [StartOutboundCall200ResponseData](docs/atoms/StartOutboundCall200ResponseData.md)
222
- - [StartOutboundCallRequest](docs/atoms/StartOutboundCallRequest.md)
223
- - [UnauthorizedErrorReponse](docs/atoms/UnauthorizedErrorReponse.md)
224
- - [UpdateAgent200Response](docs/atoms/UpdateAgent200Response.md)
225
- - [UpdateAgentRequest](docs/atoms/UpdateAgentRequest.md)
226
- - [UpdateAgentRequestLanguage](docs/atoms/UpdateAgentRequestLanguage.md)
227
- - [UpdateAgentRequestSynthesizer](docs/atoms/UpdateAgentRequestSynthesizer.md)
228
- - [UpdateAgentRequestSynthesizerVoiceConfig](docs/atoms/UpdateAgentRequestSynthesizerVoiceConfig.md)
229
- - [UpdateAgentRequestSynthesizerVoiceConfigOneOf](docs/atoms/UpdateAgentRequestSynthesizerVoiceConfigOneOf.md)
230
- - [UpdateAgentRequestSynthesizerVoiceConfigOneOf1](docs/atoms/UpdateAgentRequestSynthesizerVoiceConfigOneOf1.md)
231
- - [UploadTextToKnowledgeBaseRequest](docs/atoms/UploadTextToKnowledgeBaseRequest.md)
232
-
233
- ## Waves Documentation
154
+ ### Placing an outbound call
155
+
156
+ ```python
157
+ from smallestai.atoms import AtomsClient
158
+ from smallestai.atoms import Configuration
159
+
160
+ TARGET_PHONE_NUMBER = "+919666666666"
161
+ MY_AGENT_ID = "67e****ff*ec***82*3c9e**"
162
+
163
+ def main():
164
+ # assumes you have exported API_KEY in SMALLEST_API_KEY environment variable
165
+ atoms_client = AtomsClient()
166
+
167
+ call_response = atoms_client.start_outbound_call(
168
+ start_outbound_call_request={
169
+ "agent_id": MY_AGENT_ID,
170
+ "phone_number": TARGET_PHONE_NUMBER,
171
+ }
172
+ )
173
+ print(f"Successfully placed call with id: {call_response.conversation_id}")
174
+
175
+ if __name__ == "__main__":
176
+ main()
177
+ ```
178
+ ### Providing context to the agent
179
+
180
+ An agent can be attached to a knowledge base, which it can look up during conversations. Here is how you can do it:
181
+
182
+ ```python
183
+ from smallestai.atoms import AtomsClient
184
+
185
+ def main():
186
+ # assumes you have exported API_KEY in SMALLEST_API_KEY environment variable
187
+ atoms_client = AtomsClient()
188
+
189
+ # Create a new knowledge base
190
+ knowledge_base = atoms_client.create_knowledge_base(
191
+ create_knowledge_base_request={
192
+ "name": "Customer Support Knowledge Base",
193
+ "description": "Contains FAQs and product information"
194
+ }
195
+ )
196
+ knowledge_base_id = knowledge_base.data
197
+
198
+ with open("product_manual.pdf", "rb") as f:
199
+ media_content = f.read()
200
+ media_response = atoms_client.upload_media_to_knowledge_base(
201
+ id=knowledge_base_id,
202
+ media=media_content
203
+ )
204
+ print("Added product_manual.pdf to knowledge base")
205
+
206
+ if __name__ == "__main__":
207
+ main()
208
+ ```
209
+
210
+ ### Configuring workflows to drive conversations
211
+
212
+ An agent can be configured with a graph-based workflow to help it drive meaningful conversations. You can explore making one on our [platform](https://atoms.smallest.ai/dashboard/agents). Refer to our [documentation](https://atoms-docs.smallest.ai/deep-dive/workflow/what-is-a-workflow) for learning more extensively.
213
+
214
+ ![image](https://i.imgur.com/kRs53zV.png)
215
+
216
+ ### Provisioning bulk calling using campaigns
217
+
218
+ To manage bulk calls, you can use [Atoms platform](https://atoms.smallest.ai/dashboard/audience) to create [audience](https://atoms-docs.smallest.ai/deep-dive/audience/audience) (collection of contacts) and then configure [campaigns](https://atoms-docs.smallest.ai/deep-dive/campaign/campaign) to run.
219
+
220
+ ## Getting started with Waves
234
221
 
235
222
  ### Best Practices for Input Text
236
223
 
@@ -17,19 +17,23 @@
17
17
 
18
18
  ## Official Python Client for Smallest AI API
19
19
 
20
- Smallest AI builds high-speed multi-lingual voice models tailored for real-time applications, achieving ultra-realistic audio generation in as fast as ~100 milliseconds for 10 seconds of audio. With this sdk, you can easily convert text into high-quality audio with humanlike expressiveness.
20
+ Smallest AI offers an end to end Voice AI suite for developers trying to build real-time voice agents. You can either directly use our Text to Speech APIs through the Waves Client or use the Atoms Client to build and operate end to end enterprise ready Voice Agents.
21
21
 
22
- Currently, the WavesClient supports direct synthesis and the ability to synthesize streamed LLM output, both synchronously and asynchronously.
22
+ With this sdk, you can easily interact with both Waves and Atoms from any Python 3.9+ application, by utilising WavesClient and AtomsClient classes respectively. Currently, the WavesClient supports direct synthesis and the ability to synthesize streamed LLM output, both synchronously and asynchronously. AtomsClient provides a simpler way of interacting with all our API's to develop and run agentic workflows.
23
+
24
+ To learn how to use our API's, check out our documentation for [Atoms](https://atoms-docs.smallest.ai/introduction) and [Waves](https://waves-docs.smallest.ai/content/introduction/)
23
25
 
24
26
  ## Table of Contents
25
27
 
26
28
  - [Installation](#installation)
27
29
  - [Get the API Key](#get-the-api-key)
28
- - [Atoms Documentation](#atoms-documentation)
29
- - [Getting Started](#getting-started)
30
- - [Documentation for API Endpoints](#documentation-for-api-endpoints)
31
- - [Documentation For Models](#documentation-for-models)
32
- - [Waves Documentation](#waves-documentation)
30
+ - [What are Atoms?](#what-are-atoms)
31
+ - [Creating your first Agent](#creating-your-first-agent)
32
+ - [Placing an outbound call](#placing-an-outbound-call)
33
+ - [Providing context to the agent](#providing-context-to-the-agent)
34
+ - [Configuring workflows to drive conversations](#configuring-workflows-to-drive-conversations)
35
+ - [Provisioning bulk calling using campaigns](#provisioning-bulk-calling-using-campaigns)
36
+ - [Getting started with Waves](#getting-started-with-waves)
33
37
  - [Best Practices for Input Text](#best-practices-for-input-text)
34
38
  - [Examples](#examples)
35
39
  - [Synchronous](#synchronous)
@@ -61,140 +65,122 @@ When using an SDK in your application, make sure to pin to at least the major ve
61
65
  4. Export the API Key in your environment with the name `SMALLEST_API_KEY`, ensuring that your application can access it securely for authentication.
62
66
 
63
67
 
64
- ## Atoms Documentation
68
+ ## What are Atoms
69
+
70
+ Atoms are agents that can talk to anyone on voice or text in any language, in any voice. Imagine an AI that you can hire to perform end-to-end tasks for your business. The following examples give an overview of how AtomsClient leverages abstractions such as KnowledgeBase, Campaigns and graph-based Workflows to let you build the smartest voice agent for your usecase.
65
71
 
66
- ### Getting Started
72
+ You can find the full reference for Atoms [here](./docs/atoms/Api.md).
67
73
 
68
- Please follow the [installation procedure](#installation--usage) and then run the following:
74
+ ### Creating your first Agent
69
75
 
70
76
  ```python
71
- import smallestai.atoms
72
- from smallestai.atoms.rest import ApiException
73
- from pprint import pprint
74
-
75
- # Defining the host is optional and defaults to https://atoms-api.smallest.ai/api/v1
76
- # See configuration.py for a list of all supported configuration parameters.
77
- configuration = atoms.Configuration(
78
- host = "https://atoms-api.smallest.ai/api/v1"
79
- )
77
+ from smallestai.atoms import AtomsClient
80
78
 
81
- # The client must configure the authentication and authorization parameters
82
- # in accordance with the API server security policy.
83
- # Examples for each auth method are provided below, use the example that
84
- # satisfies your auth use case.
79
+ TARGET_PHONE_NUMBER = "+919666666666"
80
+
81
+ def main():
82
+ # alternatively, you can export API Key as environment variable SMALLEST_API_KEY.
83
+ config = Configuration(
84
+ access_token = 'SMALLEST_API_KEY'
85
+ )
85
86
 
86
- # Configure Bearer authorization (JWT): BearerAuth
87
- configuration = atoms.Configuration(
88
- access_token = os.environ["BEARER_TOKEN"]
89
- )
87
+ atoms_client = AtomsClient(config)
88
+
89
+ agent_id = atoms_client.create_agent(
90
+ create_agent_request={
91
+ "name": "Atoms Multi-Modal Agent",
92
+ "description": "My first atoms agent",
93
+ "language": {
94
+ "enabled": "en",
95
+ "switching": False
96
+ },
97
+ "synthesizer": {
98
+ "voiceConfig": {
99
+ "model": "waves_lightning_large",
100
+ "voiceId": "nyah"
101
+ },
102
+ "speed": 1.2,
103
+ "consistency": 0.5,
104
+ "similarity": 0,
105
+ "enhancement": 1
106
+ },
107
+ "slmModel": "electron-v1",
108
+ }
109
+ ).data
110
+
111
+ print(f"Successfully created agent with id: {agent_id}")
90
112
 
91
- # Enter a context with an instance of the API client
92
- with atoms.ApiClient(configuration) as api_client:
93
- # Create an instance of the API class
94
- api_instance = atoms.AgentTemplatesApi(api_client)
95
- create_agent_from_template_request = atoms.CreateAgentFromTemplateRequest()
96
-
97
- try:
98
- # Create agent from template
99
- api_response = api_instance.create_agent_from_template(create_agent_from_template_request)
100
- print("The response of AgentTemplatesApi->create_agent_from_template:\n")
101
- pprint(api_response)
102
- except ApiException as e:
103
- print("Exception when calling AgentTemplatesApi->create_agent_from_template: %s\n" % e)
113
+ if __name__ == "__main__":
114
+ main()
104
115
  ```
105
116
 
106
- ### Documentation for API Endpoints
107
-
108
- All URIs are relative to *https://atoms-api.smallest.ai/api/v1*
109
-
110
- Class | Method | HTTP request | Description
111
- ------------ | ------------- | ------------- | -------------
112
- *AgentTemplatesApi* | [**create_agent_from_template**](docs/atoms/AgentTemplatesApi.md#create_agent_from_template) | **POST** /agent/from-template | Create agent from template
113
- *AgentTemplatesApi* | [**get_agent_templates**](docs/atoms/AgentTemplatesApi.md#get_agent_templates) | **GET** /agent/template | Get agent templates
114
- *AgentsApi* | [**create_agent**](docs/atoms/AgentsApi.md#create_agent) | **POST** /agent | Create a new agent
115
- *AgentsApi* | [**delete_agent**](docs/atoms/AgentsApi.md#delete_agent) | **DELETE** /agent/{id} | Delete an agent
116
- *AgentsApi* | [**get_agent_by_id**](docs/atoms/AgentsApi.md#get_agent_by_id) | **GET** /agent/{id} | Get agent by ID
117
- *AgentsApi* | [**get_agents**](docs/atoms/AgentsApi.md#get_agents) | **GET** /agent | Get all agents
118
- *AgentsApi* | [**update_agent**](docs/atoms/AgentsApi.md#update_agent) | **PATCH** /agent/{id} | Update an agent
119
- *CallsApi* | [**start_outbound_call**](docs/atoms/CallsApi.md#start_outbound_call) | **POST** /conversation/outbound | Start an outbound call
120
- *CampaignsApi* | [**create_campaign**](docs/atoms/CampaignsApi.md#create_campaign) | **POST** /campaign | Create a campaign
121
- *CampaignsApi* | [**delete_campaign**](docs/atoms/CampaignsApi.md#delete_campaign) | **DELETE** /campaign/{id} | Delete a campaign
122
- *CampaignsApi* | [**get_campaign_by_id**](docs/atoms/CampaignsApi.md#get_campaign_by_id) | **GET** /campaign/{id} | Get a campaign
123
- *CampaignsApi* | [**get_campaigns**](docs/atoms/CampaignsApi.md#get_campaigns) | **GET** /campaign | Retrieve all campaigns
124
- *CampaignsApi* | [**pause_campaign**](docs/atoms/CampaignsApi.md#pause_campaign) | **POST** /campaign/{id}/pause | Pause a campaign
125
- *CampaignsApi* | [**start_campaign**](docs/atoms/CampaignsApi.md#start_campaign) | **POST** /campaign/{id}/start | Start a campaign
126
- *KnowledgeBaseApi* | [**create_knowledge_base**](docs/atoms/KnowledgeBaseApi.md#create_knowledge_base) | **POST** /knowledgebase | Create a knowledge base
127
- *KnowledgeBaseApi* | [**delete_knowledge_base**](docs/atoms/KnowledgeBaseApi.md#delete_knowledge_base) | **DELETE** /knowledgebase/{id} | Delete a knowledge base
128
- *KnowledgeBaseApi* | [**delete_knowledge_base_item**](docs/atoms/KnowledgeBaseApi.md#delete_knowledge_base_item) | **DELETE** /knowledgebase/{knowledgeBaseId}/items/{knowledgeBaseItemId} | Delete a knowledge base item
129
- *KnowledgeBaseApi* | [**get_knowledge_base_by_id**](docs/atoms/KnowledgeBaseApi.md#get_knowledge_base_by_id) | **GET** /knowledgebase/{id} | Get a knowledge base
130
- *KnowledgeBaseApi* | [**get_knowledge_base_items**](docs/atoms/KnowledgeBaseApi.md#get_knowledge_base_items) | **GET** /knowledgebase/{id}/items | Get all knowledge base items
131
- *KnowledgeBaseApi* | [**get_knowledge_bases**](docs/atoms/KnowledgeBaseApi.md#get_knowledge_bases) | **GET** /knowledgebase | Get all knowledge bases
132
- *KnowledgeBaseApi* | [**upload_media_to_knowledge_base**](docs/atoms/KnowledgeBaseApi.md#upload_media_to_knowledge_base) | **POST** /knowledgebase/{id}/items/upload-media | Upload a media to a knowledge base
133
- *KnowledgeBaseApi* | [**upload_text_to_knowledge_base**](docs/atoms/KnowledgeBaseApi.md#upload_text_to_knowledge_base) | **POST** /knowledgebase/{id}/items/upload-text | Upload a text to a knowledge base
134
- *LogsApi* | [**get_conversation_logs**](docs/atoms/LogsApi.md#get_conversation_logs) | **GET** /conversation/{id} | Get conversation logs
135
- *OrganizationApi* | [**get_organization**](docs/atoms/OrganizationApi.md#get_organization) | **GET** /organization | Get organization details
136
- *UserApi* | [**get_current_user**](docs/atoms/UserApi.md#get_current_user) | **GET** /user | Get user details
137
-
138
- ### Documentation For Models
139
-
140
- - [AgentDTO](docs/atoms/AgentDTO.md)
141
- - [AgentDTOLanguage](docs/atoms/AgentDTOLanguage.md)
142
- - [AgentDTOSynthesizer](docs/atoms/AgentDTOSynthesizer.md)
143
- - [AgentDTOSynthesizerVoiceConfig](docs/atoms/AgentDTOSynthesizerVoiceConfig.md)
144
- - [ApiResponse](docs/atoms/ApiResponse.md)
145
- - [BadRequestErrorResponse](docs/atoms/BadRequestErrorResponse.md)
146
- - [CreateAgentFromTemplate200Response](docs/atoms/CreateAgentFromTemplate200Response.md)
147
- - [CreateAgentFromTemplateRequest](docs/atoms/CreateAgentFromTemplateRequest.md)
148
- - [CreateAgentRequest](docs/atoms/CreateAgentRequest.md)
149
- - [CreateAgentRequestLanguage](docs/atoms/CreateAgentRequestLanguage.md)
150
- - [CreateAgentRequestLanguageSynthesizer](docs/atoms/CreateAgentRequestLanguageSynthesizer.md)
151
- - [CreateAgentRequestLanguageSynthesizerVoiceConfig](docs/atoms/CreateAgentRequestLanguageSynthesizerVoiceConfig.md)
152
- - [CreateCampaign201Response](docs/atoms/CreateCampaign201Response.md)
153
- - [CreateCampaign201ResponseData](docs/atoms/CreateCampaign201ResponseData.md)
154
- - [CreateCampaignRequest](docs/atoms/CreateCampaignRequest.md)
155
- - [CreateKnowledgeBase201Response](docs/atoms/CreateKnowledgeBase201Response.md)
156
- - [CreateKnowledgeBaseRequest](docs/atoms/CreateKnowledgeBaseRequest.md)
157
- - [DeleteAgent200Response](docs/atoms/DeleteAgent200Response.md)
158
- - [GetAgentById200Response](docs/atoms/GetAgentById200Response.md)
159
- - [GetAgentTemplates200Response](docs/atoms/GetAgentTemplates200Response.md)
160
- - [GetAgentTemplates200ResponseDataInner](docs/atoms/GetAgentTemplates200ResponseDataInner.md)
161
- - [GetAgents200Response](docs/atoms/GetAgents200Response.md)
162
- - [GetAgents200ResponseData](docs/atoms/GetAgents200ResponseData.md)
163
- - [GetCampaignById200Response](docs/atoms/GetCampaignById200Response.md)
164
- - [GetCampaignById200ResponseData](docs/atoms/GetCampaignById200ResponseData.md)
165
- - [GetCampaigns200Response](docs/atoms/GetCampaigns200Response.md)
166
- - [GetCampaigns200ResponseDataInner](docs/atoms/GetCampaigns200ResponseDataInner.md)
167
- - [GetCampaigns200ResponseDataInnerAgent](docs/atoms/GetCampaigns200ResponseDataInnerAgent.md)
168
- - [GetCampaigns200ResponseDataInnerAudience](docs/atoms/GetCampaigns200ResponseDataInnerAudience.md)
169
- - [GetCampaignsRequest](docs/atoms/GetCampaignsRequest.md)
170
- - [GetConversationLogs200Response](docs/atoms/GetConversationLogs200Response.md)
171
- - [GetConversationLogs200ResponseData](docs/atoms/GetConversationLogs200ResponseData.md)
172
- - [GetCurrentUser200Response](docs/atoms/GetCurrentUser200Response.md)
173
- - [GetCurrentUser200ResponseData](docs/atoms/GetCurrentUser200ResponseData.md)
174
- - [GetKnowledgeBaseById200Response](docs/atoms/GetKnowledgeBaseById200Response.md)
175
- - [GetKnowledgeBaseItems200Response](docs/atoms/GetKnowledgeBaseItems200Response.md)
176
- - [GetKnowledgeBases200Response](docs/atoms/GetKnowledgeBases200Response.md)
177
- - [GetOrganization200Response](docs/atoms/GetOrganization200Response.md)
178
- - [GetOrganization200ResponseData](docs/atoms/GetOrganization200ResponseData.md)
179
- - [GetOrganization200ResponseDataMembersInner](docs/atoms/GetOrganization200ResponseDataMembersInner.md)
180
- - [GetOrganization200ResponseDataSubscription](docs/atoms/GetOrganization200ResponseDataSubscription.md)
181
- - [InternalServerErrorResponse](docs/atoms/InternalServerErrorResponse.md)
182
- - [KnowledgeBaseDTO](docs/atoms/KnowledgeBaseDTO.md)
183
- - [KnowledgeBaseItemDTO](docs/atoms/KnowledgeBaseItemDTO.md)
184
- - [StartOutboundCall200Response](docs/atoms/StartOutboundCall200Response.md)
185
- - [StartOutboundCall200ResponseData](docs/atoms/StartOutboundCall200ResponseData.md)
186
- - [StartOutboundCallRequest](docs/atoms/StartOutboundCallRequest.md)
187
- - [UnauthorizedErrorReponse](docs/atoms/UnauthorizedErrorReponse.md)
188
- - [UpdateAgent200Response](docs/atoms/UpdateAgent200Response.md)
189
- - [UpdateAgentRequest](docs/atoms/UpdateAgentRequest.md)
190
- - [UpdateAgentRequestLanguage](docs/atoms/UpdateAgentRequestLanguage.md)
191
- - [UpdateAgentRequestSynthesizer](docs/atoms/UpdateAgentRequestSynthesizer.md)
192
- - [UpdateAgentRequestSynthesizerVoiceConfig](docs/atoms/UpdateAgentRequestSynthesizerVoiceConfig.md)
193
- - [UpdateAgentRequestSynthesizerVoiceConfigOneOf](docs/atoms/UpdateAgentRequestSynthesizerVoiceConfigOneOf.md)
194
- - [UpdateAgentRequestSynthesizerVoiceConfigOneOf1](docs/atoms/UpdateAgentRequestSynthesizerVoiceConfigOneOf1.md)
195
- - [UploadTextToKnowledgeBaseRequest](docs/atoms/UploadTextToKnowledgeBaseRequest.md)
196
-
197
- ## Waves Documentation
117
+ ### Placing an outbound call
118
+
119
+ ```python
120
+ from smallestai.atoms import AtomsClient
121
+ from smallestai.atoms import Configuration
122
+
123
+ TARGET_PHONE_NUMBER = "+919666666666"
124
+ MY_AGENT_ID = "67e****ff*ec***82*3c9e**"
125
+
126
+ def main():
127
+ # assumes you have exported API_KEY in SMALLEST_API_KEY environment variable
128
+ atoms_client = AtomsClient()
129
+
130
+ call_response = atoms_client.start_outbound_call(
131
+ start_outbound_call_request={
132
+ "agent_id": MY_AGENT_ID,
133
+ "phone_number": TARGET_PHONE_NUMBER,
134
+ }
135
+ )
136
+ print(f"Successfully placed call with id: {call_response.conversation_id}")
137
+
138
+ if __name__ == "__main__":
139
+ main()
140
+ ```
141
+ ### Providing context to the agent
142
+
143
+ An agent can be attached to a knowledge base, which it can look up during conversations. Here is how you can do it:
144
+
145
+ ```python
146
+ from smallestai.atoms import AtomsClient
147
+
148
+ def main():
149
+ # assumes you have exported API_KEY in SMALLEST_API_KEY environment variable
150
+ atoms_client = AtomsClient()
151
+
152
+ # Create a new knowledge base
153
+ knowledge_base = atoms_client.create_knowledge_base(
154
+ create_knowledge_base_request={
155
+ "name": "Customer Support Knowledge Base",
156
+ "description": "Contains FAQs and product information"
157
+ }
158
+ )
159
+ knowledge_base_id = knowledge_base.data
160
+
161
+ with open("product_manual.pdf", "rb") as f:
162
+ media_content = f.read()
163
+ media_response = atoms_client.upload_media_to_knowledge_base(
164
+ id=knowledge_base_id,
165
+ media=media_content
166
+ )
167
+ print("Added product_manual.pdf to knowledge base")
168
+
169
+ if __name__ == "__main__":
170
+ main()
171
+ ```
172
+
173
+ ### Configuring workflows to drive conversations
174
+
175
+ An agent can be configured with a graph-based workflow to help it drive meaningful conversations. You can explore making one on our [platform](https://atoms.smallest.ai/dashboard/agents). Refer to our [documentation](https://atoms-docs.smallest.ai/deep-dive/workflow/what-is-a-workflow) for learning more extensively.
176
+
177
+ ![image](https://i.imgur.com/kRs53zV.png)
178
+
179
+ ### Provisioning bulk calling using campaigns
180
+
181
+ To manage bulk calls, you can use [Atoms platform](https://atoms.smallest.ai/dashboard/audience) to create [audience](https://atoms-docs.smallest.ai/deep-dive/audience/audience) (collection of contacts) and then configure [campaigns](https://atoms-docs.smallest.ai/deep-dive/campaign/campaign) to run.
182
+
183
+ ## Getting started with Waves
198
184
 
199
185
  ### Best Practices for Input Text
200
186
 
@@ -511,4 +497,4 @@ When implementing audio streaming with chunks of synthesized speech, WAV headers
511
497
  2. Add a single WAV header only when:
512
498
  - Saving the complete stream to a file
513
499
  - Initializing the audio playback system
514
- - Converting the stream to a standard audio format
500
+ - Converting the stream to a standard audio format
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "smallestai"
3
- version = "3.0.0"
3
+ version = "3.0.1"
4
4
  description = "Official Python client for the Smallest AI API"
5
5
  authors = [
6
6
  {name = "Smallest", email = "support@smallest.ai"},
@@ -22,7 +22,8 @@ dependencies = [
22
22
  "urllib3 >= 1.25.3, < 3.0.0",
23
23
  "python-dateutil >= 2.8.2",
24
24
  "pydantic >= 2",
25
- "typing-extensions >= 4.7.1"
25
+ "typing-extensions >= 4.7.1",
26
+ "audioop-lts; python_version >= '3.13'"
26
27
  ]
27
28
 
28
29
  [project.optional-dependencies]
@@ -50,8 +50,8 @@ class AgentDTO(BaseModel):
50
50
  if value is None:
51
51
  return value
52
52
 
53
- if value not in set(['atoms-slm-v1', 'gpt-4o-mini']):
54
- raise ValueError("must be one of enum values ('atoms-slm-v1', 'gpt-4o-mini')")
53
+ if value not in set(['electron-v1', 'electron-v2', 'gpt-4o-mini']):
54
+ raise ValueError("must be one of enum values ('electron-v1', 'electron-v2', 'gpt-4o-mini')")
55
55
  return value
56
56
 
57
57
  model_config = ConfigDict(