@hdr/browser is open source

March 8, 2024

@hdr/browser is open source

Image generated by the Lenia cellular automaton.

We're pleased to announce that we've open sourced our browser automation framework, @hdr/browser, on GitHub under the MIT license.

As we work on our collective memory infrastructure, we felt a framework that could showcase memory integration as a core feature while still being primarily objective-driven and agent-specific had many benefits: for one thing, you can run it directly:

npx @hdr/browser --agentProvider [provider] --agentModel [model]

This command alone will procure Chrome and get to work. If you don't specify an objective and a place on the internet to start browsing, it will ask you for them.

For more complex applications, we recommend importing the framework as a module. We have included an example of using our browser to dictate an expected typed response from an agentic task, defining the type ourselves and structuring the data, which you can find here.

In general, the @hdr/browser module exports several classes that are expected to be constructed together, but can be modified at each level:

  • the Agent class, which expects a chat completion API;
  • the Browser class, which procures the browser locally;
  • the Logger class, which defines the log level of the session;
  • the AgentBrowser class, which takes in the preceding classes and is called with an objective.

For more documentation, you can see the README for an example.

We hope that this release helps encourage more people to build small LLM applications for everyday tasks and, as we continue to build out our collective memory, that developers at any stage can use smaller, simpler, even local models to build agents without an expensive training process.

For developers preferring a consolidated product, we still offer our Browser API endpoints that merge Collective Memory with our browser infrastructure.