Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

External Dependencies Catalog [SPEC]

Document Type: REF (normative) | Referenced by: All PRDs | Last Updated: 2026-03-15

Comprehensive catalog of external dependencies across the Bardo ecosystem. For each dependency: purpose, consuming products, required vs optional status, cost model, alternatives, and self-hostability.

Reader orientation: This document catalogs every external dependency across the Bardo ecosystem, from infrastructure services (Fly.io, Turso, Privy) to blockchain protocols (Uniswap, ERC-8004) to Rust and TypeScript libraries. It belongs to the shared/ reference layer. The key concept is the managed vs self-sovereign spectrum: for each dependency, Bardo provides a hosted path and a self-hostable alternative, so Golem (mortal autonomous agent) operators can choose their trust model. See prd2/shared/glossary.md for full term definitions.


1. Infrastructure Services

ServicePurposeProductsRequired?Cost ModelAlternativesSelf-Hostable?
Fly.ioVM hosting for Bardo Compute (Golem runtimes; Golem = mortal autonomous agent compiled as a single Rust binary). Two-app topology: bardo-control (orchestrator) and bardo-machines (golem VMs).Compute, BottYes (for hosted golems)Pay-per-use VMs. Micro: $0.025/hr, Small: $0.05/hr, Medium: $0.10/hr, Large: $0.20/hrAWS EC2, GCP Compute, Hetzner, self-hosted DockerNo (Fly.io APIs used for machine lifecycle), but golem VMs can run on any Docker host in self-hosted mode
Turso (libSQL)Database for Compute state persistence. TTL tracking, session state, billing records. CAS (compare-and-swap) for TTL enforcement.ComputeYes (for hosted)Free tier (500 databases, 9GB storage, 1B row reads/mo) + usage-basedSQLite (local), Postgres, PlanetScaleYes (libSQL is open source; run your own Turso-compatible server)
Cloudflare R2Object storage for Grimoire snapshots, insurance backups, and golem state exports.Compute, GolemYes (for hosted)Free: 10GB storage, 10M reads/mo. Then $0.015/GB/mo storage, $0.36/M readsAWS S3, GCP Cloud Storage, MinIOYes (MinIO is S3-compatible and self-hostable)
PrivyWallet creation, TEE key management, P-256 session signers, and signing policies. Production wallet provider.All (wallet layer)Recommended (local key fallback for dev)API usage-based. Free tier available.Turnkey, Capsule, Lit Protocol, local key (dev only)No (TEE infrastructure is Privy-managed)
AlchemyRPC provider for Ethereum and L2 chains. Fallback/primary chain access.All (chain access)Optional (public RPCs work but rate-limited)Free tier (300M compute units/mo) + usageInfura, QuickNode, Ankr, public RPCs, self-hosted nodesYes (run your own Ethereum/L2 nodes)
PostHogProduct analytics, funnel tracking, feature flags. HMAC anonymization for privacy.All (telemetry)Optional (disable with BARDO_TELEMETRY=false)Free tier (1M events/mo, 15K session replays/mo) + usagePlausible, Mixpanel, self-hosted PostHogYes (PostHog is open source and self-hostable)

2. Blockchain Dependencies

