Documentation
¶
Overview ¶
Package smolagents provides a Go implementation of an AI agent framework.
This library offers a comprehensive framework for building AI agents with advanced reasoning capabilities, leveraging Go's type system and conventions.
The library provides: - Multi-step AI agents using the ReAct framework - Tool calling agents for function-based interactions - Code execution agents with sandboxed Go interpreter - Comprehensive tool ecosystem - Memory management for conversation history - Model abstractions for different LLM backends - Built-in monitoring and logging
Index ¶
- Constants
- Variables
- type ActionStep
- type AgentAudio
- type AgentConfig
- type AgentError
- type AgentExecutionError
- type AgentGenerationError
- type AgentImage
- type AgentLogger
- type AgentMaxStepsError
- type AgentMemory
- type AgentParsingError
- type AgentText
- type AgentToolCallError
- type AgentToolExecutionError
- type AgentType
- type AmazonBedrockModel
- type AudioData
- type AzureOpenAIServerModel
- type BaseMultiStepAgent
- type BaseTool
- type ChatMessage
- type ChatMessageStreamDelta
- type ChatMessageToolCall
- type FinalAnswerStep
- type FinalOutput
- type GenerateOptions
- type ImageURL
- type InferenceClientModel
- type JSONSchema
- type LiteLLMModel
- type LogLevel
- type MediaContent
- type MediaType
- type MemoryStep
- type Message
- type MessageRole
- type Model
- type ModelType
- type Monitor
- type MultiStepAgent
- type MultimodalMessage
- type MultimodalSupport
- type OpenAIServerModel
- type PlanningStep
- type PromptTemplates
- type ReactCodeAgent
- type ReactCodeAgentOptions
- type ResponseFormat
- type RunOptions
- type RunResult
- type SchemaValidator
- type StepCallback
- type StreamStepResult
- type StructuredGenerator
- type StructuredOutput
- type SystemPromptStep
- type TaskStep
- type Timing
- type TokenUsage
- type Tool
- type ToolCall
- type ToolCollection
- type ToolInput
- type TransformersModel
- type VideoData
Constants ¶
const Version = "1.18.0"
Variables ¶
var ( // Agent constructors NewBaseMultiStepAgent = agents.NewBaseMultiStepAgent NewReactCodeAgent = agents.NewReactCodeAgent DefaultReactCodeAgentOptions = agents.DefaultReactCodeAgentOptions CreateAgent = agents.CreateAgent DefaultAgentConfig = agents.DefaultAgentConfig // Model constructors NewInferenceClientModel = models.NewInferenceClientModel NewOpenAIServerModel = models.NewOpenAIServerModel NewAzureOpenAIServerModel = models.NewAzureOpenAIServerModel NewLiteLLMModel = models.NewLiteLLMModel NewAmazonBedrockModel = models.NewAmazonBedrockModel NewTransformersModel = models.NewTransformersModelImpl CreateModel = models.CreateModel AutoDetectModelType = models.AutoDetectModelType ValidateModelConfiguration = models.ValidateModelConfiguration GetModelInfo = models.GetModelInfo // Structured generation constructors NewSchemaValidator = models.NewSchemaValidator NewStructuredGenerator = models.NewStructuredGenerator CreateJSONSchema = models.CreateJSONSchema CreateToolCallSchema = models.CreateToolCallSchema CreateFunctionCallSchema = models.CreateFunctionCallSchema ParseStructuredOutput = models.ParseStructuredOutput GenerateStructuredPrompt = models.GenerateStructuredPrompt // Multimodal constructors NewMultimodalSupport = models.NewMultimodalSupport LoadImage = models.LoadImage LoadImageURL = models.LoadImageURL LoadAudio = models.LoadAudio LoadVideo = models.LoadVideo CreateText = models.CreateText CreateMessage = models.CreateMessage )
Constructor functions
Functions ¶
This section is empty.
Types ¶
type AgentToolExecutionError ¶
type AgentToolExecutionError = utils.AgentToolExecutionError
Error types
type AzureOpenAIServerModel ¶
type AzureOpenAIServerModel = models.AzureOpenAIServerModel
Model system
type BaseMultiStepAgent ¶
type BaseMultiStepAgent = agents.BaseMultiStepAgent
Core agent interfaces and types
type ChatMessageStreamDelta ¶
type ChatMessageStreamDelta = models.ChatMessageStreamDelta
Model system
type PromptTemplates ¶
type PromptTemplates = agents.PromptTemplates
Core agent interfaces and types
type ReactCodeAgentOptions ¶
type ReactCodeAgentOptions = agents.ReactCodeAgentOptions
Core agent interfaces and types
type StreamStepResult ¶
type StreamStepResult = agents.StreamStepResult
Core agent interfaces and types
Directories
¶
| Path | Synopsis |
|---|---|
|
Package agent_types provides types that can be returned by agents.
|
Package agent_types provides types that can be returned by agents. |
|
Package agents provides the core agent implementations for smolagents.
|
Package agents provides the core agent implementations for smolagents. |
|
Package default_tools provides built-in tools for smolagents.
|
Package default_tools provides built-in tools for smolagents. |
|
Package display provides beautiful CLI output formatting for smolagents
|
Package display provides beautiful CLI output formatting for smolagents |
|
Package executors provides code execution capabilities for smolagents.
|
Package executors provides code execution capabilities for smolagents. |
|
Package memory provides memory management for agent conversations and execution history.
|
Package memory provides memory management for agent conversations and execution history. |
|
Package models - AmazonBedrockModel implementation
|
Package models - AmazonBedrockModel implementation |
|
Package monitoring provides logging and monitoring capabilities for agent execution.
|
Package monitoring provides logging and monitoring capabilities for agent execution. |
|
Package tools - ToolCollection and Pipeline functionality
|
Package tools - ToolCollection and Pipeline functionality |
|
Package utils provides utility functions and error types for the smolagents library.
|
Package utils provides utility functions and error types for the smolagents library. |