github.com/l1fe-labs/forge-go/agent
Go agent package.
Go agent package.
Package contract
| Field | Value |
|---|---|
| Language | go |
| Source version | module source snapshot |
| Manifest | forge-go/go.mod |
| Source files | 6 |
| Evidence | Source reference; registry publication and runtime conformance are separate checks |
Import boundary
import "github.com/l1fe-labs/forge-go/agent"Use a source checkout or your verified private registry. Manifest coordinates identify the package; they do not establish that a public registry release exists.
Source reference
Download package reference JSON. Each original source file and generated declaration artifact has its own SHA-256 digest. Function bodies and constant values are omitted from downloads. These are source declaration inventories, not compiler-resolved rustdoc, TypeDoc, DocC, or Dokka output. Private modules can contain public declarations that are not reachable through the package boundary; consult the entry point before importing.
agent.go
Read declaration text · 19 declaration entries
const DefaultMaxSteps;
type Agent interface
type AgentOutput struct
type AgentConfig struct
func (c *AgentConfig) EffectiveMaxSteps() int
func (c *AgentConfig) EffectiveTelemetry() core.TelemetryEmitter
func (c *AgentConfig) IsLegacyMode() bool
type AgentConfigBuilder struct
func NewAgentConfigBuilder() *AgentConfigBuilder
func (b *AgentConfigBuilder) Name(name string) *AgentConfigBuilder
func (b *AgentConfigBuilder) Model(model core.LanguageModel) *AgentConfigBuilder
func (b *AgentConfigBuilder) Tools(tools *tool.Registry) *AgentConfigBuilder
func (b *AgentConfigBuilder) MaxSteps(n int) *AgentConfigBuilder
func (b *AgentConfigBuilder) SystemPrompt(prompt string) *AgentConfigBuilder
func (b *AgentConfigBuilder) Identity(id *identity.ForgeAgentIdentity) *AgentConfigBuilder
func (b *AgentConfigBuilder) ACT(act *auth.ArsenalACT) *AgentConfigBuilder
func (b *AgentConfigBuilder) ApprovalHandler(handler core.ToolApprovalHandler) *AgentConfigBuilder
func (b *AgentConfigBuilder) Telemetry(emitter core.TelemetryEmitter) *AgentConfigBuilder
func (b *AgentConfigBuilder) Build() (*AgentConfig, error)loopcontrol.go
Read declaration text · 7 declaration entries
type StopCondition func(result *core.GenerateResult, step int) bool
// MaxStepsCondition creates a StopCondition that stops after n steps.
func MaxStepsCondition(n int) StopCondition
func MaxStepsCondition(n int) StopCondition
func MaxTokensCondition(maxTokens int64) StopCondition
func NoToolCallsCondition() StopCondition
func TextContainsCondition(substr string) StopCondition
func AnyStopCondition(conditions ...StopCondition) StopCondition
func AllStopConditions(conditions ...StopCondition) StopConditionmessaging.go
Read declaration text · 9 declaration entries
type ConversationBuilder struct
func NewConversation() *ConversationBuilder
func (b *ConversationBuilder) System(text string) *ConversationBuilder
func (b *ConversationBuilder) User(text string) *ConversationBuilder
func (b *ConversationBuilder) Assistant(text string) *ConversationBuilder
func (b *ConversationBuilder) ToolResult(result core.ToolResult) *ConversationBuilder
func (b *ConversationBuilder) Message(msg core.ModelMessage) *ConversationBuilder
func (b *ConversationBuilder) Build() []core.ModelMessage
func (b *ConversationBuilder) Count() intsubagent.go
Read declaration text · 2 declaration entries
type SubAgentConfig struct
func CreateSubAgent(parent Agent, config SubAgentConfig) (*ToolLoopAgent, error)toolloop.go
Read declaration text · 7 declaration entries
type ToolLoopAgent struct
func NewToolLoopAgent(config *AgentConfig) (*ToolLoopAgent, error)
func (a *ToolLoopAgent) Config() *AgentConfig
func (a *ToolLoopAgent) Health() *health.HealthProfile
func (a *ToolLoopAgent) Lifecycle() *health.LifecycleManager
func (a *ToolLoopAgent) Run(ctx context.Context, prompt string) (*AgentOutput, error)
func (a *ToolLoopAgent) RunWithMessages(ctx context.Context, messages []core.ModelMessage) (*AgentOutput, error)workflow.go
Read declaration text · 2 declaration entries
type WorkflowStep struct
func RunWorkflow(ctx context.Context, steps []WorkflowStep) (*AgentOutput, error)