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

# Cerebras OpenAI OSS GPT

> Use gpt-oss-120b on the Cerebras OpenAI-compatible endpoint with WebSearchTools.

```python oss_gpt.py theme={null}
"""
Cerebras Openai Oss Gpt
=======================

Cookbook example for `cerebras_openai/oss_gpt.py`.
"""

from agno.agent.agent import Agent
from agno.models.cerebras.cerebras_openai import CerebrasOpenAI
from agno.tools.websearch import WebSearchTools

# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------

agent = Agent(
    model=CerebrasOpenAI(
        id="gpt-oss-120b",
    ),
    tools=[WebSearchTools()],
    markdown=True,
)

# Print the response in the terminal
agent.print_response("Whats happening in France?")

# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------

if __name__ == "__main__":
    pass
```

## Run the Example

<Steps>
  <Snippet file="create-venv-step.mdx" />

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U agno cerebras-cloud-sdk ddgs openai
    ```
  </Step>

  <Step title="Export your Cerebras OpenAI-compatible API key">
    <CodeGroup>
      ```bash Mac/Linux theme={null}
      export CEREBRAS_API_KEY="your_cerebras_api_key_here"
      ```

      ```bash Windows theme={null}
      $Env:CEREBRAS_API_KEY="your_cerebras_api_key_here"
      ```
    </CodeGroup>
  </Step>

  <Step title="Run the example">
    Save the code above as `oss_gpt.py`, then run:

    ```bash theme={null}
    python oss_gpt.py
    ```
  </Step>
</Steps>

Full source: [cookbook/90\_models/cerebras\_openai/oss\_gpt.py](https://github.com/agno-agi/agno/blob/main/cookbook/90_models/cerebras_openai/oss_gpt.py)
