***

title: math
slug: /reference/python/agents/skills/math
description: Perform mathematical calculations using a secure expression evaluator.
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

Perform mathematical calculations using a secure expression evaluator. Supports basic
arithmetic, common functions (`sqrt`, `sin`, `cos`, `log`, `abs`, `round`), and constants
(`pi`, `e`).

**Tools:** `calculate`

**Requirements:** None

No custom parameters. This skill inherits only the base parameters.

```python
from signalwire import AgentBase

class MyAgent(AgentBase):
    def __init__(self):
        super().__init__(name="assistant", route="/assistant")
        self.set_prompt_text("You are a helpful assistant.")
        self.add_skill("math")

agent = MyAgent()
agent.serve()
```