Interactions
Interacting and performing actions on websites
Interaction basics
Dendrite enables easy web based actions for AI agents. With the Dendrite browser, you can create workflows that match the way a human would act in a browser, using intuitive tools like click
and fill
, all with natural language.
Here are the core methods used when interacting with web pages through the Dendrite browser:
click
for clicking on the described elementfill
for filling a field with some valuefill_fields
for filling multiple fields in a formpress
for simulating a keypress
Creating Interactions
When creating a web interaction function for your AI agent, we recommend doing the action manually in your own browser first and breaking it down in steps. For example:
- Navigating to mail.google.com (and making sure you’re signed in)
- Clicking on the button for creating new email
- Entering the recipient email
- Writing the subject line
- Writing the email content
- Pressing the send button
These steps will inform how you can instruct your agent to follow the same steps on any website.
Writing code
The next step is to write the code. The example above would translate to something like this:
In the above example, we create the send_email
function that takes in to
, subject
and message
as arguments. This tool would then be passed on to an agent to be used by its function calling abilities.
The tool uses the Dendrite browser to perform the actions in the browser, just like a human would. This gives you infinite flexibility to modify your agent’s behaviour, without being limited by traditional REST APIs.