examples/

directory
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: Apache-2.0

README

GoAgent Examples

This directory contains examples demonstrating the agent framework capabilities, organized by complexity level.

Structure

basic/ - Single-Feature Examples

Simple, focused examples demonstrating individual features:

  • Simple agent creation
  • Tool usage
  • Chain construction
  • Agent with memory
  • Ollama integration
  • Provider consistency
  • All supported providers
  • Smart Agent with Tools (NEW) - Time retrieval and API calls

Best for: First-time users, learning basics

advanced/ - Multi-Feature Examples

Examples combining multiple features:

  • Streaming execution
  • Multi-mode streaming
  • Observability integration
  • ReAct agents
  • Parallel execution
  • Tool runtime
  • Tool selector

Best for: Intermediate users, production patterns

integration/ - Full-System Examples

Complete system integration examples:

  • LangChain-inspired workflows
  • Multi-agent systems
  • Human-in-the-loop
  • Pre-configured agents

Best for: Advanced users, architecture reference

Running Examples

# Navigate to example directory
cd examples/basic/01-simple-agent/

# Run example
go run simple_agent.go

Prerequisites

  • Go 1.25.0+
  • Required dependencies installed (go mod download)
  • Environment variables configured (if needed)

Directories

Path Synopsis
observability command
react command
streaming command
tool-runtime command
tool-selector command
basic
01-simple-agent command
02-tools command
04-ollama-agent command
08-deepseek-agent command
Package main demonstrates using DeepSeek LLM provider with GoAgent
Package main demonstrates using DeepSeek LLM provider with GoAgent
09-deepseek-simple command
Package main demonstrates a simple DeepSeek agent implementation
Package main demonstrates a simple DeepSeek agent implementation
09-deepseek-simple/invokefast command
Package main demonstrates DeepSeek usage with GoAgent's InvokeFast optimization
Package main demonstrates DeepSeek usage with GoAgent's InvokeFast optimization
10-object-pooling command
Package main demonstrates the usage of GoAgent's object pooling for GC pressure reduction
Package main demonstrates the usage of GoAgent's object pooling for GC pressure reduction
integration
human-in-loop command
multiagent command
multiagent-nats command
llm
anthropic command
cohere command
huggingface command
kimi command
optimization
cot_vs_react command
hybrid_mode command
option_demo
final command
llm command
Package main demonstrates InvokeFast performance optimization
Package main demonstrates InvokeFast performance optimization
interactive command

Jump to

Keyboard shortcuts

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