Documentation
¶
Overview ¶
Package bonnie is the entry point of an authored agent tree.
A BONNIE agent is a directory of files whose meaning comes from their paths, and one Go file that starts it:
package main
import "github.com/mark3labs/bonnie"
func main() { bonnie.New().Serve() }
That is the whole default agent. Every slot in the tree has a framework default, and authoring the slot replaces it: instructions.md is the system prompt, context/ is the default seed copied into each isolated run, tools/ holds one directory per tool, and .bonnie holds the journal. Configuration that is not a file is code — an Option on New:
func main() {
bonnie.New(
bonnie.WithModel("anthropic/claude-sonnet-4-5"),
bonnie.WithSandbox(sandbox.Docker()),
).Serve()
}
There is no manifest file. Data-shaped settings live at their default paths, and everything else is a Go call, so a setting that does not exist is a compile error rather than a key that is accepted and ignored.
The tree's code — its tools — and the copies of its data files that a `bonnie build` binary carries are wired by codegen into bonnie_gen.go, which calls Register from its init. main.go never has to name them.
Index ¶
- Constants
- Variables
- func Register(t Tree)
- func RegisterDefaults(opts ...Option)
- type ActivityLogger
- type Agent
- func (a *Agent) Configure(opts ...Option)
- func (a *Agent) Decide(ctx context.Context, req DecisionRequest) (*kit.DecisionResult, error)
- func (a *Agent) Run(ctx context.Context) (runErr error)
- func (a *Agent) Serve()
- func (a *Agent) WithJournal(ctx context.Context, fn func(context.Context, runtime.Journal) error) (scopeErr error)
- func (a *Agent) WithRuntime(ctx context.Context, fn func(context.Context, *Runtime) error) (scopeErr error)
- type Channel
- type ChannelFunc
- type CompletionCandidate
- type CompletionFeedback
- type CompletionHook
- type CompletionHookFactory
- type CompletionPolicy
- type Decider
- type DecisionRequest
- type KitSetup
- type Option
- func Quiet() Option
- func WithActivityLogger(logger runtime.ActivityLogger) Option
- func WithAddr(addr string) Option
- func WithAgentFactory(f runtime.AgentFactory) Option
- func WithAuthCommand(enabled bool) Option
- func WithChannel(f ChannelFunc) Option
- func WithChatCommand(enabled bool) Option
- func WithCommand(fn func(*cobra.Command, *Agent)) Option
- func WithCompletionHook(policy CompletionPolicy) Option
- func WithContextFiles(dir string) Option
- func WithDecider(d Decider) Option
- func WithDecisionModel(model string) Option
- func WithDecisionTool() Option
- func WithDiscord(cfg discord.Config) Option
- func WithGitHub(cfg github.Config) Option
- func WithHTTPAuthenticator(fn bonniehttp.Authenticator) Option
- func WithHTTPListenerDisabled() Option
- func WithInstructions(path string) Option
- func WithIroh(cfg irohchannel.Config) Option
- func WithJournal(dir string) Option
- func WithKit(opts ...kit.Option) Option
- func WithKitSetup(setup KitSetup) Option
- func WithListener(ln net.Listener) Option
- func WithModel(model string) Option
- func WithNATS(cfg natschannel.Config) Option
- func WithNATSAPI(cfg natsapi.Config) Option
- func WithName(name string) Option
- func WithNamedToolFactory(name string, factory ToolFactory) Option
- func WithNetwork(p sandbox.NetworkPolicy) Option
- func WithPresence(cfg PresenceConfig) Option
- func WithReplaySafeTools(names ...string) Option
- func WithRunSandboxCleanup(policy SandboxCleanupPolicy) Option
- func WithRunsCommand(enabled bool) Option
- func WithSandbox(p sandbox.Provider) Option
- func WithSandboxDownload(enabled bool) Option
- func WithSandboxEnv(env map[string]string) Option
- func WithSandboxes(providers ...sandbox.Provider) Option
- func WithSchedule(definitions ...schedule.Definition) Option
- func WithScheduleClock(enabled bool) Option
- func WithScheduleTriggerAuthorizer(fn func(*http.Request) error) Option
- func WithSchedulesCommand(enabled bool) Option
- func WithSharedDirectory(dir string) Option
- func WithShutdownTimeout(d time.Duration) Option
- func WithSkills(dir string) Option
- func WithSlack(cfg slack.Config) Option
- func WithSystemPrompt(prompt string) Option
- func WithTelegram(cfg telegram.Config) Option
- func WithToolFactory(factory ToolFactory) Option
- func WithTools(tools ...kit.Tool) Option
- func WithTracing(tp trace.TracerProvider, opts ...observe.Option) Option
- func WithUpdateCommand(enabled bool) Option
- func WithVersionCommand(enabled bool) Option
- func WithWebUI(enabled bool) Option
- func WithWorkspaceSkills(policy WorkspaceSkills) Option
- func WithoutHumanInput() Option
- type PresenceConfig
- type RunScope
- type Runtime
- type SandboxCleanupPolicy
- type ToolFactory
- type ToolScope
- type Tree
- type WorkspaceSkills
Examples ¶
Constants ¶
const ( // DefaultInstructions is the system prompt file, relative to the tree. DefaultInstructions = "instructions.md" // DefaultContextFiles is the seed directory mirrored into each run's isolated // sandbox working directory. These files are working data, not prompt text. // Use [WithSharedDirectory] for explicit shared // local development storage. DefaultContextFiles = "context" // DefaultSkills is the tree's skills directory. DefaultSkills = "skills" // DefaultJournal is the directory the run journal is written to. DefaultJournal = ".bonnie" // DefaultAddr is the address the HTTP channel binds when none is given. DefaultAddr = ":8080" // DevRootEnv names the environment variable `bonnie dev` sets on the // child it serves. Its value is the absolute tree root. A process that // `bonnie dev` did not start does not have it, and dev-only behaviour, // such as local self-modification, keys on it. DevRootEnv = "BONNIE_DEV_ROOT" )
The default layout of a scaffolded tree. These are the paths `bonnie init` writes, the paths codegen embeds, and the paths Agent.Run reads when no option overrides them. They are constants rather than five copies of a string literal, because the scaffold, the generator, the dev loop, and the runtime must agree on the answer: a rule written more than once is a rule one caller can honour while another misses it.
const DecideToolName = "decide"
DecideToolName is the name of the tool WithDecisionTool adds.
const DefaultDotenv = ".env"
DefaultDotenv is the environment file Agent.Run loads when it is present in the process's working directory.
Variables ¶
var ErrContinuationLimit = runtime.ErrContinuationLimit
ErrContinuationLimit reports an exhausted completion continuation budget.
Functions ¶
func Register ¶
func Register(t Tree)
Register hands the generated wiring to the runtime. The generated bonnie_gen.go calls it from init, before main runs.
It is the seam that keeps main.go short: adding a tool to the tree changes the generated file and nothing the author wrote.
func RegisterDefaults ¶ added in v0.32.0
func RegisterDefaults(opts ...Option)
RegisterDefaults adds options that New applies before its own arguments. Generated code calls it from init. `bonnie dev` uses it to install dev-only defaults without a change to main.go. An option in main.go is applied later, so it replaces a default with the same slot. A default tool factory is dropped, not refused, beside WithAgentFactory: the host's agent owns its tools, and a default must not stop a tree that worked without it.
Types ¶
type ActivityLogger ¶ added in v0.13.0
type ActivityLogger struct {
// contains filtered or unexported fields
}
ActivityLogger writes live run activity with charmbracelet/log. Use NewActivityLogger to build one and WithActivityLogger to enable it. It is safe for concurrent use when its underlying logger is not changed.
func NewActivityLogger ¶ added in v0.13.0
func NewActivityLogger(logger *log.Logger) *ActivityLogger
NewActivityLogger uses logger to write activity. Nil selects a new text logger on stdout at Info level. Run states, tool calls, tool results, and final responses use Info level; failures use Error level. Warnings and retries use Warn level. Other lifecycle events and raw payloads use Debug level.
Logs can contain sensitive data. Final response text is included at Info level. Debug output also includes prompts, tool arguments, and results.
func (*ActivityLogger) LogActivity ¶ added in v0.13.0
func (l *ActivityLogger) LogActivity(ev runtime.Event)
LogActivity writes one live event. It does not change the event. A nil receiver or a zero ActivityLogger writes nothing.
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
Agent is a configured agent: the tree's defaults with the options applied over them. Build one with New, then Agent.Serve it.
Nothing is opened, bound, or read until an operation starts, so building an agent cannot fail and New returns no error. A setting that cannot apply — a network policy with no sandbox to enforce it, a model beside a host-supplied agent factory — is refused when Run or WithRuntime starts. WithJournal needs only the journal configuration.
func New ¶
New builds an agent from the tree's default layout and the options.
func main() { bonnie.New().Serve() }
With no options that is a complete agent: instructions.md is the system prompt, context/ is the agent's root for files, .bonnie is the journal, the tools under tools/ are wired by codegen, and the HTTP channel is served on :8080. Each Option replaces one of those. Options from RegisterDefaults apply first, so an argument here wins over them.
func (*Agent) Configure ¶ added in v0.19.0
Configure applies options in order to the agent's current configuration. It uses the same option rules as New: replacement options override earlier values, and additive options append or merge. Validation stays in Agent.Run; Configure does not read files, open resources, or start the agent.
Use it before Run, for example in a WithCommand pre-run hook to apply parsed flags. Configure is not safe for concurrent use. Do not call it while Run or Serve is running, except in Serve's command setup or pre-run hooks. It does not support changes to a live agent. Built-in Serve flags still apply before Run and override the matching options when those flags have a value.
func (*Agent) Decide ¶ added in v0.34.0
func (a *Agent) Decide(ctx context.Context, req DecisionRequest) (*kit.DecisionResult, error)
Decide asks the agent's decision model outside a run, for example in a schedule's Prepare function or in a channel that decides whether to answer. There is no run, so no journal record is written and Key is ignored. In a run, use RunScope.Decide, which journals each call.
It uses Kit's default settings: API keys from stored credentials or the environment, and no HTTP transport from WithKit.
Example ¶
ExampleAgent_Decide skips a quiet schedule before it starts a turn.
package main
import (
"context"
kit "github.com/mark3labs/kit/pkg/kit"
"github.com/mark3labs/bonnie"
"github.com/mark3labs/bonnie/runtime"
"github.com/mark3labs/bonnie/schedule"
)
func main() {
readInbox := func(context.Context) (string, error) { return "", nil }
agent := bonnie.New(bonnie.WithDecisionModel("ollama/pplx-decider"))
agent.Configure(bonnie.WithSchedule(schedule.Definition{
Name: "inbox", Cron: "*/15 * * * *", Revision: "1",
Prepare: func(ctx context.Context, fire schedule.Fire) ([]schedule.Dispatch, error) {
inbox, err := readInbox(ctx)
if err != nil {
return nil, err
}
res, err := agent.Decide(ctx, bonnie.DecisionRequest{
State: kit.DecisionState{Text: inbox},
Questions: []kit.DecisionQuestion{kit.BooleanQuestion("work", "Does a message need a reply?")},
})
if err != nil {
return nil, err
}
if a, err := res.Boolean("work"); err == nil && a.Probability < 0.3 {
return nil, nil
}
return []schedule.Dispatch{{Key: "reply", Input: runtime.Input{Text: "Reply to the inbox."}}}, nil
},
}))
}
Output:
func (*Agent) Run ¶
Run serves the agent until ctx ends, then interrupts in-flight turns and returns. It is Agent.Serve without the process: no flags, no signal handler, no exit — for a host that already owns those.
Optional channel.Lifecycle channels start after the listener is bound. All constructed lifecycle channels shut down before the journal closes, including when startup fails. Each shutdown phase uses WithShutdownTimeout.
At startup, Run continues each run that a previous process left without a stop reason — a crash, a kill, or a restart in the middle of a turn — and sends each result to the channel the conversation is on. At shutdown it interrupts each turn instead of waiting for it, so the next start continues it. A run that parks holds no compute and lives in the journal, so stopping here is never destructive.
func (*Agent) Serve ¶
func (a *Agent) Serve()
Serve runs the agent's command interface and owns the process. With no subcommand, or with serve, it serves until the process is interrupted. It also includes chat, runs, schedules, and version commands by default. Use WithChatCommand, WithRunsCommand, WithSchedulesCommand, and WithVersionCommand to disable them. Operator commands do not start the agent.
It owns the process, which is what makes a one-line main possible: it uses Cobra and Fang for operator flags, help, and startup errors. It installs the signal handler, drains in-flight turns on SIGINT or SIGTERM, and exits non-zero after writing the error to stderr. A host that owns its own process calls Agent.Run instead.
The flags -addr, -model, and -web override the matching options. The -sandbox flag selects a provider declared with WithSandboxes or WithSandbox; without either option, only the default Landlock provider is permitted. An operator can change the port, model, or permitted backend without rebuilding the binary. `bonnie dev` starts a tree's binary with -addr, which is the whole contract between the dev loop and the child.
func (*Agent) WithJournal ¶ added in v0.19.0
func (a *Agent) WithJournal(ctx context.Context, fn func(context.Context, runtime.Journal) error) (scopeErr error)
WithJournal opens the configured journal for inspection during fn, then closes it. It does not load dotenv, prompts, skills, or context files, build an agent factory, check a provider, or start a server or background work. Do not close the journal or use it after fn returns. Wait for all journal operations before returning. A nil fn is an error and opens no resources. Callback, cancellation, and close errors are returned together.
func (*Agent) WithRuntime ¶ added in v0.19.0
func (a *Agent) WithRuntime(ctx context.Context, fn func(context.Context, *Runtime) error) (scopeErr error)
WithRuntime prepares the same agent factory and runner as Agent.Run, calls fn, then closes the journal. It loads dotenv and resolves and seeds the agent's files, but does not start a server, channels, scheduler, or background cleanup. The caller manages any scheduler explicitly. Wait for all operations before fn returns, and keep no resource references after the callback. A nil fn is an error and opens no resources. Callback, cancellation, and close errors are returned together.
type Channel ¶
Channel is an inbound transport BONNIE can mount: the HTTP routes it needs and the inbound surface a run resolves through. Every adapter in channel/ is both.
type ChannelFunc ¶
ChannelFunc builds a channel for the runner that serves it. It is called once at start; an error stops the process before it listens.
type CompletionCandidate ¶ added in v0.13.0
type CompletionCandidate = runtime.CompletionCandidate
CompletionCandidate is a normal response awaiting acceptance.
type CompletionFeedback ¶ added in v0.13.0
type CompletionFeedback = runtime.CompletionFeedback
CompletionFeedback permits completion when ContinueWith is empty. Otherwise ContinueWith supplies the input for another model turn.
type CompletionHook ¶ added in v0.13.0
type CompletionHook = runtime.CompletionHook
CompletionHook performs work before BONNIE publishes a final outcome. It is skipped on suspension and model failure. Errors fail the run. An interrupted hook can run again; external effects must tolerate retries.
type CompletionHookFactory ¶ added in v0.13.0
type CompletionHookFactory func(context.Context, RunScope) (CompletionHook, error)
CompletionHookFactory creates a hook for one managed execution. Closure state is not durable. BONNIE restores continuation state separately.
type CompletionPolicy ¶ added in v0.13.0
type CompletionPolicy struct {
NewHook CompletionHookFactory
// MaxContinuations bounds additional model turns. Zero permits no extra
// turns. Suspension and recovery do not reset the budget.
MaxContinuations int
}
CompletionPolicy configures work before the final outcome.
type Decider ¶ added in v0.34.0
Decider sends one request to a decision model. WithDecider installs one in place of the provider call.
type DecisionRequest ¶ added in v0.34.0
type DecisionRequest struct {
// Model is a decision model in "provider/model" format. Empty uses
// the model of [WithDecisionModel].
Model string
State kit.DecisionState
Questions []kit.DecisionQuestion
// ProviderOptions are sent as-is on wires that accept them.
ProviderOptions map[string]any
// Key makes a call in a run idempotent. When the run already has a
// successful decision with the same key and input, the stored result is
// returned and the model is not asked again, also after a restart. Use
// a key that names the decision, for example the ID of the tool call it
// gates. A key used again with different input returns
// [runtime.ErrDecisionKeyReused]. Empty asks the model each time.
// [Agent.Decide] has no run, so it ignores Key.
Key string
}
DecisionRequest is one request to the agent's decision model. See kit.DecisionRequest for the model, state and question fields.
type KitSetup ¶ added in v0.13.0
KitSetup registers SDK hooks after BONNIE installs its durable session and hooks, but before the first prompt. It runs again on Start or Resume. Callback code runs on the host; use scope.Exec for sandbox commands.
type Option ¶
type Option func(*config)
Option configures New or Agent.Configure. This is where a setting that is not a file in the tree lives: the model, a sandbox, an extra channel. A setting that does not exist is a compile error, which is the point.
func Quiet ¶
func Quiet() Option
Quiet suppresses the startup banner.
It no longer has to make an exception for a no-sandbox warning, because no default run is unsandboxed: the banner names the backend in force instead. sandbox.Local can still be selected without confinement.
func WithActivityLogger ¶ added in v0.13.0
func WithActivityLogger(logger runtime.ActivityLogger) Option
WithActivityLogger enables live activity logging for all channels, including NATS. Nil disables logging. Any runtime.ActivityLogger can be used, including one built with NewActivityLogger. Replayed events are not logged again.
func WithAddr ¶
WithAddr binds the HTTP channel to addr instead of DefaultAddr.
func WithAgentFactory ¶
func WithAgentFactory(f runtime.AgentFactory) Option
WithAgentFactory replaces the model-backed agent entirely with one the host builds itself. It is the escape hatch for a program that implements runtime.Agent — a test double, a router, a second framework — and wants BONNIE only for durability and transport.
It cannot be combined with the options that configure the agent BONNIE would have built (WithModel, WithSystemPrompt, WithSandbox, WithSandboxes, WithSandboxEnv, WithNetwork, WithTools, WithToolFactory, WithKit, WithKitSetup, WithCompletionHook, WithDecisionTool, WithoutHumanInput): the factory owns the agent, so those settings would be accepted and ignored. Agent.Run refuses instead, naming both.
What the factory owns, it owns completely: tree instructions, skills, and the tools codegen discovered do not reach it either. They are available through Registered for a host that wants them. The journal, the working files, the channels, and the shutdown behaviour are unaffected — those are BONNIE's side of the boundary.
func WithAuthCommand ¶ added in v0.23.0
WithAuthCommand controls the provider login commands in Agent.Serve. They are enabled by default. Disabling them does not prevent Kit from loading stored credentials or remove their dependencies from the binary.
func WithChannel ¶
func WithChannel(f ChannelFunc) Option
WithChannel mounts another inbound transport beside the HTTP channel.
func WithChatCommand ¶ added in v0.20.0
WithChatCommand controls the chat command in Agent.Serve. It is enabled by default and connects to a running HTTP channel; it does not start a server. Disabling the command does not remove its dependencies from the binary.
func WithCommand ¶ added in v0.19.0
WithCommand adds a callback that configures the root command used by Agent.Serve. Callbacks run in registration order, after the built-in flags and host Go flags are added, but before parsing. They may add flags and subcommands or set Cobra hooks. They do not run in Agent.Run.
To apply parsed flags, call Agent.Configure from a pre-run hook. Help runs the registration callbacks, but does not run pre-run hooks or open resources.
func WithCompletionHook ¶ added in v0.13.0
func WithCompletionHook(policy CompletionPolicy) Option
WithCompletionHook installs a completion policy. A second policy, a nil factory, or a negative limit is a configuration error. This option cannot be combined with WithAgentFactory.
func WithContextFiles ¶ added in v0.17.0
WithContextFiles selects the context files to copy into each new run, instead of DefaultContextFiles. These files are seed data, not system prompt text. An empty dir disables copying; it does not give tools access to the process directory or disable the sandbox.
func WithDecider ¶ added in v0.34.0
WithDecider replaces the provider call with d. A test uses it to script answers, and a host uses it to reach a model Kit cannot call. Each call in a run is still journalled. When it is set, Agent.Run does not check the model of WithDecisionModel against the model database.
func WithDecisionModel ¶ added in v0.34.0
WithDecisionModel sets the decision model the agent uses, in "provider/model" format, for example "openrouter/typesafe/jev-1.14" or "ollama/pplx-decider". See kit.GetDecisionModels.
A decision model answers typed questions with probabilities. It does not chat. The option makes RunScope.Decide available to tool factories, Kit setup callbacks and completion hooks, and makes Agent.Decide available to host code outside a run. WithDecisionTool also gives it to the model. A probability is not an authorization: enforce access rules in host code.
Agent.Run refuses a model that Kit cannot call as a decision model. It does not check credentials.
Example ¶
ExampleWithDecisionModel gates shell commands with a decision model and checks that each response completes the task. The recipes are those of www/pages/guides/decisions.md; this example keeps them compiling. It needs a provider, so it has no Output and does not run.
package main
import (
"context"
kit "github.com/mark3labs/kit/pkg/kit"
"github.com/mark3labs/bonnie"
)
func main() {
bonnie.New(
bonnie.WithDecisionModel("openrouter/typesafe/jev-1.14"),
bonnie.WithKitSetup(func(ctx context.Context, k *kit.Kit, scope bonnie.RunScope) error {
k.OnBeforeToolCall(kit.HookPriorityNormal, func(h kit.BeforeToolCallHook) *kit.BeforeToolCallResult {
if h.ToolName != "shell" {
return nil
}
res, err := scope.Decide(ctx, bonnie.DecisionRequest{
State: kit.DecisionState{Text: h.ToolArgs},
Questions: []kit.DecisionQuestion{
kit.BooleanQuestion("destructive", "Does this command delete or overwrite data?"),
},
Key: "gate:" + h.ToolCallID,
})
if err != nil {
return &kit.BeforeToolCallResult{Block: true, Reason: "The safety check failed. Ask for approval with request_approval."}
}
if a, err := res.Boolean("destructive"); err != nil || a.Probability > 0.2 {
return &kit.BeforeToolCallResult{Block: true, Reason: "This command can destroy data. Ask for approval with request_approval first."}
}
return nil
})
return nil
}),
bonnie.WithCompletionHook(bonnie.CompletionPolicy{
MaxContinuations: 2,
NewHook: func(_ context.Context, scope bonnie.RunScope) (bonnie.CompletionHook, error) {
return func(ctx context.Context, c bonnie.CompletionCandidate) (bonnie.CompletionFeedback, error) {
res, err := scope.Decide(ctx, bonnie.DecisionRequest{
State: kit.DecisionState{Text: c.Response},
Questions: []kit.DecisionQuestion{
kit.BooleanQuestion("done", "Does this response complete the task, with no step left for later?"),
},
})
if err != nil {
return bonnie.CompletionFeedback{}, nil
}
if a, err := res.Boolean("done"); err == nil && a.Probability < 0.5 {
return bonnie.CompletionFeedback{ContinueWith: "The task is not complete. Continue."}, nil
}
return bonnie.CompletionFeedback{}, nil
}, nil
},
}),
bonnie.WithDecisionTool(),
)
}
Output:
func WithDecisionTool ¶ added in v0.34.0
func WithDecisionTool() Option
WithDecisionTool gives the model the "decide" tool, which asks the decision model typed questions about a text. It needs WithDecisionModel or WithDecider, and it cannot be combined with WithAgentFactory.
Each call is journalled with the tool call's ID as its key, and the tool is replay-safe: a call interrupted by a crash returns the stored answer when the answer was journalled, and asks again when it was not.
func WithDiscord ¶
WithDiscord mounts the Discord channel. DISCORD_BOT_TOKEN and DISCORD_PUBLIC_KEY come from the environment; see WithSlack.
func WithGitHub ¶ added in v0.5.0
WithGitHub mounts the GitHub App channel. GITHUB_APP_ID, GITHUB_APP_PRIVATE_KEY, and GITHUB_WEBHOOK_SECRET come from the environment; see WithSlack. GITHUB_INSTALLATION_ID comes from there too, and only a hand-off needs it: a webhook carries its own installation. The bot name is configured, not environmental: it is a setting, not a secret.
func WithHTTPAuthenticator ¶ added in v0.7.0
func WithHTTPAuthenticator(fn bonniehttp.Authenticator) Option
WithHTTPAuthenticator verifies who is calling the framework's own HTTP API, and makes the principal it returns the run's identity.
Every chat adapter already does this from a platform signature — Slack's HMAC, Discord's Ed25519, GitHub's HMAC. The HTTP channel carries no such signature, so what counts as proof is the host's to decide: a bearer token, an OIDC assertion, a client certificate, a session cookie.
Without this option the HTTP API authenticates nobody. That is the right default for a loopback `bonnie dev`, and the wrong one for anything reachable by someone else — the routes start runs, read transcripts, and retire conversations. A deployment either passes an authenticator here or puts the process behind something that has already established who is calling.
See github.com/mark3labs/bonnie/channel/http.Authenticator for what a verifier returns, and github.com/mark3labs/bonnie/channel/http.ErrUnauthenticated for how it refuses one.
func WithHTTPListenerDisabled ¶ added in v0.27.0
func WithHTTPListenerDisabled() Option
WithHTTPListenerDisabled explicitly disables TCP API and schedule routes. It rejects web UI, injected listeners, and channels with TCP routes.
func WithInstructions ¶
WithInstructions reads the system prompt from path instead of DefaultInstructions. An empty path means the agent has no instructions file, which is how a host with no tree runs.
func WithIroh ¶ added in v0.25.0
func WithIroh(cfg irohchannel.Config) Option
WithIroh mounts the HTTP-compatible Iroh channel. Only explicitly paired endpoint IDs can access it. Pairing grants operator access to all runs.
func WithJournal ¶
WithJournal writes the run journal to dir instead of DefaultJournal.
func WithKit ¶
WithKit passes Kit options through to the agent, for settings BONNIE does not name itself.
func WithKitSetup ¶ added in v0.13.0
WithKitSetup adds a managed setup callback. Callbacks run in registration order. Closure state is local to the instance, not durable. This option cannot be combined with WithAgentFactory.
func WithListener ¶
WithListener serves on an already-bound listener instead of dialling the configured address. Tests bind :0 with it and learn the port.
func WithModel ¶
WithModel selects the model, as "provider/name". Without it, Kit's default applies.
func WithNATS ¶ added in v0.11.0
func WithNATS(cfg natschannel.Config) Option
WithNATS mounts an asynchronous NATS task channel. NATS_URL fills an empty URL. NATS_NKEY_SEED, NATS_TOKEN, NATS_USERNAME, and NATS_PASSWORD fill empty authentication fields. All fallbacks are skipped when Conn is supplied. Set only one authentication method, including in the environment. Subjects can be configured explicitly or derived from RootSubject. Seeds are values, not paths. Config.Stream or RootSubject enables JetStream. Core NATS does not retain tasks or retry results; see channel/nats.
func WithNATSAPI ¶ added in v0.27.0
WithNATSAPI mounts the run API on an explicit agent-specific Core NATS subject. Broker authentication alone is not API authentication; cfg requires a verifier.
func WithName ¶ added in v0.5.0
WithName names the agent. The name is reported by `GET /bonnie/v1/info` and nowhere else today; it is for a client that talks to several agents.
func WithNamedToolFactory ¶ added in v0.32.0
func WithNamedToolFactory(name string, factory ToolFactory) Option
WithNamedToolFactory adds a tool factory that a later option with the same name replaces in place. A package that ships a default factory, such as github.com/mark3labs/bonnie/selfmod, uses the name, so an explicit option in main.go replaces a default that `bonnie dev` registered and the model does not see the same tool twice. An empty name is the same as WithToolFactory.
func WithNetwork ¶
func WithNetwork(p sandbox.NetworkPolicy) Option
WithNetwork constrains what the sandbox may reach. It needs a backend that can enforce it: a policy is refused at startup by a backend that cannot, never stored and ignored. The default Landlock backend confines the filesystem and not the network, so a policy with it is refused and names the backends that can.
func WithPresence ¶ added in v0.20.0
func WithPresence(cfg PresenceConfig) Option
WithPresence enables agent presence registration after channel startup. AgentID and Registry are required; InstanceID is generated when omitted. It copies labels and endpoints. Endpoint overrides replace provider endpoints. Registration and refresh failures stop Agent.Run. Shutdown attempts to publish draining and unregister with a context bounded by WithShutdownTimeout.
func WithReplaySafeTools ¶ added in v0.19.0
WithReplaySafeTools permits recovery to repeat the named interrupted tools. The default is none. Each tool must make external actions idempotent and enforce its own authorization: recovery calls its implementation directly, not interactive Kit approval hooks. Both the recorded and current policy must permit replay. Do not declare shell or payment tools safe by default. Each use adds to the set: two options name the union of their tools.
func WithRunSandboxCleanup ¶ added in v0.17.0
func WithRunSandboxCleanup(policy SandboxCleanupPolicy) Option
WithRunSandboxCleanup enables automatic cleanup of run-owned working files. It cannot be combined with WithSharedDirectory or WithAgentFactory. The provider must implement sandbox.RunDeleter. Shared-directory modes are rejected. Each deletion has a 30-second timeout; errors are logged and retried. Without this option, sandboxes and working files are kept.
func WithRunsCommand ¶ added in v0.20.0
WithRunsCommand controls the local journal commands in Agent.Serve. They are enabled by default. This option does not restrict journal access.
func WithSandbox ¶
WithSandbox selects the backend for managed command and file tools. Custom Go callbacks still run on the host.
It SELECTS a sandbox, it does not enable one. Leaving it out does not give the model this process's filesystem: a run with no explicit backend gets sandbox.Landlock, which confines tool calls to the run's own working directory using the Linux Landlock LSM and needs nothing installed.
Pass this to choose something stronger — sandbox.Docker for namespaces, sandbox.Microsandbox for a microVM with its own kernel — or to widen the confinement deliberately with sandbox.Local, which provides no isolation at all and is for development only. The operator may select only this provider with --sandbox. Use WithSandboxes to permit more than one backend. These two options cannot be combined.
The godoc on each provider in package sandbox states what that backend does and does not contain.
func WithSandboxDownload ¶ added in v0.18.0
WithSandboxDownload controls automatic installation of the tracked microsandbox release at startup. Downloads are enabled by default, only for a selected microsandbox backend with no msb in PATH or the journal directory. Disabling downloads does not prevent use of an existing local installation.
func WithSandboxEnv ¶ added in v0.7.0
WithSandboxEnv injects environment variables into every command the sandbox runs. It is how a run gets a credential or a setting the model must not choose — a database URL, a registry token, a feature flag — configured out of band so the model never holds the value.
The variables reach every backend, because the injection travels over the same seam a per-command environment does. An injected value wins over a per-command variable of the same name, so a fixed secret cannot be clobbered. Repeated calls merge, and a later key overrides an earlier one. See sandbox.EnvInjected for the full statement.
It does not encrypt the value or hide it from a command the model runs: a command inside the sandbox can print any variable it is given. The isolation is that the model cannot choose what is injected, not that it cannot read it.
func WithSandboxes ¶ added in v0.16.0
WithSandboxes declares the sandbox backends the operator may select with --sandbox in Agent.Serve. The first provider is the default. Selection keeps the provider's configured options; it does not build a new provider. Only the selected provider is checked for availability. An unavailable provider returns an error, never a fallback to another backend.
The list must be non-empty, with non-nil providers and unique, non-empty names from sandbox.Provider.Name. This option may be set only once and cannot be combined with WithSandbox or WithAgentFactory. Invalid configuration is refused when serving starts. Agent.Run uses the first provider without reading process flags.
func WithSchedule ¶ added in v0.16.0
func WithSchedule(definitions ...schedule.Definition) Option
WithSchedule adds durable time-based agent dispatch or host callback definitions. Host callbacks must be safe to repeat. See schedule.Definition.
func WithScheduleClock ¶ added in v0.16.0
WithScheduleClock enables or disables cron schedule evaluation. It is enabled by default.
func WithScheduleTriggerAuthorizer ¶ added in v0.16.0
WithScheduleTriggerAuthorizer enables external schedule triggers after authorization.
func WithSchedulesCommand ¶ added in v0.20.0
WithSchedulesCommand controls the schedule commands in Agent.Serve. They are enabled by default. This option does not disable HTTP schedule routes.
func WithSharedDirectory ¶ added in v0.17.0
WithSharedDirectory selects one host directory for every run instead of creating an isolated working directory per run. The default Landlock provider keeps filesystem confinement. Explicit Landlock and Local providers are supported; Local provides no filesystem isolation. Other providers are rejected. Overlapping opens through one provider are rejected. Separate processes and provider instances are not coordinated. The directory is never removed by run pruning. This option cannot be combined with WithContextFiles.
func WithShutdownTimeout ¶
WithShutdownTimeout bounds each shutdown phase of Agent.Run. When a signal arrives, each in-flight turn is interrupted and records "interrupted" at its next context check; the next start continues it. A turn that does not stop within the timeout still keeps its finished steps — the journal is what survives — and the next start continues it from there.
func WithSkills ¶ added in v0.7.0
WithSkills reads the tree's skills from dir instead of DefaultSkills. An empty dir disables tree skills and Kit automatic discovery, but does not disable an explicit WithWorkspaceSkills option. Explicit skills passed through WithKit remain in use.
A skill is a markdown file with YAML frontmatter: dir holds one *.md or *.txt per skill, or one subdirectory per skill with a SKILL.md in it. Kit scans the directory as given and adds nothing to the path, so BONNIE's skills/ is the whole skill set — the agent never inherits a skill from a .agents/skills it happens to be running beside.
Each skill's name and description reach the system prompt; the body arrives only when the model calls activate_skill. A bundled scripts/, references/, or assets/ file is NAMED in that activation text but lives on the host, outside the sandbox the tools run in, so the model cannot open it. Put what the model must read in the skill body, and put a file it must open in context/.
func WithSlack ¶
WithSlack mounts the Slack channel. Credentials come from the environment and never from code: SLACK_BOT_TOKEN and SLACK_SIGNING_SECRET fill the config's empty fields, and a missing one is a startup error naming the variable. A webhook that does not verify its caller is a door with no lock.
func WithSystemPrompt ¶
WithSystemPrompt sets the system prompt directly, instead of reading the tree's instructions file. It wins over WithInstructions.
func WithTelegram ¶
WithTelegram mounts the Telegram channel. TELEGRAM_BOT_TOKEN and TELEGRAM_WEBHOOK_SECRET come from the environment; see WithSlack.
func WithToolFactory ¶ added in v0.24.0
func WithToolFactory(factory ToolFactory) Option
WithToolFactory adds tools built with access to the current agent and run. Factories run in registration order, after discovered tool factories and before WithKitSetup callbacks. A nil factory stops agent construction. It cannot be combined with WithAgentFactory.
func WithTools ¶
WithTools adds tools to the set the model may call, beside the tools codegen discovered under tools/ and Kit's core set.
func WithTracing ¶ added in v0.32.0
func WithTracing(tp trace.TracerProvider, opts ...observe.Option) Option
WithTracing records each turn as OpenTelemetry spans through tp: one invoke_agent span per turn, with a chat span per model step and an execute_tool span per tool call. The agent's name (WithName) names the spans. See package observe for the span tree and for what a span records.
Spans carry metadata only unless an option allows content:
bonnie.WithTracing(tp, observe.WithCapture(observe.CaptureAll))
The caller owns tp and must shut it down after Agent.Serve or Agent.Run returns, or the last spans are lost. A nil tp disables tracing. To send traces to Langfuse, build tp with package observe/langfuse.
func WithUpdateCommand ¶ added in v0.35.0
WithUpdateCommand controls the update command group in Agent.Serve. It is enabled by default. Disable it before adding a replacement with WithCommand. This does not restrict filesystem access or shared cache reads.
func WithVersionCommand ¶ added in v0.20.0
WithVersionCommand controls the version command in Agent.Serve. It is enabled by default and reports build information without starting the agent.
func WithWebUI ¶ added in v0.19.0
WithWebUI enables the browser interface at /web on the HTTP listener. It uses the same runner, journal, and HTTP channel as the wire API. The interface is disabled by default. This option does not open a browser.
func WithWorkspaceSkills ¶ added in v0.31.0
func WithWorkspaceSkills(policy WorkspaceSkills) Option
WithWorkspaceSkills enables untrusted repository metadata in model context. Only .agents/skills/<bundle>/SKILL.md and .kit/skills/<bundle>/SKILL.md qualify. Tree skills remain separate, including with WithSkills(""). This option opens the sandbox at startup and cannot use WithAgentFactory. Repeated options replace the policy. Bundled assets remain live, not saved. Each built-in sandbox supports it, and so does a custom sandbox that implements SkillDiscovery. Local and Landlock use rooted no-follow opens on the host. Docker and Microsandbox scan through Exec in the guest.
func WithoutHumanInput ¶ added in v0.13.0
func WithoutHumanInput() Option
WithoutHumanInput omits BONNIE's built-in ask_human and request_approval tools. Both tools are enabled by default. Sandbox permissions do not change. Caller-supplied tools remain available and can still suspend a run. This option does not prevent the model from asking questions in its response text. It cannot be combined with WithAgentFactory, which owns the agent's tools.
type PresenceConfig ¶ added in v0.20.0
type PresenceConfig struct {
// Registry is required. The host does not close it.
Registry presence.Registry
// AgentID is the required stable agent name. It must match each mounted
// channel's non-empty [channel.AgentIdentity].
AgentID string
// InstanceID distinguishes process instances. When empty, the host generates
// a random ID for each Run. Do not reuse it across simultaneous instances.
InstanceID string
// Labels holds discovery metadata, not authorization claims.
Labels map[string]string
// RefreshInterval defaults to 10 seconds. Negative values are invalid.
// It must be less than the registry TTL when it implements [presence.TTLStore].
RefreshInterval time.Duration
// Endpoints replaces the full provider endpoint list when entries are supplied.
// When omitted, the host collects endpoints from [channel.PresenceProvider]
// implementations, including HTTP. Supply public URLs explicitly; the host
// does not infer them from bind addresses. Override readiness follows host state.
Endpoints []presence.Endpoint
}
PresenceConfig configures optional agent registration during Agent.Run. Presence is advisory; it does not assign work or coordinate execution.
type RunScope ¶ added in v0.13.0
type RunScope struct {
RunID string
// Session provides trusted setup code with durable state and tool recovery controls.
Session *runtime.Session
// Exec opens the sandbox lazily and uses the same handle as agent tools.
Exec func(context.Context, sandbox.Command) (*sandbox.Result, error)
// Decide asks the decision model of [WithDecisionModel] or
// [WithDecider] and journals each call that reaches the provider call,
// also a failed one. It is nil when neither option is set. See
// [runtime.Session.Decide].
Decide func(context.Context, DecisionRequest) (*kit.DecisionResult, error)
}
RunScope gives trusted application code access to one managed execution. A new scope is created for each Start or Resume. Do not retain Exec after that execution ends. BONNIE owns sandbox cleanup.
type Runtime ¶ added in v0.19.0
type Runtime struct {
// contains filtered or unexported fields
}
Runtime gives access to a journal and its configured runner during Agent.WithRuntime. Do not use the Runtime, journal, or runner after the callback returns. Wait for all operations and goroutines before returning. No server, channels, scheduler, or cleanup loop starts automatically. The caller must start, cancel, and wait for Runner.RunScheduler if needed. Only one scheduler may own the journal at a time.
type SandboxCleanupPolicy ¶ added in v0.17.0
type SandboxCleanupPolicy = runtime.SandboxCleanupPolicy
SandboxCleanupPolicy sets retention periods for run-owned working files. Zero keeps files for that state; positive durations permit deletion after the latest terminal checkpoint. Negative durations are rejected at startup. Completed runs can receive later turns; those turns start with an empty working directory if cleanup has removed it. The journal and channel addresses are kept.
Cleanup runs at startup and once per minute. One process must own the journal and sandboxes: separate processes are not coordinated.
type ToolFactory ¶ added in v0.24.0
ToolFactory builds tools for one managed execution, before its first prompt. Closure state is not durable. Factories run again on Start or Resume. An error or a nil returned tool stops construction. An empty tool slice is valid.
type ToolScope ¶ added in v0.24.0
type ToolScope struct {
RunScope
// Kit is the agent bound to this execution's durable session.
Kit *kit.Kit
}
ToolScope gives a tool factory access to the current agent and run. BONNIE creates a new scope on each Start or Resume. Do not retain it after that execution ends. Tool code runs on the host; use Exec for sandbox commands. Use Kit.Subagent, not Kit.Prompt, for model calls from an active tool. Child calls are not durable BONNIE runs and can repeat after interruption.
type Tree ¶
type Tree struct {
// Tools are the tools discovered under tools/ that need no run scope.
Tools []kit.Tool
// ToolFactory builds discovered scoped tools for each Start or Resume.
ToolFactory ToolFactory
// Instructions is the embedded copy of the tree's instructions file.
Instructions string
// Skills is the embedded copy of the tree's skills directory.
// [Agent.Run] materialises it beside the journal when the tree's skills
// directory is not on disk, which is what a built binary on a bare host
// has, and hands the directory to Kit as Options.SkillsDir.
Skills embed.FS
// ContextFiles is the embedded copy of the tree's context files. [Agent.Run]
// copies them into each new run; they are not added to the system prompt. It
// materialises them beside a built binary that has no tree, and
// never overwrites a file that is already there.
ContextFiles embed.FS
}
Tree is what codegen discovered in an agent tree: the code it wired and the data files it embedded. The generated bonnie_gen.go builds one and hands it to Register from its init, so main.go never names a tool or an embed.
A tree run from its source directory reads its data files from disk and uses the embedded copies only as a fallback. A binary from `bonnie build` has no tree beside it, so the embedded copies are all it has.
func Registered ¶
func Registered() Tree
Registered returns what the generated file registered. It is the zero Tree when a tree has not been generated yet, which is what a hand-written main.go with no tools sees.
Call it at run time — inside main, or later. The generated file registers from init, and Go initialises every package-level variable before it runs any init function, so a package-level `var x = bonnie.Registered()` reads the empty tree.
type WorkspaceSkills ¶ added in v0.31.0
type WorkspaceSkills struct {
// Exclude adds directory globs to the mandatory exclusions and Git rules.
Exclude []string
// MaxDepth bounds directory segments below the root (root depth is zero).
MaxDepth int
// MaxSkills bounds the selected workspace catalogue.
MaxSkills int
// MaxSkillBytes bounds original bytes, including frontmatter.
MaxSkillBytes int64
// MaxMetadataBytes bounds exact escaped catalogue text, not skill bodies.
MaxMetadataBytes int64
}
WorkspaceSkills controls opt-in recursive workspace discovery. Zero values select depth 12, 100 skills, 128 KiB per file and 32 KiB of metadata. Exclude adds workspace-relative directory globs (*, ?, classes, whole ** segments). Negative limits and invalid patterns are rejected at startup. Discovery never follows symlinks or enables Kit's home discovery.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package agent implements BONNIE's L2 discovery: the authored agent tree.
|
Package agent implements BONNIE's L2 discovery: the authored agent tree. |
|
Package channel defines BONNIE's inbound transport abstraction (L3).
|
Package channel defines BONNIE's inbound transport abstraction (L3). |
|
chat
Package chat holds the plumbing every chat-platform channel shares: the journalled address map, per-run turn locks, the channel.SessionRef implementation, and the dispatch rule that sends a message to the right runner entry point.
|
Package chat holds the plumbing every chat-platform channel shares: the journalled address map, per-run turn locks, the channel.SessionRef implementation, and the dispatch rule that sends a message to the right runner entry point. |
|
discord
Package discord is BONNIE's Discord inbound transport (L3).
|
Package discord is BONNIE's Discord inbound transport (L3). |
|
github
Package github is BONNIE's GitHub App channel (L3).
|
Package github is BONNIE's GitHub App channel (L3). |
|
http
Package http is BONNIE's HTTP inbound transport (L3).
|
Package http is BONNIE's HTTP inbound transport (L3). |
|
iroh
Package iroh serves the BONNIE HTTP API over authenticated Iroh QUIC streams.
|
Package iroh serves the BONNIE HTTP API over authenticated Iroh QUIC streams. |
|
nats
Package nats carries asynchronous tasks over Core NATS or JetStream.
|
Package nats carries asynchronous tasks over Core NATS or JetStream. |
|
natsapi
Package natsapi serves the existing authenticated run API over Core NATS.
|
Package natsapi serves the existing authenticated run API over Core NATS. |
|
slack
Package slack is BONNIE's Slack inbound transport (L3).
|
Package slack is BONNIE's Slack inbound transport (L3). |
|
telegram
Package telegram is BONNIE's Telegram inbound transport (L3).
|
Package telegram is BONNIE's Telegram inbound transport (L3). |
|
Package channeltest is the conformance suite for channel adapters, in the same spirit as the journal and sandbox suites.
|
Package channeltest is the conformance suite for channel adapters, in the same spirit as the journal and sandbox suites. |
|
Package client is a Go client for BONNIE's HTTP wire API.
|
Package client is a Go client for BONNIE's HTTP wire API. |
|
iroh
Package iroh connects the BONNIE HTTP client to an Iroh channel.
|
Package iroh connects the BONNIE HTTP client to an Iroh channel. |
|
nats
Package nats provides a typed JetStream client for channel/nats.
|
Package nats provides a typed JetStream client for channel/nats. |
|
natsapi
Package natsapi adapts the existing BONNIE HTTP client to Core NATS.
|
Package natsapi adapts the existing BONNIE HTTP client to Core NATS. |
|
cmd
|
|
|
bonnie
command
Command bonnie is the BONNIE developer CLI.
|
Command bonnie is the BONNIE developer CLI. |
|
Package eval runs evals against a BONNIE agent: scored checks that drive the real agent and grade what it did.
|
Package eval runs evals against a BONNIE agent: scored checks that drive the real agent and grade what it did. |
|
internal
|
|
|
agentcmd
Package agentcmd provides commands shared by the CLI and agent binaries.
|
Package agentcmd provides commands shared by the CLI and agent binaries. |
|
evalui
Package evalui is the terminal interface of `bonnie eval`: it reads the output of go test -json, keeps each eval run under .bonnie/evals, and shows the evals, their scores and their conversations.
|
Package evalui is the terminal interface of `bonnie eval`: it reads the output of go test -json, keeps each eval run under .bonnie/evals, and shows the evals, their scores and their conversations. |
|
fakemodel
Package fakemodel is a scripted language model for tests that drive a real Kit.
|
Package fakemodel is a scripted language model for tests that drive a real Kit. |
|
flaky
Package flaky disables tests that fail intermittently, without deleting them.
|
Package flaky disables tests that fail intermittently, without deleting them. |
|
natsapi
Package natsapi implements the private version-one HTTP framing protocol.
|
Package natsapi implements the private version-one HTTP framing protocol. |
|
natswire
Package natswire holds the NATS wire rules shared by the server and client.
|
Package natswire holds the NATS wire rules shared by the server and client. |
|
otelspan
Package otelspan rewrites finished OpenTelemetry spans on their way to an exporter.
|
Package otelspan rewrites finished OpenTelemetry spans on their way to an exporter. |
|
presencesmoke
command
Command presencesmoke checks agent discovery, HTTP endpoints, shared and targeted NATS tasks, presence deletion after a crash, and graceful shutdown across separate processes.
|
Command presencesmoke checks agent discovery, HTTP endpoints, shared and targeted NATS tasks, presence deletion after a crash, and graceful shutdown across separate processes. |
|
runsui
Package runsui is the operator console for durable runs: a terminal interface that lists the runs in a journal, shows each one as an overview, a conversation, a trace, and raw journal records, and sends operator actions to a running server.
|
Package runsui is the operator console for durable runs: a terminal interface that lists the runs in a journal, shows each one as an overview, a conversation, a trace, and raw journal records, and sends operator actions to a running server. |
|
selection
Package selection is the mouse text selection that BONNIE's terminal interfaces share.
|
Package selection is the mouse text selection that BONNIE's terminal interfaces share. |
|
shelltest
Package shelltest makes shell fixtures for tests.
|
Package shelltest makes shell fixtures for tests. |
|
skillfs
Package skillfs provides bounded no-follow discovery operations.
|
Package skillfs provides bounded no-follow discovery operations. |
|
termtheme
Package termtheme holds the palette and the layout primitives that BONNIE's full-screen terminal interfaces share.
|
Package termtheme holds the palette and the layout primitives that BONNIE's full-screen terminal interfaces share. |
|
tracectx
Package tracectx reads W3C trace context from inbound requests, so a channel can make a turn a child of the request that started it.
|
Package tracectx reads W3C trace context from inbound requests, so a channel can make a turn a child of the request that started it. |
|
treetest
Package treetest builds throwaway agent trees that compile against this checkout, for tests that need a real `go build` of a scaffolded module.
|
Package treetest builds throwaway agent trees that compile against this checkout, for tests that need a real `go build` of a scaffolded module. |
|
tui
Package tui is the BONNIE terminal user interface.
|
Package tui is the BONNIE terminal user interface. |
|
workspaceskills
Package workspaceskills discovers untrusted, on-demand workspace skills.
|
Package workspaceskills discovers untrusted, on-demand workspace skills. |
|
Package observe traces BONNIE runs with OpenTelemetry.
|
Package observe traces BONNIE runs with OpenTelemetry. |
|
langfuse
Package langfuse sends BONNIE traces to Langfuse.
|
Package langfuse sends BONNIE traces to Langfuse. |
|
Package presence provides transport-independent records and interfaces for agents that advertise their identity, endpoints, readiness, labels, and state.
|
Package presence provides transport-independent records and interfaces for agents that advertise their identity, endpoints, readiness, labels, and state. |
|
nats
Package nats provides a JetStream KV presence store.
|
Package nats provides a JetStream KV presence store. |
|
Package runtime is BONNIE's durable execution layer (L1).
|
Package runtime is BONNIE's durable execution layer (L1). |
|
Package sandbox provides backends for BONNIE's managed file and command tools.
|
Package sandbox provides backends for BONNIE's managed file and command tools. |
|
Package schedule starts durable agent or host work from code-defined cron jobs.
|
Package schedule starts durable agent or host work from code-defined cron jobs. |
|
Package selfmod lets a BONNIE agent change its own authored source.
|
Package selfmod lets a BONNIE agent change its own authored source. |
|
templ: version: v0.3.1070
|
templ: version: v0.3.1070 |
|
Package wire defines the shared types for BONNIE's transport APIs.
|
Package wire defines the shared types for BONNIE's transport APIs. |
|
nats
Package nats defines the task protocol that channel/nats serves and client/nats speaks: the JSON messages, the subject rules, and the stream names.
|
Package nats defines the task protocol that channel/nats serves and client/nats speaks: the JSON messages, the subject rules, and the stream names. |
|
www
|
|
|
scripts/generate-og
command
Run from www with: go run ./scripts/generate-og Generate the shared social card from the BONNIE logo without external fonts.
|
Run from www with: go run ./scripts/generate-og Generate the shared social card from the BONNIE logo without external fonts. |