Download the PHP package browserbase/stagehand without Composer

On this page you can find all versions of the php package browserbase/stagehand. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package stagehand

The AI Browser Automation Framework

MIT License Discord Community

browserbase%2Fstagehand | Trendshift

If you're looking for other languages, you can find them here

Vibe code Stagehand with Director Director
## What is Stagehand? Stagehand is a browser automation framework used to control web browsers with natural language and code. By combining the power of AI with the precision of code, Stagehand makes web automation flexible, maintainable, and actually reliable. ## Why Stagehand? Most existing browser automation tools either require you to write low-level code in a framework like Selenium, Playwright, or Puppeteer, or use high-level agents that can be unpredictable in production. By letting developers choose what to write in code vs. natural language (and bridging the gap between the two) Stagehand is the natural choice for browser automations in production. 1. **Choose when to write code vs. natural language**: use AI when you want to navigate unfamiliar pages, and use code when you know exactly what you want to do. 2. **Go from AI-driven to repeatable workflows**: Stagehand lets you preview AI actions before running them, and also helps you easily cache repeatable actions to save time and tokens. 3. **Write once, run forever**: Stagehand's auto-caching combined with self-healing remembers previous actions, runs without LLM inference, and knows when to involve AI whenever the website changes and your automation breaks. # Stagehand PHP API library The Stagehand PHP library provides convenient access to the Stagehand REST API from any PHP 8.1.0+ application. It is generated with [Stainless](https://www.stainless.com/). ## Documentation The REST API documentation can be found on [docs.stagehand.dev](https://docs.stagehand.dev). ## Installation ## Usage This library uses named parameters to specify optional arguments. Parameters with a default value must be set by name. Here's a comprehensive example demonstrating the full workflow: start session, navigate, observe, act, extract, execute agent, and end session. ### Running the Example Set the environment variables and run the example script: ### Value Objects It is recommended to use the static `with` constructor `Action::with(description: 'Click the submit button', ...)` and named parameters to initialize value objects. However, builders are also provided `(new Action)->withDescription('Click the submit button')`. ### Streaming We provide support for streaming responses using Server-Sent Events (SSE). Streaming requests are dispatched through a separate `streamingTransporter` PSR-18 HTTP client. When unset, the SDK uses the configured `transporter`. Some PSR-18 HTTP clients will by default try to read the entire response, so you may need to specify a streaming capable implementation. ### Handling errors When the library is unable to connect to the API, or if the API returns a non-success status code (i.e., 4xx or 5xx response), a subclass of `Stagehand\Core\Exceptions\APIException` will be thrown: Error codes are as follows: | Cause | Error Type | | ---------------- | ------------------------------ | | HTTP 400 | `BadRequestException` | | HTTP 401 | `AuthenticationException` | | HTTP 403 | `PermissionDeniedException` | | HTTP 404 | `NotFoundException` | | HTTP 409 | `ConflictException` | | HTTP 422 | `UnprocessableEntityException` | | HTTP 429 | `RateLimitException` | | HTTP >= 500 | `InternalServerException` | | Other HTTP error | `APIStatusException` | | Timeout | `APITimeoutException` | | Network error | `APIConnectionException` | ### Retries Certain errors will be automatically retried 2 times by default, with a short exponential backoff. Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict, 429 Rate Limit, >=500 Internal errors, and timeouts will all be retried by default. You can use the `maxRetries` option to configure or disable this: ## Advanced concepts ### Making custom or undocumented requests #### Undocumented properties You can send undocumented parameters to any endpoint, and read undocumented response properties, like so: Note: the `extra*` parameters of the same name overrides the documented parameters. #### Undocumented request params If you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` under the `request_options:` parameter when making a request, as seen in the examples above. #### Undocumented endpoints To make requests to undocumented endpoints while retaining the benefit of auth, retries, and so on, you can make requests using `client.request`, like so: ## Versioning This package follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions. As the library is in initial development and has a major version of `0`, APIs may change at any time. This package considers improvements to the (non-runtime) PHPDoc type definitions to be non-breaking changes. ## Requirements PHP 8.1.0 or higher. ## Contributing See [the contributing documentation](https://github.com/browserbase/stagehand-php/tree/main/CONTRIBUTING.md).

All versions of stagehand with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
php-http/discovery Version ^1
psr/http-client Version ^1
psr/http-client-implementation Version ^1
psr/http-factory-implementation Version ^1
psr/http-message Version ^1|^2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package browserbase/stagehand contains the following files

Loading the files please wait ...