Skip to content

SDK API reference ​

Every exported constant, variable, function and type of every package in the published bide modules, with its declaration and the first sentence of its doc comment. It is generated from the Go sources, so it cannot drift from them; the full documentation of a symbol is its doc comment, on pkg.go.dev or in the source. The ports and how to implement them are in extension points; the module layout is in module structure.

Packages are listed for linux/amd64 with cgo enabled. Packages under internal/, the bide and bide-hsm programs, the examples and the repo-only test modules are not part of the API and are not listed.

Stability labels ​

Each package carries one label, declared in one place and checked against stability and support, which says what each means:

  • core: breaking changes only in a minor release, listed under Changed in the changelog with a migration note.
  • experimental: may change in any release.
  • building block, not yet used by approval gates: implemented and tested, but no approval gate calls it yet.

Modules ​

ModulePackagesPages
github.com/bide-ai/bide24one page per package, listed below
github.com/bide-ai/bide/anchor/awss32anchor-awss3
github.com/bide-ai/bide/anchor/gcs2anchor-gcs
github.com/bide-ai/bide/codec/gcf1codec-gcf
github.com/bide-ai/bide/flowedit1flowedit
github.com/bide-ai/bide/govern2govern
github.com/bide-ai/bide/govern/postgreslog1govern-postgreslog
github.com/bide-ai/bide/govern/redislog1govern-redislog
github.com/bide-ai/bide/govern/sqlitelog1govern-sqlitelog
github.com/bide-ai/bide/mcptools1mcptools
github.com/bide-ai/bide/signer/awskms1signer-awskms
github.com/bide-ai/bide/signer/azurekv1signer-azurekv
github.com/bide-ai/bide/signer/gcpkms1signer-gcpkms
github.com/bide-ai/bide/signer/pkcs112signer-pkcs11
github.com/bide-ai/bide/store/postgres1store-postgres
github.com/bide-ai/bide/store/sqlite1store-sqlite
github.com/bide-ai/bide/trace1trace

Packages ​

