From e9bfaa34661d320fa506f364366e19bf60bdfcf6 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Wed, 8 Oct 2025 22:12:40 +0200 Subject: [PATCH] chore: docs Signed-off-by: Ettore Di Giacinto --- options.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/options.go b/options.go index c237307..8b31a49 100644 --- a/options.go +++ b/options.go @@ -70,6 +70,7 @@ var ( o.InfiniteExecution = true } + // EnableStrictGuidelines enforces cogito to pick tools only from the guidelines EnableStrictGuidelines Option = func(o *Options) { o.StrictGuidelines = true } @@ -100,30 +101,35 @@ func WithTools(tools ...Tool) func(o *Options) { } } +// WithStatusCallback sets a callback function to receive status updates during execution func WithStatusCallback(fn func(string)) func(o *Options) { return func(o *Options) { o.StatusCallback = fn } } +// WithGaps adds knowledge gaps that the agent should address func WithGaps(gaps ...string) func(o *Options) { return func(o *Options) { o.Gaps = append(o.Gaps, gaps...) } } +// WithContext sets the execution context for the agent func WithContext(ctx context.Context) func(o *Options) { return func(o *Options) { o.Context = ctx } } +// WithMaxAttempts sets the maximum number of execution attempts func WithMaxAttempts(i int) func(o *Options) { return func(o *Options) { o.MaxAttempts = i } } +// WithFeedbackCallback sets a callback to get continous feedback during execution of plans func WithFeedbackCallback(fn func() *Fragment) func(o *Options) { return func(o *Options) { o.FeedbackCallback = fn @@ -144,12 +150,16 @@ func WithToolCallResultCallback(fn func(Tool)) func(o *Options) { } } +// WithGuidelines adds behavioral guidelines for the agent to follow +// when to execute specific tools func WithGuidelines(guidelines ...Guideline) func(o *Options) { return func(o *Options) { o.Guidelines = append(o.Guidelines, guidelines...) } } +// WithMCPs adds Model Context Protocol client sessions for external tool integration +// when specified, the tools available in the MCPs will be available to the cogito pipelines func WithMCPs(sessions ...*mcp.ClientSession) func(o *Options) { return func(o *Options) { o.MCPSessions = append(o.MCPSessions, sessions...)