Skip to main content

Website Documentation Discord

What is Dendrite?

Dendrite is a devtool that makes it easy for AI agents to:

  • 🔓 Authenticate on websites
  • 👆🏼 Interact with elements
  • 💿 Extract structured data
  • ↕️ Download/upload files
  • 🚫 Browse without getting blocked

A simple outlook integration

With Dendrite, it's easy to create web interaction tools for your agent.

from dendrite_sdk import Dendrite

def send_email():
    client = Dendrite(auth="outlook.live.com")

    # Navigate
    client.goto(
        "https://outlook.live.com/mail/0/",
        expected_page="An email inbox"
    )

    # Create new email and populate fields
    client.click("The new email button")
    client.fill_fields({
        "Recipient": to,
        "Subject": subject,
        "Message": message
    })

    # Send email
    client.click("The send button")

To authenticate you'll need to use our Chrome Extension Dendrite Vault, you can download it here. Read more about authentication in our docs.

Quickstart

pip install dendrite-sdk && dendrite install

Simple navigation and interaction

Initialize the Dendrite client and start doing web interactions without boilerplate.

Get your API key here

from dendrite_sdk import Dendrite

client = Dendrite(dendrite_api_key="sk...")

client.goto("https://google.com")
client.fill("Search field", "Hello world")
client.press("Enter")

In the example above, we simply go to Google, populate the search field with "Hello world" and simulate a keypress on Enter. It's a simple example that starts to explore the endless possibilities with Dendrite. Now you can create tools for your agents that have access to the full web without depending on APIs.

More powerful examples

Now, let's have some fun. Earlier we showed you a simple send_email example. And sending emails is cool, but if that's all our agent can do it kind of sucks. So let's create two cooler examples.

Download Bank Transactions

First up, a tool that allows our AI agent to download our bank's monthly transactions so that they can be analyzed and compiled into a report that can be sent to stakeholders with send_email.

from dendrite_sdk import Dendrite

def get_transactions() -> str:
    client = Dendrite(auth="mercury.com")

    # Navigate and wait for loading
    client.goto(
      "https://app.mercury.com/transactions",
      expected_page="Dashboard with transactions"
    )
    client.wait_for("The transactions to finish loading")

    # Modify filters
    client.click("The 'add filter' button")
    client.click("The 'show transactions for' dropdown")
    client.click("The 'this month' option")

    # Download file
    client.click("The 'export filtered' button")
    transactions = client.get_download()

    # Save file locally
    path = "files/transactions.xlsx"
    transactions.save_as(path)

    return path

def analyze_transactions(path: str):
    ...

Extract Google Analytics

Finally, it would be cool if we could add the amount of monthly visitors from Google Analytics to our report. We can do that by using the extract function:

def get_visitor_count() -> int:
    client = Dendrite(auth="analytics.google.com")

    client.goto(
      "https://analytics.google.com/analytics/web",
      expected_page="Google Analytics dashboard"
    )

    # The Dendrite extract agent will create a web script that is cached
    # and reused. It will self-heal when the website updates
    visitor_count = client.extract("The amount of visitors this month", int)
    return visitor_count

Documentation

Read the full docs here

Find more advanced examples in our docs.

Remote Browsers

When you want to scale up your AI agents, we support using browsers hosted by Browserbase. This way you can run many agents in parallel without having to worry about the infrastructure.

To start using Browserbase just swap out the Dendrite class with DendriteRemoteBrowser and add your Browserbase API key and project id, either in the code or in a .env file like this:

# ... previous keys
BROWSERBASE_API_KEY=
BROWSERBASE_PROJECT_ID=
# from dendrite_sdk import Dendrite
from dendrite_sdk import DendriteRemoteBrowser

...

# client = Dendrite(...)
client = DendriteRemoteBrowser(
    # Use interchangeably with the Dendrite class
    browserbase_api_key="...", # or specify the browsebase keys in the .env file
    browserbase_project_id="..."
)

...

Metadata

Release files for dendrite-sdk 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dendrite-sdk 0.2.2
File Size Uploaded Provenance Actions
dendrite_sdk-0.2.2.tar.gz 67.0 kB Without provenance Details for dendrite_sdk-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dendrite-sdk 0.2.2
File Interpreter ABI Platform Actions
dendrite_sdk-0.2.2-py3-none-any.whl Python 3 none any Details for dendrite_sdk-0.2.2-py3-none-any.whl

Total release size: 182.2 kB

Release files / dendrite_sdk-0.2.2.tar.gz

Download URL dendrite_sdk-0.2.2.tar.gz
Size 67.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d232051e7b05b8bf5af0eb0a0f7371448e3352983dabc0479d3e228333c23d5d
BLAKE2b-256 checksum
How to use checksums
30a0473c1f2eb9eddbaf8cc665a9b7fb2c4af3aac8aab28406a5d1314c42804f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / dendrite_sdk-0.2.2-py3-none-any.whl

Download URL dendrite_sdk-0.2.2-py3-none-any.whl
Size 115.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7ec5b11b99bb64e2f51c5243228f69cf4678b4cdc1a127d67ee50cc3251e79ad
BLAKE2b-256 checksum
How to use checksums
df884fce2e5aac79b5be68a0019749f353dda67c39e5e54783fe56d763cfcc7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Security for dendrite-sdk 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page