Installation

Install the Dendrite SDK. We also need to run dendrite install to install the browser drivers.

With pip:

pip install dendrite && dendrite install 

With poetry:

poetry add dendrite && poetry run dendrite install 

Hello world

For our first Dendrite script, let’s start the Dendrite browser, go to google.com and enter “hello world” into the search field.

We also need to specify the API keys to the LLM providers which default to using Anthropic:

ANTHROPIC_API_KEY=...
main.py
import asyncio
from dendrite import Dendrite

def hello_world():
  # Initate the Dendrite browser
  browser = Dendrite()

  # Navigate with the `goto` method
  browser.goto("https://google.com")

  # Populate the search field
  browser.fill("Search input field","hello world")

hello_world()

Simple Examples and Concepts