Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Dendrite is a suite of tools that makes it easy to create web integrations for AI agents. With Dendrite your can: Authenticate on websites, Interact with elements, Extract structured data, Download and upload files, Fill out forms
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.
pip install dendrite-sdk && dendrite install
Initialize the Dendrite client and start doing web interactions without boilerplate.
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.
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.
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):
...
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
Find more advanced examples in our docs.
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="..."
)
...
FAQs
Dendrite is a suite of tools that makes it easy to create web integrations for AI agents. With Dendrite your can: Authenticate on websites, Interact with elements, Extract structured data, Download and upload files, Fill out forms
We found that dendrite-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.