Repository navigation
bide v0.11.0
The API under its new names.
v0.11.0 completes the API redesign's rename: the transitional names of v0.10.0 become the API, and the old API they stood beside is gone. One way to build an agent, one way to run it, one journal type, one tool interface. The protocols the formal models check are unchanged; what changes is the surface, a few refusals that turn silent mistakes into errors when the agent is built, and audit anchoring after every write.
- One way to build and run.
agent.New(model, journal, opts...)returns(*Agent, error)and checks every configuration problem up front.Run,Stream,Resume,RunTypedandSession.Send/SendOncetake aMessageand run options and return a*Result; a saga isRun(..., WithSaga()). - One journal type. Every function that took a
Durabletakes a*agent.Journal(agent.NewJournal(store)), and the journal verbs are its methods:j.Step,j.Parallel,j.Signal,j.Enqueue,j.AnswerInterrupt. A store wrapper wraps theStore, and implementsUnwrap() Storewhen it passes keys through. - One tool interface. A tool is
Spec() ToolSpecandCall. A decorator that embeds a tool inherits its spec, approval gate and timeout included, and overrides in its ownSpec. - Mistakes refused when the agent is built. A tool with a
Safety(),Name(),Description()orArgsSchema()method that disagrees with itsSpec(an override written for the old interface, which nothing reads any more) isErrConfigfromNewand from a plan flow, so a decorator's own side effect is never re-run on resume. - Audit anchoring after every write.
audit.AuditedStorewraps aStoreand anchors after every insert, a write that committed while reporting an error included; a write it cannot anchor (its context ended first, or the publish failed) is reported toOnErrorwhen one is set, andAuditedStore.Reanchoranchors that run later.
API changes:
BuildisNew(model, journal, opts...) (*Agent, error); the oldNew(model, store, tools...)and the builder methods (Use,UseTool,WithMaxTurns,SetMaxConcurrency, ...) are removed: pass the options toNew, or derive a copy withWith.RunMessage,StreamMessage,ResumeRun,RunTypedMessageandSession.SendMessage/SendMessageOnceareRun,Stream,Resume,RunTypedandSession.Send/SendOnce. The string entry points (RunandStreamon a string,RunSaga,RunResult,RunSagaResult,StreamSaga,RunTypedNative,AgentStream.Final) are removed.AgentStreamandAgentEventareRunStreamandRunEvent;audit.Recordisaudit.RecordStream.- The
Durableinterface and the stores'Do,HistoryandJournalshims are removed; use*Journal.Step,Parallel,Signal,Enqueue(the channelSend) andAnswerInterrupt(Resume[T]) are*Journalmethods. PendingApproval,Interrupted,Awaiting,SleepingandResumeHaltareApprovalPending,InterruptPending,SignalPending,TimerPendingandOutcomeUnknown;ResolveHaltRefisResolveHalt;ResolveStepHaltandApproveAsare removed.ContextWithIdentity,ContextWithWakerandContextWithClockare removed: passWithIdentity,WithWakerorWithClockas a run option.WithIdentityrefuses an empty identity.- The
Toolinterface isSpec()andCall;Name,Description,ArgsSchema,SafetyandSpecOfare gone.Functakes its safety asWithSafety;Func,CompensatedFunc,SubAgentandRetrievalToolreturn(Tool, error), withMustFunc,MustCompensatedFunc,MustSubAgentandMustRetrievalToolthat panic instead. Newrefuses a tool whose old-interface method disagrees with itsSpec; plan flows refuse it too.- Package
mcpismcptools(github.com/bide-ai/bide/mcptools). - The scripted model and its turns are in
agent/agenttest, with new helpers:MemJournal,MustJournal,MustNew,Must,AnswerandIdentityContext. - plan's
Register*functions are methods of*plan.Registry. Runon a run journaled as a saga drives it as the saga, withoutWithSaga.audit.AuditedStorewraps aStore, anchors after every insert but the header's, and gainsReanchor(ctx, runID);cmd/bide-auditrefuses an export that does not start with a journal header.
The CHANGELOG has the details of each change.
Install:
go get github.com/bide-ai/bide@v0.11.0
Library modules, at the same version:
go get github.com/bide-ai/bide/store/sqlite@v0.11.0
go get github.com/bide-ai/bide/store/postgres@v0.11.0
go get github.com/bide-ai/bide/mcptools@v0.11.0
go get github.com/bide-ai/bide/trace@v0.11.0
go get github.com/bide-ai/bide/codec/gcf@v0.11.0
go get github.com/bide-ai/bide/govern@v0.11.0
go get github.com/bide-ai/bide/govern/sqlitelog@v0.11.0
go get github.com/bide-ai/bide/govern/redislog@v0.11.0
go get github.com/bide-ai/bide/govern/postgreslog@v0.11.0
Docs: https://bide-ai.com. Formal models: spec/tla and the formal verification overview.