sha256:4c0bf620def49023d7b728d0a574c0f8286993f56f45f609d900d3c606f433db
Last pushed
2 days by firenoaa
Type
Sandbox Kit
Manifest digest
sha256:4c0bf620def49023d7b728d0a574c0f8286993f56f45f609d900d3c606f433db
schemaVersion: "3"
displayName: Firecrawl (live web access)
author: Firecrawl <[email protected]>
description: 'Adds live web search, scrape and crawl to any sandboxed agent via the firecrawl-py SDK, wired to Firecrawl''s cloud API through the sandbox proxy. Needs a key: sbx secret set firecrawl (the kit holds no key). Layer it onto a shell or agent workload; the SDK is then importable from python3.'
sourceUrl: https://github.com/firecrawl/firecrawl-docker-sandbox
iconUrl: https://raw.githubusercontent.com/firecrawl/firecrawl-docker-sandbox/main/docs/firecrawl-sbx-kit.png
version: 1.0.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 template 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
}
# Debian and Ubuntu mark the 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. pip verifies the wheel against PyPI's hashes,
# so pinning the version pins the content.
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
env:
- HTTP_PROXY
- HTTPS_PROXY
- NO_PROXY
- http_proxy
- https_proxy
- no_proxy
user: "1000"
- type: com.docker.sandbox/agent-context@1
config:
contentFile: /usr/share/sandbox/kit/firecrawl/firecrawl-context.md
args:
sdkVersion:
default: 4.44.0
description: firecrawl-py release to install. Bump the default together with the pin in ../spec.yaml and README.md (kitcheck asserts they agree).
pattern: ^[0-9]+\.[0-9]+\.[0-9]+$
buildArg: SDK_VERSION