DependencyPurposeVersion/AddressRequired?ProductsNotes
Uniswap V2Legacy constant product AMM. Read-only pool data and historical analysis.Deployed on Ethereum, BaseYes (read)Sanctum, GolemNo custom contract deployment needed
Uniswap V3Concentrated liquidity AMM. LP management, position tracking, swap routing.Deployed on all 11 chainsYes (read/write)Sanctum, Golem, VaultsPrimary LP protocol for v1
Uniswap V4Hook-based customizable AMM. Singleton architecture. Share pools, dynamic fees.PoolManager: 0x000000000004444c5dc75cB358380D2e3dE08A90Yes (vault hooks)Vaults, SanctumV4-enabled chains: Ethereum, Base, Unichain
UniswapXDutch auction order protocol. MEV-protected swap execution.Deployed on 6 chainsYes (MEV protection)Sanctum, GolemFiller network required
ERC-8004 RegistryAgent identity registration, metadata, reputation attestations.0x8004A818BFB912233c491871b3d84c89A494BD9eYes (identity layer)AllSame address on all deployed chains. Primary: Ethereum, Base
Permit2Batch token approvals and signature-based transfers.0x000000000022D473030F116dDEE9F6B43aC78BA3Yes (transfers)Vaults, SanctumCanonical Uniswap contract
ERC-4337Account abstraction. Smart contract wallets with UserOperations.StandardYes (smart accounts)Wallet, GolemBundlers: Alchemy, Pimlico, Stackup
USDCPayment token for x402 inference, compute billing, vault deposits.Base + EthereumYes (primary unit)AllCircle-issued stablecoin
MorphoLending adapter for vault yield strategies. Supply-side lending.Base deploymentPhase 1 adapterVaults$5.8B TVL as of Feb 2026 [MORPHO-TVL-2026]
Aave V3Lending adapter for vault yield strategies. Supply-side lending.Base deploymentPhase 1 adapterVaultsMajor lending protocol
PendleYield tokenization adapter. Separate principal and yield tokens.Base deploymentPhase 2+ adapterVaultsDeferred track

3. Development Dependencies

DependencyPurposeVersionLicenseNotes
Node.jsRuntime environment>= 20MITLTS releases preferred
pnpmPackage manager with workspace support9.xMITPinned via packageManager field
FoundrySolidity development toolkit (forge, cast, anvil, chisel)LatestMIT/Apache 2.0forge build, forge test, anvil for local chain
tsupTypeScript bundler (ESM + CJS output)8.5.xMITUsed instead of tsdown (rolldown native binding bug with pnpm v9)
vitestTypeScript testing frameworkLatestMITpassWithNoTests: true in all configs
viemTypeScript Ethereum clientLatestMITOnly Ethereum client used (not ethers.js)
ReactUI framework19MITUsed in portal, debug UI, browser SPA
Tailwind CSSUtility-first CSS framework4MITUsed with @bardo/ui component library
Radix UIAccessible React primitivesLatestMITHeadless components for @bardo/ui
OpenZeppelin ContractsAudited Solidity librariesv5.5-5.6MITERC4626Upgradeable, OwnableUpgradeable, PausableUpgradeable
OpenZeppelin Contracts UpgradeableUpgrade-safe Solidity librariesv5.6.1MITERC-7201 namespaced storage
forge-stdFoundry standard test libraryLatestMITTest utilities, cheatcodes
ESLintTypeScript linterLatestMITShared config in @bardo/eslint-config
PrettierCode formatterLatestMITConsistent formatting across packages
zodTypeScript schema validationLatestMITAll tool input schemas, config validation
picocolorsTerminal color outputLatestISCUsed by TUI package
MSWMock Service Worker for API testingLatestMITNetwork-level mocking in tests

4. AI and LLM Dependencies

DependencyPurposeUsed ByRequired?Notes
Anthropic Claude (Haiku/Sonnet/Opus)Primary LLM provider. 3-tier routing.Inference, Golem cognitionYes (primary)Haiku: 95% of calls ($0.80/$4.00 per 1M). Sonnet: 4%. Opus: 1%.
OpenAI (GPT-4, etc.)Secondary LLM provider for multi-provider routing.Inference (optional)OptionalProvides model diversity and failover
Google (Gemini)Tertiary LLM provider for multi-provider routing.Inference (optional)OptionalAdditional model diversity
Golem-RS (self-contained)Rust binary implementing heartbeat FSM, extensions, tool use, JSONL branching. TypeScript Uniswap SDK sidecar over Unix domain socket.Golem runtimeYes (golem core)Built from scratch; see 01-golem/00-overview.md

5. Third-Party Services (Optional)

