Repository navigation
bide v0.6.0
At-most-once everywhere you author work.
v0.6.0 carries bide's side-effect guarantee to every place work gets written: plain-Go steps, fan-out tasks, tool middleware, sessions, and MCP tools, with cleaner cancellation and streaming along the way.
- Durable steps run at most once.
agent.StepandParalleltasks get the same attempt-marker protection as tool calls and plan nodes. Declare a step safe to re-run withStepSafety(orTask.Safety). - Safety-aware tool middleware.
ToolRetryretries only retry-safe tools andToolCachecaches only read-only ones. The agent also guarantees that a tool that isn't retry-safe runs once per call, whatever the middleware does. Middleware reads a call's safety withagent.ToolSafety. - Idempotent conversations.
Session.SendOnceanswers each inbound message once per key, so redelivered webhooks never open a second turn. Sessions stay consistent across several workers. - Per-run token budgets.
Agent.WithTokenBudgetis rebuilt from the journal, so a budget holds across a crash and resume. Each model call's usage is recorded with its turn. - Consistent usage accounting.
agent.Usagecounts each token once on every provider.TotalInputTokensandTotalTokensgive the sums, and cost is comparable across Anthropic, OpenAI, and Gemini. - Clean cancellation. A cancelled tool call is treated as an unknown outcome rather than a failure. A cancelled run stops at the next turn, and a parent waits for its sub-agents.
- Streaming.
agent.NewStreamFuncandStream.Closerelease a model response as soon as the caller stops reading. A response that ends before the turn finishes is reported asErrIncompleteResponse.model/modeltestchecks any adapter against the streaming contract. - MCP. Tool annotations apply for servers you trust, with
mcp.TrustAnnotations(). Tools from other servers are treated as side effects. - Evals. Every eval samples the model afresh, even over a store kept between evals.
API changes:
middleware.TokenBudgetis replaced byAgent.WithTokenBudget.agent.Steptreats a step as a side effect unlessStepSafetysays otherwise, andParallelrequires unique task names.Usage.InputTokensis the uncached input on every provider.eval.Runreturns(Report, error).mcp.Toolsapplies annotations only withTrustAnnotations().
Install:
go get github.com/bide-ai/bide@v0.6.0
Docs: https://bide-ai.com