builtin

package
v1.10.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 66 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BrowserCoreToolNames added in v1.10.1

func BrowserCoreToolNames() []string

BrowserCoreToolNames returns the browser tools for acting on a page: open, navigate, read the page, click, type, press a key, scroll, capture. About 1,100 tokens together.

func EnterpriseAgentDeferredToolNames added in v1.10.1

func EnterpriseAgentDeferredToolNames() []string

EnterpriseAgentDeferredToolNames returns the tools the enterprise agent can find with tool_search and then use. Use it as ClientConfig.MainAgentDeferredTools next to EnterpriseAgentToolNames as MainAgentTools.

func EnterpriseAgentToolNames added in v1.10.1

func EnterpriseAgentToolNames() []string

EnterpriseAgentToolNames returns the tools loaded at every request for a general agent in a company setting (the desktop application): the common core of GeneralAgentToolNames, the git worktree tools (they change the working folder of the session, which bash cannot) and a small set of browser tools to act on a page directly.

The browser tools not listed here, and many other tools, are in EnterpriseAgentDeferredToolNames: the agent finds them with tool_search when it needs them, so they cost nothing until then. A tool in neither list (publishing, outgoing messages, notebooks, market research...) is not offered to this agent at all and belongs to specialised agents. The classification and its reasons are in docs/reflexions/journal-engineering-2026/ inventaire-outils-et-agents-2026-10-17.md of the seshat-ai repository.

func GeneralAgentToolNames added in v1.8.0

func GeneralAgentToolNames() []string

GeneralAgentToolNames returns the tools a general-purpose agent is offered: the ones almost every session needs. Everything else stays registered, so a specialised agent (data analysis, browsing, automation...) or a sub-agent can still use it; it just does not cost the general agent's context.

The agent tools (agent, spawn_agent) are registered by the SDK once the engine exists, which is why they appear here without being in this package.

func NewBuiltinRegistry

func NewBuiltinRegistry() (*tool.Registry, error)

NewBuiltinRegistry creates a new registry with all built-in tools registered

func NewBuiltinRegistryWithConfig

func NewBuiltinRegistryWithConfig(config *Config) (*tool.Registry, error)

NewBuiltinRegistryWithConfig creates a new registry with all built-in tools registered for a host runtime.

func RegisterBuiltinTools

func RegisterBuiltinTools(reg *tool.Registry) error

RegisterBuiltinTools registers all built-in tools in the registry

func RegisterBuiltinToolsWithConfig

func RegisterBuiltinToolsWithConfig(reg *tool.Registry, config *Config) error

RegisterBuiltinToolsWithConfig registers all built-in tools in the registry for a host runtime.

Types

type Config

type Config struct {
	WorkingDir                 string
	UserID                     string
	PromptFn                   types.PromptFn
	EnablePromptReaderFallback bool
	InputReader                *bufio.Reader
	MCPManager                 *mcp.MCPClientManager
	BrowserManager             browsercore.Manager
	ArtifactStore              storage.ArtifactStore
	// RAGService enables the rag_search and rag_ingest tools when set.
	// When nil those tools register but always return a "not configured" error.
	RAGService *rag.Service
	// PlanStore enables the submit_plan tool when set.
	PlanStore PlanStore
	// LongTermMemory enables the memory_* tools when set.
	// Provide any implementation that satisfies longterm.Store when wiring the runtime.
	LongTermMemory longterm.Store

	// DocumentReaderURL is the base URL of a document-reader service. Used
	// to build the default DocumentConverter when that field is left nil.
	// When set, the read_file tool converts PDFs to structured markdown.
	// Example: "http://localhost:5001"
	DocumentReaderURL string

	// DocumentConverter, when set, is used instead of building a
	// service client from DocumentReaderURL. It backs read_file,
	// convert_document, and read_document_url, and takes precedence over
	// DocumentReaderURL.
	DocumentConverter documentreader.Converter

	// DocumentPageRenderer renders a specific document page as an image for
	// multimodal inspection tools such as render_document_page.
	DocumentPageRenderer pdfsmart.PageRenderer

	// ImageGenerator enables the generate_image tool when set.
	// Use imageproviders.NewOpenAI(apiKey) or imageproviders.NewGemini(apiKey)
	// from internal/image/providers to create a provider client.
	ImageGenerator image.Generation

	// TTSGenerator enables the text_to_speech tool when set.
	// Use audioproviders.NewOpenAITTS(apiKey) from internal/audio/providers.
	TTSGenerator tts.Generation

	// STTTranscriber enables the speech_to_text tool when set.
	// Use audioproviders.NewOpenAISTT(apiKey) from internal/audio/providers.
	STTTranscriber stt.SpeechToText

	// FIMCompleter enables the code_complete tool when set.
	// Use fimproviders.NewMistral(apiKey) or fimproviders.NewDeepSeek(apiKey)
	// from internal/fim/providers to create a provider client.
	FIMCompleter fim.Completer

	// AutomationServiceURL enables schedule_job and related tools when set.
	// Should point to the seshat-automation daemon, e.g. "http://localhost:8090".
	// When empty those tools register but return a "not configured" error.
	AutomationServiceURL string
	// AutomationAPIKey is the API key the tools use to authenticate with the daemon.
	AutomationAPIKey string

	// WebSearchKeys provides per-execution web search provider API keys.
	// When set, the web_search tool uses these explicit keys instead of reading
	// from the process environment — preventing key leakage across concurrent
	// jobs from different owners. Keys are keyed by provider name:
	// "tavily", "exa", "jina", "langsearch".
	WebSearchKeys map[string]string

	// ResearchKeys provides per-execution credentials for the research tools (Reddit, YouTube, Google
	// Places, Trustpilot). When set, only these keys are used and the process environment is not read,
	// so one organization's key cannot reach another's run. Keys are named reddit_client_id,
	// reddit_client_secret, youtube_api_key, google_places_api_key and trustpilot_api_key.
	ResearchKeys map[string]string

	// RequireSandbox makes the bash tool refuse to run commands when no
	// OS-level sandbox (currently: Landlock, Linux-only) is available on the
	// host, instead of silently falling back to unconfined execution.
	RequireSandbox bool

	// SandboxKind selects the OS-level sandbox backend the bash tool
	// attempts before falling back to Landlock/local. Empty preserves
	// today's behavior. sandbox.EnvironmentDocker routes execution through
	// a persistent Docker container — see SandboxDocker.
	SandboxKind sandbox.EnvironmentKind
	// SandboxDocker configures the Docker sandbox backend when SandboxKind
	// is sandbox.EnvironmentDocker. Zero value uses sandbox.DefaultDockerConfig().
	SandboxDocker sandbox.DockerExecutorConfig

	// EnableToolSearch keeps deferred tools (including MCP tools and any
	// tool registering with ShouldDefer) out of the model's initial tool
	// list; the model must call tool_search to discover and use them.
	// False (the default) keeps every tool visible from the start.
	EnableToolSearch bool
}

Config controls how builtin tools are assembled for a specific host runtime.

func DefaultConfig

func DefaultConfig() *Config

type PlanStore

type PlanStore interface {
	// CreateOrUpdate upserts a plan document by ID. If planID is empty a new document is created.
	CreateOrUpdate(ctx context.Context, planID, sessionID, userID, slug, filename, content string) (id string, version int, err error)
	// SetStatus updates a plan document's status (pending/validated/rejected).
	SetStatus(ctx context.Context, planID string, status string) error
}

PlanStore is the minimal interface the submit_plan tool needs to persist plan documents.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL