Skip to main content
Tools are functions that your agent can execute during a conversation. You can define tools to interact with external services, databases, or any other APIs.

Decorators

The Conversimple SDK provides two decorators for registering tools:
  • @tool: For synchronous functions.
  • @tool_async: For asynchronous (async/await) functions.
Here is an example of a class with both a sync and an async tool:

Type Hinting

The SDK automatically generates a JSON schema for your tools based on Python type hints. This allows the Conversimple platform to understand the parameters your tools expect. The following types are supported:
  • str
  • int
  • float
  • bool
  • list
  • dict
  • Optional[T]