Sign inSign up

sbx/firecrawl:latest

Multi-platform
Manifest digest

sha256:99bc7b6e10e041ac200fa8f20b2c5e5e69f3768aea52ab89284ee8fc9d2124b3

Last pushed

about 4 hours by sbx

Type

Sandbox Kit

Manifest digest

sha256:99bc7b6e10e041ac200fa8f20b2c5e5e69f3768aea52ab89284ee8fc9d2124b3

yaml
schemaVersion: "3"
displayName: Firecrawl (live web access)
description: 'Adds live web search/scrape/crawl to any agent via the firecrawl-py SDK, wired to Firecrawl''s cloud API. Needs a key: `sbx secret set -g firecrawl` (the kit holds no key).'
sourceUrl: https://github.com/firecrawl/firecrawl-docker-sandbox
version: 4.44.0
licenses:
    - Apache-2.0
kind: mixin
provides:
    - [email protected]
capabilities:
    - type: com.docker.sandbox/network-policy@1
      config:
        install:
            allow:
                - pypi.org
                - files.pythonhosted.org
        runtime:
            allow:
                - api.firecrawl.dev
    - type: com.docker.sandbox/credential@1
      config:
        apiKey:
            inject:
                - domain: api.firecrawl.dev
                  format: Bearer %s
                  header: Authorization
            name: FIRECRAWL_API_KEY
            proxyManaged: true
        phase: runtime
        service: firecrawl
      description: Firecrawl API key (fc-...) from https://www.firecrawl.dev/app/api-keys
    - type: com.docker.sandbox/lifecycle@1
      config:
        install:
            - command: |
                set -eu
                SDK_VERSION=4.44.0

                command -v python3 >/dev/null 2>&1 || {
                  echo "firecrawl kit: python3 not found. Every docker/sandbox-templates image ships python3 and python3-pip; on a custom base image, install them before layering this kit." >&2
                  exit 1
                }
                python3 -m pip --version >/dev/null 2>&1 || {
                  echo "firecrawl kit: python3 is present but has no pip module. Install python3-pip on the base image." >&2
                  exit 1
                }

                # Ubuntu marks its system Python externally managed (PEP 668), so a
                # --user install needs --break-system-packages there. Retry without
                # it for images whose pip predates 23.0 and rejects the flag.
                install_sdk() {
                  python3 -m pip install --user --no-cache-dir --disable-pip-version-check "$@" "firecrawl-py==${SDK_VERSION}"
                }
                install_sdk --break-system-packages || install_sdk

                python3 -c "
                import firecrawl, importlib.metadata as m
                got = m.version('firecrawl-py')
                assert got == '${SDK_VERSION}', 'expected ${SDK_VERSION}, got ' + got
                print('firecrawl-py', got, 'installed at', firecrawl.__file__)
                "
              description: Install the Firecrawl Python SDK (firecrawl-py) as the agent user
              user: "1000"
    - type: com.docker.sandbox/agent-context@1
      config:
        contentFile: /usr/share/sandbox/kit/firecrawl/firecrawl-context.md
args:
    version:
        default: 4.44.0
        description: firecrawl-py release to install
        pattern: ^[0-9]+\.[0-9]+\.[0-9]+$
        buildArg: FIRECRAWL_SDK_VERSION