Documentation
¶
Index ¶
- Variables
- func OnAfter[T AfterHookEvent](r *HookRegistry, hook AfterHookFunc[T])
- func OnBefore[T BeforeHookEvent](r *HookRegistry, hook BeforeHookFunc[T])
- func Stream(ctx context.Context, agent Agent, messages []Message, opts AgentOptions) iter.Seq2[StreamEvent, error]
- func WithHookRegistry(ctx context.Context, registry *HookRegistry) context.Context
- type AfterHookEvent
- type AfterHookFunc
- type AfterMessageAppendedHook
- type AfterModelInvokeHook
- type AfterStreamHook
- type AfterToolCallHook
- type AfterToolCycleHook
- type Agent
- type AgentOptions
- type BeforeHookEvent
- type BeforeHookFunc
- type BeforeModelInvokeHook
- type BeforeStreamEventHook
- type BeforeStreamHook
- type BeforeToolCallHook
- type BeforeToolCycleHook
- type Block
- type BlockType
- type ContextPlugin
- type ExponentialBackoff
- type FuncTool
- type FuncToolOptions
- type Hook
- type HookEvent
- type HookRegistry
- type InvokeResponse
- type JSONMarshaler
- type Media
- type MediaBlock
- type MediaDelta
- type MediaType
- type Message
- type Plugin
- type RetryPolicy
- type Role
- type StopReason
- type StreamEvent
- type StreamEventType
- type TextBlock
- type Tool
- type ToolConfirmationFunc
- type ToolConfirmationProvider
- type ToolResultBlock
- type ToolUseBlock
Examples ¶
Constants ¶
This section is empty.
Variables ¶
var ErrAbort = errors.New("bond: operation aborted by hook")
ErrAbort is returned by a before-hook to signal that the current operation should be cancelled. Use with Before* hooks to prevent execution.
var ErrContextOverflow = errors.New("bond: context overflow")
Sentinel error for context overflow
Functions ¶
func OnAfter ¶ added in v0.2.0
func OnAfter[T AfterHookEvent](r *HookRegistry, hook AfterHookFunc[T])
OnAfter registers an observer hook for the after-event type T. Observer hooks fire in registration order (FIFO). They cannot return errors and cannot interrupt the agent loop.
func OnBefore ¶ added in v0.2.0
func OnBefore[T BeforeHookEvent](r *HookRegistry, hook BeforeHookFunc[T])
OnBefore registers a gate hook for the before-event type T. Gate hooks fire in registration order (FIFO). Return ErrAbort or any error to prevent the guarded operation.
func Stream ¶
func Stream(ctx context.Context, agent Agent, messages []Message, opts AgentOptions) iter.Seq2[StreamEvent, error]
Stream runs the full agent loop: it streams from the provider, and when the model requests tool use, it executes the tools, appends results to the conversation, and re-invokes the provider. Events are yielded to the caller transparently across turns.
Example ¶
package main
import (
"context"
"fmt"
"github.com/nisimpson/bond"
"github.com/nisimpson/bond/bondtest"
)
func main() {
agent := &bondtest.Agent{
Events: bondtest.TextEvents("Bond", ". James ", "Bond."),
}
var text string
for event, err := range bond.Stream(context.Background(), agent, bond.TextPrompt("name?"), bond.AgentOptions{}) {
if err != nil {
panic(err)
}
if event.Type == bond.StreamEventTextDelta {
text += event.TextDelta
}
}
fmt.Println(text)
}
Output: Bond. James Bond.
func WithHookRegistry ¶ added in v0.9.0
func WithHookRegistry(ctx context.Context, registry *HookRegistry) context.Context
WithHookRegistry attaches a HookRegistry to the context. Agent implementations (graphs, swarms) can retrieve it to fire custom events.
Types ¶
type AfterHookEvent ¶ added in v0.2.0
type AfterHookEvent interface {
HookEvent
AfterHookEvent() // marker method
}
AfterHookEvent is implemented by observer hooks that fire after an operation. Observer hooks are informational — their handlers cannot return errors and cannot interrupt the agent loop.
type AfterHookFunc ¶ added in v0.2.0
type AfterHookFunc[T AfterHookEvent] func(context.Context, T)
AfterHookFunc is a handler for after (observer) events. It receives the concrete event type and cannot return an error — observer hooks are fire-and-forget.
func (AfterHookFunc[T]) NotifyHookEvent ¶ added in v0.2.0
func (fn AfterHookFunc[T]) NotifyHookEvent(ctx context.Context, event HookEvent) error
NotifyHookEvent implements Hook. Always returns nil since after-hooks cannot produce errors.
type AfterMessageAppendedHook ¶ added in v0.2.0
type AfterMessageAppendedHook struct {
Message Message
}
AfterMessageAppendedHook fires when a message is appended to conversation history.
func (*AfterMessageAppendedHook) AfterHookEvent ¶ added in v0.9.0
func (*AfterMessageAppendedHook) AfterHookEvent()
func (*AfterMessageAppendedHook) HookEvent ¶ added in v0.9.0
func (*AfterMessageAppendedHook) HookEvent()
type AfterModelInvokeHook ¶
type AfterModelInvokeHook struct {
Blocks []Block // assembled assistant content blocks
StopReason StopReason // why the model stopped
}
AfterModelInvokeHook fires after a provider Stream call has fully drained.
func (*AfterModelInvokeHook) AfterHookEvent ¶ added in v0.9.0
func (*AfterModelInvokeHook) AfterHookEvent()
func (*AfterModelInvokeHook) HookEvent ¶ added in v0.9.0
func (*AfterModelInvokeHook) HookEvent()
type AfterStreamHook ¶
type AfterStreamHook struct {
Messages []Message // full conversation history at completion
}
AfterStreamHook fires when the agent loop completes.
func (*AfterStreamHook) AfterHookEvent ¶ added in v0.9.0
func (*AfterStreamHook) AfterHookEvent()
func (*AfterStreamHook) HookEvent ¶ added in v0.9.0
func (*AfterStreamHook) HookEvent()
type AfterToolCallHook ¶
type AfterToolCallHook struct {
ToolUse *ToolUseBlock
Result *ToolResultBlock
}
AfterToolCallHook fires after a single tool execution completes.
func (*AfterToolCallHook) AfterHookEvent ¶ added in v0.9.0
func (*AfterToolCallHook) AfterHookEvent()
func (*AfterToolCallHook) HookEvent ¶ added in v0.9.0
func (*AfterToolCallHook) HookEvent()
type AfterToolCycleHook ¶
type AfterToolCycleHook struct {
Results []*ToolResultBlock
}
AfterToolCycleHook fires after all tool calls in a cycle complete.
func (*AfterToolCycleHook) AfterHookEvent ¶ added in v0.9.0
func (*AfterToolCycleHook) AfterHookEvent()
func (*AfterToolCycleHook) HookEvent ¶ added in v0.9.0
func (*AfterToolCycleHook) HookEvent()
type Agent ¶
type Agent interface {
// Stream sends the conversation messages to the model and returns
// an iterator of streaming events. The last message in the slice
// is treated as the current prompt; preceding messages are context.
Stream(ctx context.Context, messages []Message) iter.Seq2[StreamEvent, error]
}
Agent is the core interface for streaming LLM interactions.
type AgentOptions ¶
type AgentOptions struct {
Tools []Tool
Plugins []Plugin
MaxTurns int // max tool-use round-trips; 0 means unlimited
RetryPolicy RetryPolicy // retry on model invocation errors; nil means no retry
}
AgentOptions configures the agent loop.
type BeforeHookEvent ¶ added in v0.2.0
type BeforeHookEvent interface {
HookEvent
BeforeHookEvent() // marker method
}
BeforeHookEvent is implemented by gate hooks that fire before an operation. Gate hooks can return errors to prevent execution. Return ErrAbort to gracefully skip the operation, or any other error to halt with that error.
type BeforeHookFunc ¶ added in v0.2.0
type BeforeHookFunc[T BeforeHookEvent] func(context.Context, T) error
BeforeHookFunc is a handler for before (gate) events. It receives the concrete event type and may return an error to prevent the operation.
func (BeforeHookFunc[T]) NotifyHookEvent ¶ added in v0.2.0
func (fn BeforeHookFunc[T]) NotifyHookEvent(ctx context.Context, event HookEvent) error
NotifyHookEvent implements Hook.
type BeforeModelInvokeHook ¶
type BeforeModelInvokeHook struct {
Messages []Message // conversation state being sent to the model
Attempt int // 0 on first call, increments on retries
}
BeforeModelInvokeHook fires before calling the provider's Stream method. Return ErrAbort to skip the invocation, or any error to stop the loop.
func (*BeforeModelInvokeHook) BeforeHookEvent ¶ added in v0.9.0
func (*BeforeModelInvokeHook) BeforeHookEvent()
func (*BeforeModelInvokeHook) HookEvent ¶ added in v0.9.0
func (*BeforeModelInvokeHook) HookEvent()
type BeforeStreamEventHook ¶ added in v0.2.0
type BeforeStreamEventHook struct {
Event StreamEvent
}
BeforeStreamEventHook fires before each raw StreamEvent is processed. Return ErrAbort to stop consuming the stream.
func (*BeforeStreamEventHook) BeforeHookEvent ¶ added in v0.9.0
func (*BeforeStreamEventHook) BeforeHookEvent()
func (*BeforeStreamEventHook) HookEvent ¶ added in v0.9.0
func (*BeforeStreamEventHook) HookEvent()
type BeforeStreamHook ¶
type BeforeStreamHook struct {
Messages []Message
}
BeforeStreamHook fires before the agent loop begins. Return ErrAbort to cancel the stream, or any error to stop with that error.
func (*BeforeStreamHook) BeforeHookEvent ¶ added in v0.9.0
func (*BeforeStreamHook) BeforeHookEvent()
func (*BeforeStreamHook) HookEvent ¶ added in v0.9.0
func (*BeforeStreamHook) HookEvent()
type BeforeToolCallHook ¶
type BeforeToolCallHook struct {
ToolUse *ToolUseBlock
}
BeforeToolCallHook fires before a single tool is executed. Return ErrAbort or any error to skip this tool call and surface the error as a tool result to the model.
func (*BeforeToolCallHook) BeforeHookEvent ¶ added in v0.9.0
func (*BeforeToolCallHook) BeforeHookEvent()
func (*BeforeToolCallHook) HookEvent ¶ added in v0.9.0
func (*BeforeToolCallHook) HookEvent()
type BeforeToolCycleHook ¶
type BeforeToolCycleHook struct {
ToolCalls []*ToolUseBlock
}
BeforeToolCycleHook fires before the batch of tool calls begins. Return ErrAbort to skip the entire tool cycle, or any error to abort all tool calls with error results.
func (*BeforeToolCycleHook) BeforeHookEvent ¶ added in v0.9.0
func (*BeforeToolCycleHook) BeforeHookEvent()
func (*BeforeToolCycleHook) HookEvent ¶ added in v0.9.0
func (*BeforeToolCycleHook) HookEvent()
type Block ¶
type Block interface {
// contains filtered or unexported methods
}
Block is the interface satisfied by all content blocks.
type ContextPlugin ¶ added in v0.11.0
ContextPlugin is optionally implemented by plugins that need to inject values into the stream context. This is useful for request-scoped state like loggers, trace IDs, or session identifiers that should flow through the entire agent loop and be accessible from hooks and tools.
InitContext is called after Plugin.Init, so the plugin is fully set up (hooks registered) before it enriches the context.
type ExponentialBackoff ¶ added in v0.9.0
type ExponentialBackoff struct {
// MaxAttempts is the maximum number of retry attempts. Zero means no retries.
MaxAttempts int
// BaseDelay is the initial delay before the first retry. Defaults to 1s.
BaseDelay time.Duration
// MaxDelay caps the backoff duration. Defaults to 30s.
MaxDelay time.Duration
// Jitter adds randomness to the delay to avoid thundering herd.
Jitter bool
// ShouldRetryFunc optionally classifies errors. If nil, all errors are
// considered retryable. Return false to treat an error as terminal.
ShouldRetryFunc func(err error) bool
}
ExponentialBackoff is a RetryPolicy that uses exponential backoff with optional jitter. It retries all errors up to MaxAttempts times.
The delay for attempt n is: min(BaseDelay * 2^n, MaxDelay), with random jitter applied if Jitter is true.
func NewExponentialBackoff ¶ added in v0.9.0
func NewExponentialBackoff() *ExponentialBackoff
NewExponentialBackoff creates an ExponentialBackoff with sensible defaults: 3 max attempts, 1s base delay, 30s max delay, jitter enabled, all errors retryable.
func (*ExponentialBackoff) ShouldRetry ¶ added in v0.9.0
ShouldRetry implements RetryPolicy.
type FuncTool ¶
type FuncTool struct {
// contains filtered or unexported fields
}
FuncTool is a Tool implementation backed by a function. The zero value is not usable; create instances with NewFuncTool.
func (FuncTool) Description ¶
func (FuncTool) InputSchema ¶
func (FuncTool) OutputSchema ¶
type FuncToolOptions ¶
type HookEvent ¶
type HookEvent interface {
HookEvent() // marker method
}
HookEvent is the interface for all hook event types. Every hook event is either a BeforeHookEvent (gate) or AfterHookEvent (observer). Users may define custom hook events by implementing these interfaces and firing them through a HookRegistry.
type HookRegistry ¶
type HookRegistry struct {
// contains filtered or unexported fields
}
HookRegistry manages hooks keyed by event type.
func HookRegistryFromContext ¶ added in v0.9.0
func HookRegistryFromContext(ctx context.Context) *HookRegistry
HookRegistryFromContext retrieves the HookRegistry from a context. Returns nil if no registry is attached.
func (*HookRegistry) Notify ¶
func (r *HookRegistry) Notify(ctx context.Context, event HookEvent) error
Notify dispatches an event to all registered hooks for that event type. For before-events, all hooks are called and errors are joined. If any hook returns ErrAbort, the joined error will contain it. For after-events, hooks are called but errors are always nil (since AfterHookFunc cannot produce errors).
type InvokeResponse ¶
type InvokeResponse struct {
// Text is the concatenated text output from the agent.
Text string
// Media contains any media content produced by the agent.
Media []Media
// StopReason indicates why the agent stopped.
StopReason StopReason
}
InvokeResponse holds the collected result of a synchronous agent invocation.
func Invoke ¶
func Invoke(ctx context.Context, agent Agent, messages []Message, opts AgentOptions) (*InvokeResponse, error)
Invoke runs the full agent loop synchronously, collecting all streamed events into a single InvokeResponse. This is a convenience wrapper over Stream for cases where streaming is not needed.
Example ¶
package main
import (
"context"
"fmt"
"github.com/nisimpson/bond"
"github.com/nisimpson/bond/bondtest"
)
func main() {
agent := &bondtest.Agent{
Events: bondtest.TextEvents("Hello, ", "world!"),
}
resp, err := bond.Invoke(context.Background(), agent, bond.TextPrompt("hi"), bond.AgentOptions{})
if err != nil {
panic(err)
}
fmt.Println(resp.Text)
}
Output: Hello, world!
type JSONMarshaler ¶
type Media ¶
type Media struct {
// MIMEType is the media type (e.g. "image/png", "audio/wav").
MIMEType string
// Data is the raw bytes.
Data []byte
}
Media represents a complete piece of media content in a response.
type MediaBlock ¶
type MediaBlock struct {
Type MediaType
MIMEType string
Source io.Reader // content payload; wrap bytes with bytes.NewReader
SourceURI string // optional URI reference (e.g. S3 key, URL)
}
MediaBlock holds binary content (images, audio, video, documents).
type MediaDelta ¶
type MediaDelta struct {
// MIMEType is the media type (e.g. "image/png", "audio/wav").
MIMEType string
// Data is the raw bytes for this chunk.
Data []byte
}
MediaDelta represents a chunk of binary/media content in a stream.
type MediaType ¶
type MediaType string
MediaType describes the kind of binary content in a MediaBlock.
type Message ¶
type Message struct {
Role Role
Content []Block
// Metadata holds provider-specific annotations (reasoning traces,
// citations, guard content, cache points, etc.) that don't map
// universally across providers.
Metadata map[string]any
}
Message represents a single turn in a conversation.
func Conversation ¶
Conversation builds a message list from alternating user/assistant strings. The first string is user, second is assistant, third is user, etc. Useful for constructing few-shot examples or test fixtures.
func ImagePrompt ¶
ImagePrompt creates a user message with text and an image from a URI.
func MultiBlockPrompt ¶
MultiBlockPrompt creates a user message from arbitrary blocks.
func TextPrompt ¶
TextPrompt is a convenience helper that wraps a plain string into the []Message format expected by Agent.Stream.
type Plugin ¶
type Plugin interface {
// Name identifies the plugin (used for logging/debugging).
Name() string
// Tools returns the tools this plugin contributes to the agent loop.
Tools() []Tool
// Init registers hooks on the provided registry. Called once during
// stream setup before the loop begins.
Init(registry *HookRegistry)
}
Plugin bundles tools and hook registrations into a reusable unit.
func NewHooksPlugin ¶
func NewHooksPlugin(name string, onInit func(*HookRegistry)) Plugin
NewHooksPlugin creates a Plugin that registers hooks via the provided callback but does not contribute any tools. This is useful for cross-cutting concerns like logging, metrics, or guardrails that only need to observe or modify the agent loop through hooks.
func NewToolConfirmationPlugin ¶ added in v0.2.0
func NewToolConfirmationPlugin(provider ToolConfirmationProvider) Plugin
NewToolConfirmationPlugin returns a Plugin that intercepts BeforeToolCallHook and invokes the given provider before each tool execution. If the provider denies the call, the hook returns ErrAbort which causes the agent loop to skip the tool and return an error result to the model.
The provider is responsible for deciding which tools require confirmation. For example, it may allow all read-only tools unconditionally and only prompt for write operations.
type RetryPolicy ¶ added in v0.9.0
type RetryPolicy interface {
// ShouldRetry reports whether the error is retryable and, if so, how long
// to wait before the next attempt. attempt is 0-indexed (first retry is
// attempt 0, second is attempt 1, etc.). Return (0, false) to stop retrying.
ShouldRetry(err error, attempt int) (backoff time.Duration, retry bool)
}
RetryPolicy decides whether and how long to wait before retrying a failed model invocation. The agent loop consults this policy when the provider returns an error during streaming.
type StopReason ¶
type StopReason string
StopReason indicates why the model stopped generating.
const ( StopReasonEnd StopReason = "end" // natural end of response StopReasonToolUse StopReason = "tool_use" // paused to call a tool StopReasonLength StopReason = "length" // hit max token limit )
type StreamEvent ¶
type StreamEvent struct {
Type StreamEventType
// TextDelta is populated when Type == StreamEventTextDelta.
TextDelta string
// MediaDelta is populated when Type == StreamEventMediaDelta.
MediaDelta *MediaDelta
// ToolUse is populated when Type == StreamEventToolUse.
ToolUse *ToolUseBlock
// StopReason is populated when Type == StreamEventStop.
StopReason StopReason
// Metadata carries provider-specific event data (usage stats, trace IDs, etc.)
Metadata map[string]any
}
StreamEvent represents a single event in a streaming response.
type StreamEventType ¶
type StreamEventType string
StreamEventType identifies what kind of event was emitted during streaming.
const ( // StreamEventStart signals the beginning of the response stream. StreamEventStart StreamEventType = "start" // StreamEventTextDelta delivers an incremental chunk of text. StreamEventTextDelta StreamEventType = "text_delta" // StreamEventMediaDelta delivers a chunk of binary/media content. StreamEventMediaDelta StreamEventType = "media_delta" // StreamEventToolUse signals the model wants to invoke a tool. StreamEventToolUse StreamEventType = "tool_use" // StreamEventStop signals the response is complete. StreamEventStop StreamEventType = "stop" )
type Tool ¶
type Tool interface {
// Name is the tool identifier the model will reference.
Name() string
// Description helps the model decide when to use this tool.
Description() string
// InputSchema is the JSON schema describing expected input parameters.
InputSchema() json.Marshaler
// Run executes the tool and returns result blocks.
Run(ctx context.Context, input json.RawMessage) ([]Block, error)
}
Tool represents a tool the agent can invoke during streaming.
func NewFuncTool ¶
func NewFuncTool[In, Out any](fn func(context.Context, In) (Out, error), options FuncToolOptions) (Tool, error)
NewFuncTool creates a Tool backed by a typed function. The function's input is unmarshaled from JSON, and its output is marshaled back into a TextBlock. Returns an error if required options (Name, Description) or the handler are missing.
Example ¶
package main
import (
"context"
"encoding/json"
"fmt"
"github.com/nisimpson/bond"
"github.com/nisimpson/bond/bondtest"
)
func main() {
type AddInput struct {
A int `json:"a"`
B int `json:"b"`
}
type AddOutput struct {
Sum int `json:"sum"`
}
adder, _ := bond.NewFuncTool(
func(ctx context.Context, in AddInput) (AddOutput, error) {
return AddOutput{Sum: in.A + in.B}, nil
},
bond.FuncToolOptions{
Name: "add",
Description: "Adds two numbers",
},
)
// Simulate: model calls the tool, then responds with text
agent := &bondtest.Agent{
StreamFunc: bondtest.Sequence(
bondtest.ToolUseEvents(&bond.ToolUseBlock{
ID: "call_1",
Name: "add",
Input: json.RawMessage(`{"a":2,"b":3}`),
}),
bondtest.TextEvents("The sum is 5."),
),
}
resp, err := bond.Invoke(context.Background(), agent, bond.TextPrompt("add 2+3"), bond.AgentOptions{
Tools: []bond.Tool{adder},
})
if err != nil {
panic(err)
}
fmt.Println(resp.Text)
}
Output: The sum is 5.
func ToolsFromContext ¶
ToolsFromContext retrieves the tools available for the current invocation. Providers use this to include tool definitions in API requests. Returns nil if no tools are configured.
type ToolConfirmationFunc ¶ added in v0.2.0
type ToolConfirmationFunc func(ctx context.Context, toolUse *ToolUseBlock) (bool, error)
ToolConfirmationFunc adapts a plain function into a ToolConfirmationProvider.
func (ToolConfirmationFunc) ConfirmToolUse ¶ added in v0.2.0
func (f ToolConfirmationFunc) ConfirmToolUse(ctx context.Context, toolUse *ToolUseBlock) (bool, error)
ConfirmToolUse implements ToolConfirmationProvider.
type ToolConfirmationProvider ¶ added in v0.2.0
type ToolConfirmationProvider interface {
// ConfirmToolUse is called before each tool invocation. Return true to
// allow the call, or false to deny it. A denied call aborts with
// [ErrAbort] and surfaces an error result to the model.
ConfirmToolUse(ctx context.Context, toolUse *ToolUseBlock) (bool, error)
}
ToolConfirmationProvider decides whether a tool call should proceed. Implementations may prompt a user, check a policy, or consult an external service. The provider receives the full ToolUseBlock (tool name and input) and returns whether to allow or deny execution.
type ToolResultBlock ¶
type ToolResultBlock struct {
ToolUseID string
Name string // Name of the tool that produced this result.
Content []Block // typically TextBlock or MediaBlock
IsError bool
}
ToolResultBlock holds the response from a tool invocation.
type ToolUseBlock ¶
type ToolUseBlock struct {
ID string
Name string
Input json.RawMessage
}
ToolUseBlock represents the model requesting a tool invocation.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package agent provides utilities for using bond agents as tools, enabling sub-agent orchestration patterns.
|
Package agent provides utilities for using bond agents as tools, enabling sub-agent orchestration patterns. |
|
Package bondtest provides test utilities for the bond agent framework.
|
Package bondtest provides test utilities for the bond agent framework. |
|
extra
|
|
|
approval
Package approval provides human-in-the-loop approval gates for bond agents.
|
Package approval provides human-in-the-loop approval gates for bond agents. |
|
delegation
Package delegation enables transparent tool delegation between agents communicating over the A2A protocol.
|
Package delegation enables transparent tool delegation between agents communicating over the A2A protocol. |
|
guardrails
Package guardrails provides content filtering for bond agents.
|
Package guardrails provides content filtering for bond agents. |
|
guardrails/bedrock
Package bedrock provides a guardrails.ContentFilter backed by the Amazon Bedrock ApplyGuardrail API.
|
Package bedrock provides a guardrails.ContentFilter backed by the Amazon Bedrock ApplyGuardrail API. |
|
otel
Package otel provides an OpenTelemetry observability plugin for bond agents.
|
Package otel provides an OpenTelemetry observability plugin for bond agents. |
|
session
Package session provides persistent conversation state management and conversation trimming strategies for bond agents.
|
Package session provides persistent conversation state management and conversation trimming strategies for bond agents. |
|
slogger
Package slogger provides a structured logging plugin for bond agents.
|
Package slogger provides a structured logging plugin for bond agents. |
|
store/dynamostore
Package dynamostore provides DynamoDB-backed implementations of bond storage interfaces: session.Store, approval.Store, and agent.CheckpointStore.
|
Package dynamostore provides DynamoDB-backed implementations of bond storage interfaces: session.Store, approval.Store, and agent.CheckpointStore. |
|
internal
|
|
|
provider
|
|
|
acpproxy
Package acpproxy provides ACP (Agent Client Protocol) building blocks and a proxy client for connecting to external ACP-compatible agents.
|
Package acpproxy provides ACP (Agent Client Protocol) building blocks and a proxy client for connecting to external ACP-compatible agents. |
|
anthropic
Package anthropic provides a bond.Agent implementation backed by the Anthropic Messages API.
|
Package anthropic provides a bond.Agent implementation backed by the Anthropic Messages API. |
|
bedrock
Package bedrock provides a bond.Agent implementation backed by the Amazon Bedrock Converse streaming API.
|
Package bedrock provides a bond.Agent implementation backed by the Amazon Bedrock Converse streaming API. |
|
gemini
Package gemini provides a bond.Agent implementation backed by the Google Gemini Generative Language API.
|
Package gemini provides a bond.Agent implementation backed by the Google Gemini Generative Language API. |
|
internal/anthropic
Requirement: 2.1, 2.2, 2.3, 2.4, 2.5, 2.6 — map Bond messages to Anthropic format Requirement: 3.1, 3.2, 3.3 — map Bond tools to Anthropic tool definitions
|
Requirement: 2.1, 2.2, 2.3, 2.4, 2.5, 2.6 — map Bond messages to Anthropic format Requirement: 3.1, 3.2, 3.3 — map Bond tools to Anthropic tool definitions |
|
internal/gemini
Requirement: 7.1, 7.2, 7.3, 7.4 — map Bond messages and tools to Gemini format
|
Requirement: 7.1, 7.2, 7.3, 7.4 — map Bond messages and tools to Gemini format |
|
internal/openai
Requirement: 2.1, 2.2, 2.3, 2.4, 2.5, 2.6 — map Bond messages to OpenAI format Requirement: 3.1, 3.2, 3.3 — map Bond tools to OpenAI tool definitions
|
Requirement: 2.1, 2.2, 2.3, 2.4, 2.5, 2.6 — map Bond messages to OpenAI format Requirement: 3.1, 3.2, 3.3 — map Bond tools to OpenAI tool definitions |
|
ollama
Package ollama provides a bond.Agent implementation backed by OpenAI-compatible Chat Completions endpoints (Ollama, LiteLLM, vLLM).
|
Package ollama provides a bond.Agent implementation backed by OpenAI-compatible Chat Completions endpoints (Ollama, LiteLLM, vLLM). |
|
openai
Package openai provides a bond.Agent implementation backed by the OpenAI Chat Completions API (https://api.openai.com).
|
Package openai provides a bond.Agent implementation backed by the OpenAI Chat Completions API (https://api.openai.com). |
|
Package runtime provides protocol handlers for serving bond agents over A2A, HTTP, and MCP.
|
Package runtime provides protocol handlers for serving bond agents over A2A, HTTP, and MCP. |
|
acp
Package acp provides an ACP (Agent Client Protocol) handler that serves bond agents over JSON-RPC 2.0 via stdio or other transports.
|
Package acp provides an ACP (Agent Client Protocol) handler that serves bond agents over JSON-RPC 2.0 via stdio or other transports. |
|
agentcore
Package agentcore provides convenience constructors for running bond agents on AWS Bedrock AgentCore Runtime.
|
Package agentcore provides convenience constructors for running bond agents on AWS Bedrock AgentCore Runtime. |
|
Package toolmcp adapts MCP server tools for use in bond agent loops.
|
Package toolmcp adapts MCP server tools for use in bond agent loops. |
|
builtin
Package builtin provides a suite of reusable tools for Bond agents that cover common system interactions: shell command execution, HTTP fetching, file I/O, and environment variable access.
|
Package builtin provides a suite of reusable tools for Bond agents that cover common system interactions: shell command execution, HTTP fetching, file I/O, and environment variable access. |
|
registry
Package registry provides a plugin that exposes a large collection of tools through a stable 3-tool gateway: list_tools, describe_tool, use_tool.
|
Package registry provides a plugin that exposes a large collection of tools through a stable 3-tool gateway: list_tools, describe_tool, use_tool. |