> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trysiren.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Python

> Integrate Siren with Python-based AI agents using our SDK

# Python Integration for AI Agents

## Requirements

* A Siren API key (get one from [Siren Dashboard](https://app.trysiren.io))

## Installation

```bash theme={null}
pip install siren-agent-toolkit
```

For local development:

```bash theme={null}
# From the python/ directory
pip install -e .
```

## Usage

### Basic Example

```python theme={null}
from siren_agent_toolkit.api import SirenAPI

# Initialize with your API key
api = SirenAPI(api_key="YOUR_API_KEY")

# Send a simple email message
result = api.run("send_message", {
    "recipient_value": "user@example.com",
    "channel": "EMAIL",
    "subject": "Important Update",
    "body": "Hello from Siren! This is an important notification."
})
print(result)
```

## Examples

Complete working examples are available in the `examples/` directory:

* `examples/langchain/main.py` — Using Siren tools with LangChain
* `examples/openai/main.py` — Using Siren tools with OpenAI
* `examples/crewai/main.py` — Using Siren tools with CrewAI

## Development

### Configuration

The toolkit supports flexible configuration options:

```python theme={null}
from siren_agent_toolkit.api import SirenAPI

api = SirenAPI(
    api_key="YOUR_API_KEY",
    context={"env": "production"}  # Optional environment configuration
)
```

### Building Locally

```bash theme={null}
# From the python/ directory
pip install -e .
# Install development dependencies
pip install -r requirements.txt
```

### Running Tests

```bash theme={null}
pytest tests/
```

## License

[MIT](https://github.com/trysiren/agent-toolkit/blob/main/LICENSE)