ServicePurposeProductRequired?Cost ModelAlternatives
MoonPayFiat on-ramp for golem USDC funding. Credit card to crypto.Golem fundingOptionalTransaction-based feesTransak, Wyre, Ramp
LI.FICross-chain bridge aggregator for golem funding from non-Base chains.Golem fundingOptionalBridge fees varySocket, Across, Stargate
step-ca (Smallstep)SSH Certificate Authority for Compute VM access. Short-lived SSH certificates.Compute securityYes (for hosted)Open source (free)OpenSSH CA, HashiCorp Vault
InngestDurable workflow engine for golem provisioning pipeline. Idempotency, resume.Golem provisioningRecommendedFree tier + usageTemporal, custom Inngest-like with Bull/BullMQ
0x APIDEX aggregation for optimal swap routing.Trading toolsOptionalAPI usage (free tier available)1inch API, Paraswap API, on-chain routing only
BasescanContract verification and block explorer for Base mainnet.DeploymentYes (for mainnet)Free (API key for rate limits)Blockscout (self-hostable)
PinataIPFS pinning for AgentCard metadata.Wallet (IPFS mode)Optional (Bardo proxy is default)Free tier (500 pins) + usageInfura IPFS, self-hosted IPFS node
CoinGeckoToken price data for x402-gated queries.Sanctum data toolsOptionalFree tier + Pro planCoinMarketCap, DefiLlama, on-chain oracles

6. Trust Model Impact

Dependencies affect the managed vs self-sovereign spectrum. Self-hosted alternatives are available for most services:

ComponentManaged PathSelf-Sovereign PathTrust Implication
Wallet keysPrivy TEE enclaveLocal viem signerManaged: keys never leave TEE. Self-sovereign: full key control.
ComputeFly.io VMsSelf-hosted DockerManaged: Fly.io has access to VM. Self-sovereign: full isolation.
DatabaseTurso (cloud)Local SQLiteManaged: Turso stores state. Self-sovereign: local data only.
StorageCloudflare R2MinIO (self-hosted)Managed: Cloudflare stores Grimoire. Self-sovereign: local storage.
RPCAlchemy/InfuraSelf-hosted nodeManaged: provider sees queries. Self-sovereign: full privacy.
AnalyticsPostHogDisabled or self-hostedManaged: telemetry sent. Self-sovereign: BARDO_TELEMETRY=false.
IdentityERC-8004 registrySame (on-chain)Both: on-chain data is public and self-sovereign by design.
InferenceBardo Inference gatewayDirect API keysManaged: x402 through gateway. Self-sovereign: bring your own API keys.

Self-hosted golems store no data with Bardo. The self-sovereign path means operators who run their own infrastructure have no off-chain data subject to third-party access.


7. Version Pins and Compatibility

DependencyPinned VersionReason
pnpm9.15.9packageManager field in package.json. Corepack enforced.
tsup8.5.xrolldown native binding bug prevents tsdown with pnpm v9
OpenZeppelin5.5-5.6ERC4626Upgradeable requires v5.5+ for ERC-7201 namespaced storage
Node.js>= 20Required for ESM support, import.meta.url, native fetch
React19Peer dependency for @bardo/ui and @bardo/portal
Tailwind CSS4Major version with new configuration approach
Rust1.94.0Pinned via rust-toolchain.toml in bardo-golem-rs/
alloy0.15.xEVM client for Rust workspace. Not ethers-rs.
ratatui0.29.xTerminal UI for Golem dashboard and bardo-terminal binary

8. Rust Workspace Dependencies (bardo-golem-rs)

The Golem runtime is a separate Rust workspace (bardo-golem-rs/). These are workspace-level dependency declarations in the root Cargo.toml; individual crates inherit versions via dep.workspace = true. See prd2/17-monorepo/01-rust-workspace.md for the full workspace structure and crate DAG.

Runtime

DependencyVersionLicensePurpose
tokio1.xMITAsync runtime. Features: rt-multi-thread, macros, signal. Foundation for all I/O.
axum0.8.xMITHTTP server for REST API, WebSocket endpoints, and health checks in gateway + Styx.
reqwest0.12.xMIT/ApacheHTTP client for inference providers (Anthropic, OpenAI, Google, Venice, Grok) and APIs.
tokio-tungsteniteLatestMITWebSocket client for Clade sync and Styx coordination layer.

