***

title: setup
slug: /reference/python/agents/skill-base/setup
description: Initialize the skill and validate dependencies.
max-toc-depth: 3
---------------------

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

[ref-skillbase]: /docs/server-sdks/reference/python/agents/skill-base

Initialize the skill: validate environment variables, check packages, initialize
API clients, and prepare resources. Called once when the skill is loaded.

This is an abstract method -- you **must** implement it in every [SkillBase][ref-skillbase] subclass.

## **Returns**

`bool` -- `True` if setup succeeded, `False` to indicate the skill should not
be loaded.

## **Example**

```python {10}
import os
from signalwire.core.skill_base import SkillBase

class WeatherSkill(SkillBase):
    SKILL_NAME = "weather"
    SKILL_DESCRIPTION = "Provides weather information"
    REQUIRED_PACKAGES = ["requests"]
    REQUIRED_ENV_VARS = ["WEATHER_API_KEY"]

    def setup(self) -> bool:
        if not self.validate_packages():
            return False
        if not self.validate_env_vars():
            return False
        self.api_key = os.getenv("WEATHER_API_KEY")
        return True

    def register_tools(self):
        pass  # See register_tools page
```