Bridge does not expose a public HTTP API today. The primary interface is the
bridge CLI, which returns structured JSON on stdout and structured errors on stderr.What counts as the Bridge API today
Bridge is programmable, but the integration surface is local and CLI-first. The Bridge API is best understood as:- A CLI command surface
- A JSON output contract
- A provider model defined in
bridge.yaml
Command surface at a glance
Bridge currently exposes these user-facing commands:| Command | Purpose |
|---|---|
bridge init | Create a bridge.yaml file |
bridge connect <target> --as <name> [--type <provider>] | Add a provider connection |
bridge remove <name> | Remove a provider |
bridge status | Show health for configured providers |
bridge ls --from <name> | List files, directories, tables, or other entries |
bridge read <path> --from <name> [--limit <n>] | Read structured context from a provider. For whole-table Postgres reads, --limit controls the row cap and falls back to 100 when omitted. |
Output contract
Bridge is designed for agents, so successful commands return JSON on stdout and failures return JSON on stderr.Successful output
The most important response shape in Bridge is the result ofbridge read. It returns a ContextValue object with:
datametadata
data.type field is one of:
textjsonbinary
Other successful responses
bridge lsreturns an array of entriesbridge statusreturns aprovidersmap keyed by provider namebridge init,bridge connect, andbridge removereturn small JSON status objects
Errors
Bridge uses a consistent error envelope:config_not_foundprovider_not_foundprovider_errorinvalid_urienv_var_not_settimeout
Provider model
Bridge resolves data through named providers inbridge.yaml.
At a high level:
- you define a provider in
bridge.yaml - you choose a short name such as
filesordb - you pass that name to
--from - Bridge routes the command to the right backend
- a filesystem provider
- a Postgres provider
bridge.yaml model, and Providers for the exact runtime behavior of each backend.
Authentication and access
Bridge does not have a global bearer-token authentication layer today because it is a local CLI, not a hosted API service. Access is currently controlled by the underlying provider:- filesystem access comes from the local machine and configured root path
- database access comes from the connection URI and credentials you provide
- secrets can be loaded through environment variables such as
${DATABASE_URL}
bridge connect DATABASE_URL --type postgres --as db writes ${DATABASE_URL} into bridge.yaml, and Bridge resolves the real value at runtime from the process environment.
How to use this section
If you are trying to:- learn the commands themselves, go to Commands
- understand
bridge.yaml, go to Configuration - understand filesystem or Postgres behavior, go to Providers
- understand how Bridge relates to MCP and A2A, go to Bridge, MCP, and A2A
What comes next
Bridge Cloud is the future hosted layer. The long-term direction is to let you publish permissioned context slices and grant access across agents, teams, and organizations without moving your underlying data into a separate storage system. Until that ships, the Bridge API is the CLI itself.Related pages
Commands
See the full CLI reference, including flags, examples, errors, and shell completions.
Configuration
Learn how provider names, URIs, and environment variable expansion work in
bridge.yaml.Providers
See what
filesystem and postgres return for ls, read, and status.Security and errors
Understand Bridge’s current guardrails, timeout behavior, and machine-readable failure model.
Bridge, MCP, and A2A
See where Bridge fits in the broader agent stack and how it complements MCP and A2A.