EVM / On-Chain

DependencyVersionLicensePurpose
alloy0.15.xMITEVM interaction: RPC client, transaction building, ABI encoding via sol!, receipt parsing. Not ethers-rs. Features: providers, signers, sol-types.

Storage

DependencyVersionLicensePurpose
sqlx0.8.xMIT/ApacheSQLite async driver for Grimoire structured storage (episodes, insights, heuristics).
lancedb0.15.xApache 2.0Columnar vector database for episodic memory. Stores episode embeddings locally.
qdrant-client1.xApache 2.0Vector database client for Grimoire semantic search against hosted Qdrant instance.

Serialization

DependencyVersionLicensePurpose
serde1.xMIT/ApacheDerive macros for serialization. Used on every data type crossing crate boundaries.
serde_json1.xMIT/ApacheJSON serialization for API payloads, Pi tool results, and GolemSnapshot exports.
toml0.8.xMIT/ApacheTOML parsing for golem.toml operator config and archetype TOML files.

Observability

DependencyVersionLicensePurpose
tracing0.1.xMITStructured logging and async-aware instrumentation across all crates.
tracing-subscriber0.3.xMITLog formatting (JSON or pretty), filtering by crate, OTLP export for telemetry.

Error Handling

DependencyVersionLicensePurpose
thiserror2.xMIT/ApacheTyped error enums for library crates (golem-core, golem-grimoire, etc.).
anyhow1.xMIT/ApacheError propagation in application crates (golem-binary, apps/). Context chain on ?.

Terminal UI

DependencyVersionLicensePurpose
ratatui0.29.xMITTerminal UI framework for the Golem dashboard (golem-surfaces crate) and bardo-terminal binary.
crosstermLatestMITCross-platform terminal backend for ratatui. Keyboard input, raw mode, cursor control.

CLI

DependencyVersionLicensePurpose
clap4.xMIT/ApacheCLI argument parsing for golem-binary and apps/.

Utility

DependencyVersionLicensePurpose
rand0.9.xMIT/ApacheStochastic mortality PRNG, dream element selection. Seeded with BARDO_STOCHASTIC_SEED in tests.
chrono0.4.xMIT/ApacheTimestamp handling for dream windows, sync scheduling, and TTL tracking.
dashmap6.xMITConcurrent hash map for connection registries (Styx WebSocket connections).
uuid1.xMIT/ApacheUUID generation for episode IDs, permit IDs, and golem instance identifiers.

Dev / Test Only

DependencyVersionLicensePurpose
proptest1.xMITProperty-based testing for numerical code: mortality calculations, vitality scoring, credit partitions.
instaLatestMITSnapshot testing for serialized output (GolemSnapshot, ContextBundle, tool results).
wiremockLatestMITHTTP mock server for inference provider tests (Anthropic, OpenAI, Venice, Grok responses).
mockallLatestMITTrait mocking for unit tests that need to isolate crate boundaries.

Build Tooling (Cargo Plugins)

ToolInstallPurpose
cargo-nextestcargo install cargo-nextestParallel test runner. Each test runs in an isolated process.
cargo-llvm-covcargo install cargo-llvm-covSource-based coverage reports. Minimum 60% per crate enforced in CI.
cargo-denycargo install cargo-denyLicense compliance (allowlist: MIT, Apache-2.0, BSD-*) and advisory scan (RustSec).
cargo-hakaricargo install cargo-hakariFeature unification across workspace. Generates workspace-hack crate.
cargo-chefcargo install cargo-chefDocker layer caching. Separates dependency compilation from source compilation.
cargo-vetcargo install cargo-vetSupply chain auditing. New deps require cargo vet certify entry.
sccachecargo install sccacheCompiler caching. Shared across local builds and CI (S3-backed bucket).
baconcargo install baconBackground clippy watcher. Runs checks on file save.
justcargo install justTask runner. Replaces Makefile. justfile at workspace root.
lefthooknpm install -g lefthookPre-commit hooks: cargo fmt --check, cargo clippy, cargo deny advisories.