PackageStabilitySynopsis
agentcorePackage agent is the core of bide, a Go framework for AI agents that move money: a durability-first, Go-idiomatic toolkit whose side effects fire at most once, whose approvals are signed and counted by k-of-n, and whose every action is provable afterwards.
agent/agenttestcorePackage agenttest holds test doubles and helpers for code built on package agent: a scripted model that plays back the turns you give it, so an agent runs with no provider or API key (ScriptedModel, NewScriptedModel, ToolTurn, TextTurn, ErrorTurn); a Store that counts its round trips (CountingStore); and constructors that panic instead of returning an error (MemJournal, MustJournal, MustNew, Must), for tests whose setup cannot fail.
agent/storetestcorePackage storetest checks that an agent.Store meets the requirements the journal builds on (A1 to A8, documented on agent.Store), that a Journal over it writes and checks the journal format header, and that records round-trip byte for byte.
approvalscorePackage approvals is the intake an application serves so that approvers can decide on gated calls over HTTP: an http.Handler that shows a pending call from the journal, and takes an approver's signed decision, verifies it against the recorded call, and records it through the application's own journal.
auditcorePackage audit turns an agent's durable journal into a verifiable, tamper-evident record.
audit/anchorobjexperimentalPackage anchorobj is the part of an object-store audit anchor that does not depend on any storage SDK: the layout of the objects that hold signed tree heads, their canonical body, the checks a Reader makes on an object it reads back, the equivocation check, and the tripwire for run IDs that look like personal data.
audit/crlrefreshexperimentalPackage crlrefresh keeps the status snapshot of a certificate-bound approver (audit.CertApprover) supplied with the newest verified CRLs of the issuing CAs its policy pins, and archives every CRL it accepts (docs/design/crl-refresher.md, docs/guides/certificate-approvers.md).
audit/eventstoretestcorePackage eventstoretest checks that an audit.EventStore keeps the contract the event trail builds on: contiguous, append-only positions per run, an idempotent re-append of the same leaf, a refusal (audit.ErrSeqTaken) of a different leaf at a stored position, and exactly one winner among writers racing for one position.
audit/rfc3161building block, not yet used by approval gatesPackage rfc3161 verifies RFC 3161 time-stamp tokens with the standard library alone.
audit/verifycorePackage verify is a dependency-light, standalone verifier for Bide audit proofs.
chaosexperimentalPackage chaos is a deterministic crash-injection benchmark for agent runtimes: it drives a NON-IDEMPOTENT side effect through a fault schedule and checks it fires at most once.
evalexperimentalPackage eval is a statistical evaluation harness for agents.
middlewarecorePackage middleware provides composable func(Handler) Handler batteries for the model call, the "LiteLLM for Go" layer at the semantic level (handlers see messages, tool calls, and token usage, not raw bytes).
model/anthropiccorePackage anthropic adapts Anthropic's Messages API to agent.Model.
model/geminicorePackage gemini adapts Google's Gemini generateContent API to agent.Model.
model/modeltestcorePackage modeltest checks an HTTP-backed agent.Model against the streaming contract the agent loop relies on:
model/openaicorePackage openai adapts the OpenAI Chat Completions API to agent.Model.
model/providercorePackage provider is the kit a model adapter is built from: HTTP error classification, SSE framing, a cap on a streamed reply, Retry-After parsing, and the tool-result codec.
notifycorePackage notify ships bide's webhook notifier: a signed HTTPS POST of a structured notification, and the receiver-side Verify that checks one.
notify/relayexperimentalPackage relay receives bide's signed webhooks and forwards each verified notification to Slack, PagerDuty, or any other Sink.
planexperimentalPackage plan is rung-1 of the expression-surfaces stack: a handle-based flow builder that lowers to the journal-backed runtime and adds no new executor.
plan/planviewexperimentalPackage planview embeds bide view's flow-config page in a program, with the program's plan.Registry, so the page checks a config the way plan.Load does: blocks, predicates, merges and types, as well as structure, and shows the digest a run of the flow would journal.
schemacorePackage schema derives JSON Schema from Go types and emits provider-specific dialects.
themeexperimentalPackage theme is the theme layer of bide's visual pages: a theme is a small JSON file of typed values (colours, enums, numbers in ranges), never CSS.
anchor/awss3experimentalPackage awss3 is an audit.Anchor that writes every signed tree head as an object in an S3 bucket under Object Lock (a WORM store), and a Reader that reads the heads back and verifies them.
anchor/awss3/awss3testexperimentalPackage awss3test is an in-memory S3 bucket with versioning and Object Lock, for testing code that uses the awss3 package without a network.
anchor/gcsexperimentalPackage gcs is an audit.Anchor that writes every signed tree head as an object in a Google Cloud Storage bucket whose retention policy is locked (a WORM store), and a Reader that reads the heads back and verifies them.
anchor/gcs/gcstestexperimentalPackage gcstest is an in-memory gcs.Store that models the parts of Cloud Storage the anchor relies on: object generations, create-only writes (ifGenerationMatch=0), a bucket retention policy that can be locked, noncurrent generations under versioning, temporary holds, per-object retention and Cloud KMS keys.
codec/gcfcorePackage gcf provides a provider.ToolResultCodec that encodes tool results as GCF (Graph Compact Format) instead of JSON when they are sent to the model.
floweditexperimentalPackage flowedit is the edit engine of the flow editor (docs/design/visual-editor.md): it applies one operation to the text of a flow config by splicing, so every byte outside the edit is the original byte, and it returns the text only after checking that the result means what the operation says (it re-parses the result and compares it with the operation applied to the data).
governexperimentalPackage govern is the Tier-2 (distributed / concurrent) compensating-agent layer: it integrates the gsm "Governed State Machine" library so that MULTIPLE concurrent agents mutating SHARED state converge to the same valid state regardless of interleaving, as certified by gsm's build-time normalization-confluence verification (WFC + CC).
govern/eventlogtestexperimentalPackage eventlogtest checks that an implementation satisfies the govern.EventLog contract, so every adapter (in-memory, SQLite, Postgres, Redis, or your own) is held to the same guarantees a governor relies on: dense, unique positions under concurrent appends from separate processes, appends that are idempotent by id (so a retried append is recorded once), and a log that only ever grows at the end.
govern/postgreslogexperimentalPackage postgreslog is a Postgres-backed govern.EventLog for HIGH-AVAILABILITY governed state: multiple processes read the same governed event stream and replay it to the same convergent state.
govern/redislogexperimentalPackage redislog is a durable, networked govern.EventLog backed by Redis Streams, the "no SQL database required" adapter.
govern/sqlitelogexperimentalPackage sqlitelog is a durable, on-disk govern.EventLog backed by single-file SQLite (zero-cgo).
mcptoolscorePackage mcptools adapts a Model Context Protocol server's tools into agent.Tool.
signer/awskmscorePackage awskms is an audit.Signer whose Ed25519 or ECDSA P-256 private key lives in AWS KMS.
signer/azurekvcorePackage azurekv is an audit.Signer whose ECDSA P-256 private key lives in Azure Key Vault or Azure Key Vault Managed HSM.
signer/gcpkmscorePackage gcpkms is an audit.Signer whose Ed25519 or ECDSA P-256 private key lives in Google Cloud KMS.
signer/pkcs11corePackage pkcs11 is an audit.Signer whose private key lives in a PKCS#11 token: a hardware security module, a smart card, or SoftHSM2 for tests.
signer/pkcs11/pkcs11testcorePackage pkcs11test gives tests a SoftHSM2 token to sign with, so code that uses the signer package can be tested against a real PKCS#11 library with no hardware.
store/postgrescorePackage postgres is a Postgres-backed agent.Store for high-availability durable agents: shared Postgres storage lets any node resume any run, so a dead worker's in-flight agents pick up elsewhere.
store/sqlitecorePackage sqlite is the default on-disk agent.Store: a single-file, zero-cgo SQLite journal (via modernc.org/sqlite).
tracecorePackage trace adds OpenTelemetry GenAI instrumentation to an agent, opt-in, so the core agent package carries NO OTel dependency (a user who doesn't import trace pays nothing; contrast frameworks whose core drags the full OTel + Temporal stack into every binary).

Apache-2.0 licensed.