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

# autogen.agentchat.contrib.math_user_proxy_agent.WolframAlphaAPIWrapper

<h2 id="autogen.agentchat.contrib.math_user_proxy_agent.WolframAlphaAPIWrapper" class="doc doc-heading">
  <code class="doc-symbol doc-symbol-heading doc-symbol-class" />

  <span class="doc doc-object-name doc-class-name">WolframAlphaAPIWrapper</span>
</h2>

```python theme={null}
WolframAlphaAPIWrapper(**data: Any)
```

Wrapper for Wolfram Alpha.<br />Docs for using: <br />1. Go to wolfram alpha and sign up for a developer account
2\. Create an app and get your APP ID
3\. Save your APP ID into WOLFRAM\_ALPHA\_APPID env variable
4\. pip install wolframalpha

Create a new model by parsing and validating input data from keyword arguments.<br />Raises \[`ValidationError`]\[pydantic\_core.ValidationError] if the input data cannot be
validated to form a valid model.<br />`self` is explicitly positional-only to allow `self` as a field name.

<b>Parameters:</b>

| Name     | Description   |
| -------- | ------------- |
| `**data` | **Type:** Any |

### Class Attributes

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### model\_config

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### wolfram\_alpha\_appid

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### wolfram\_client

<br />

:meta private:

### Static Methods

<code class="doc-symbol doc-symbol-heading doc-symbol-method" />

#### validate\_environment

```python theme={null}
validate_environment(cls, values: dict) -> dict
```

Validate that api key and python package exists in environment.

<b>Parameters:</b>

| Name     | Description    |
| -------- | -------------- |
| `cls`    |                |
| `values` | **Type:** dict |

<br />

### Instance Methods

<code class="doc-symbol doc-symbol-heading doc-symbol-method" />

#### run

```python theme={null}
run(self, query: str) -> tuple[str, bool]
```

Run query through WolframAlpha and parse result.

<b>Parameters:</b>

| Name    | Description   |
| ------- | ------------- |
| `query` | **Type:** str |

<br />
