from syllable_sdk import SyllableSDK
from syllable_sdk.models import AgentCreate, AgentSttProvider, AgentWaitSound
sdk = SyllableSDK(
api_key_header='your_key_here'
)
agent = sdk.agents.create(request=AgentCreate(
# The name of the agent is used to reference it elsewhere in the system, so
# you should pick something easily identifiable.
name='Tutorial Weather Agent',
# The description is displayed for extra context on the agent list screen in
# the Syllable Console.
description='An agent that can answer questions about the weather',
# The type of the agent. Should just be hardcoded to `ca_v1` for now.
type='ca_v1',
# If you lost the ID of the prompt you created earlier, you can use the
# prompts.list function to find it.
prompt_id=your_prompt_id_here,
# If you lost the ID of the message you created earlier, you can use the
# custom_messages.list function to find it.
custom_message_id=your_message_id_here,
timezone='America/Los_Angeles',
sttProvider=AgentSttProvider.GOOGLE_STT_V2,
wait_sound=AgentWaitSound.KEYBOARD_1,
# You can use the tool_headers field to set headers that should be used for
# the agent's tool calls. You can skip this for the tutorial.
tool_headers=None,
# You can use the variables field to set agent-level session variables (see
# https://docs.syllable.ai/workspaces/Agents#session-configuration for how to
# do this in Console). You can skip this for the tutorial.
variables={}
))
print(agent)