#Do I need to register system tools as well through the SDK?
1 messages · Page 1 of 1 (latest)
I don’t have information on whether system tools need to be registered through the SDK. Could you clarify or provide more details about your question?
The docs say if I am creating an agent through the SDK I need to add end_call as a system tool myself while doing so. Do I need to register it while starting the conversation just like client tools or no?
Yes, when creating an agent through the SDK, you need to add the end_call system tool yourself. However, system tools like end_call do not need to be registered in the same way as client tools during the conversation setup. System tools are predefined functionalities that the agent can use directly without requiring explicit registration at the start of the conversation.
Client tools, on the other hand, need to be registered explicitly as part of the conversation setup since they are custom tools designed for specific use cases.
So if I were to create and agent like this and call it, should it be able to hang up or not:
def create_agent():
end_call_tool = {
"type": "system",
"name": "end_call",
"description": "End the call",
"params": {
"end_call": {
"system_tool_type": "end_call"
}
}
}
conversatiopn_config = ConversationalConfig(
agent=AgentConfig(
first_message="Hello, how can I help you today?",
prompt=PromptAgent(
tools=[end_call_tool]
)
)
)
agent = client.conversational_ai.create_agent(
conversation_config=conversatiopn_config
)
return agent
When creating an agent using the SDK, you need to ensure that the end_call tool is properly configured as part of the agent's setup. In your code snippet, you have defined the end_call tool as a system tool within the agent's configuration. This should allow the agent to end the call when necessary.
However, it's important to note that the agent won't automatically hang up the call. The end_call tool provides the capability, but you will need to implement logic to trigger this tool based on your specific requirements, such as detecting certain keywords or conditions during the conversation.
If you have further questions or need more details on implementing this, feel free to ask!
Give me an example