| title | Installation | ||||
|---|---|---|---|---|---|
| description | Set up AgenticGoKit and verify your development environment | ||||
| prev |
|
||||
| next |
|
Let's get AgenticGoKit installed and running on your system. This guide covers everything you need to start building AI agent systems.
By the end of this section, you'll have:
- AgenticGoKit CLI installed and working
- Go development environment verified
- LLM provider configured (OpenAI, Azure OpenAI, or local Ollama)
- Created and validated your first project
Before we begin, ensure your system meets these requirements:
- Operating System: Windows 10+, macOS 10.15+, or Linux (Ubuntu 18.04+, CentOS 7+)
- Go: Version 1.21 or later
- Memory: At least 4GB RAM (8GB recommended for local LLM usage)
- Disk Space: 2GB free space for tools and models
- Network: Internet connection for downloading dependencies and accessing cloud LLM providers
First, let's make sure Go is properly installed:
go versionYou should see output like:
go version go1.21.0 linux/amd64
If Go isn't installed or is an older version:
Windows:
- Download Go from golang.org/dl
- Run the installer and follow the prompts
- Restart your command prompt/PowerShell
macOS:
# Using Homebrew (recommended)
brew install go
# Or download from golang.org/dlLinux:
# Ubuntu/Debian
sudo apt update
sudo apt install golang-go
# CentOS/RHEL/Fedora
sudo dnf install golang
# or: sudo yum install golangThe AgenticGoKit CLI (agentcli) is your main tool for creating and managing agent projects.
go install github.com/kunalkushwaha/agenticgokit/cmd/agentcli@latestagentcli versionYou should see version information like:
agentcli version v0.3.0
Let's verify the main commands are available:
# Show help
agentcli --help
# List available templates
agentcli config template --list
# Show MCP commands
agentcli mcp --help::: tip Success Indicator If all commands show help text without errors, your CLI installation is working correctly! :::
AgenticGoKit supports multiple LLM providers. Choose the option that works best for you:
Pros: Reliable, high-quality responses, easy setup Cons: Requires API key and costs money per request
- Get an API key from OpenAI
- Set your environment variable:
Windows (PowerShell):
$env:OPENAI_API_KEY = "your-api-key-here"macOS/Linux (Bash):
export OPENAI_API_KEY="your-api-key-here"Pros: Enterprise features, data privacy, reliable Cons: Requires Azure subscription and setup
- Set up Azure OpenAI service in Azure portal
- Get your endpoint, API key, and deployment name
- Set environment variables:
Windows (PowerShell):
$env:AZURE_OPENAI_API_KEY = "your-api-key"
$env:AZURE_OPENAI_ENDPOINT = "https://your-resource.openai.azure.com/"
$env:AZURE_OPENAI_DEPLOYMENT = "your-deployment-name"macOS/Linux (Bash):
export AZURE_OPENAI_API_KEY="your-api-key"
export AZURE_OPENAI_ENDPOINT="https://your-resource.openai.azure.com/"
export AZURE_OPENAI_DEPLOYMENT="your-deployment-name"Pros: Free, private, works offline Cons: Requires more setup, uses local resources
- Install Ollama:
Windows:
- Download from ollama.ai
- Run the installer
macOS:
# Using Homebrew
brew install ollama
# Or download from ollama.aiLinux:
curl -fsSL https://ollama.ai/install.sh | sh- Start Ollama service:
# Start Ollama (runs in background)
ollama serve- Download a model:
# Download a lightweight model (recommended for getting started)
ollama pull gemma2:2b
# Or a more capable model (requires more memory)
ollama pull llama3.1:8b- Set environment variable:
export OLLAMA_HOST="http://localhost:11434"Let's verify everything works by creating a test project:
# Create a basic agent project
agentcli create test-project --template basic
# Navigate to the project
cd test-projectLook at what was created:
# List the files
ls -la
# View the main configuration
cat agentflow.tomlYou should see:
main.go- The main application entry pointagentflow.toml- Configuration file for your agentsgo.mod- Go module fileagents/- Directory containing agent implementations
agentcli validateYou should see:
Status: VALID
Configuration is correct and ready to use.
Let's run your first agent to make sure everything works:
# Run the agent with a simple message
go run . -m "Hello, can you introduce yourself?"Expected Output: You should see the agent respond with an introduction. The exact response will vary based on your LLM provider and model.
::: tip Success! If you see a response from your agent, congratulations! Your AgenticGoKit installation is working correctly. :::
Problem: The CLI isn't in your system PATH.
Solution:
- Make sure
$GOPATH/binis in your PATH - Check where Go installs binaries:
go env GOPATH - Add
$GOPATH/binto your PATH in your shell profile
Problem: Missing plugin imports in your Go code.
Solution: The generated projects include necessary imports, but if you see this error, ensure your main.go includes:
import (
_ "github.com/kunalkushwaha/agenticgokit/plugins/llm/openai"
_ "github.com/kunalkushwaha/agenticgokit/plugins/llm/ollama"
// ... other plugins
)OpenAI/Azure OpenAI:
- Verify your API key is correct
- Check your internet connection
- Ensure you have sufficient credits/quota
Ollama:
- Make sure Ollama service is running:
ollama serve - Verify the model is downloaded:
ollama list - Check the host URL is correct
If you see Go module errors:
# Clean module cache
go clean -modcache
# Re-download dependencies
go mod download✅ Installed AgenticGoKit CLI and verified it's working
✅ Configured an LLM provider for your agents to use
✅ Created your first project using the CLI
✅ Validated your setup by running a test agent
✅ Learned troubleshooting techniques for common issues
Now that AgenticGoKit is installed and working, let's understand what agents are and how they work in the AgenticGoKit framework.
→ Continue to Understanding Agents
::: details Quick Navigation
Previous: Getting Started - Tutorial overview and learning path
Next: Understanding Agents - Core concepts and mental models
Jump to: Your First Agent - Skip concepts and start building
:::
::: details Need More Help?
Still having issues? Here are additional resources:
- Troubleshooting Guide - Comprehensive problem-solving guide
- GitHub Discussions - Ask the community
- GitHub Issues - Report bugs
Want to contribute? Check out our Contributor Guide
Related Documentation:
- Core Concepts - Deep dive into AgenticGoKit architecture
- API Reference - Complete API documentation
- CLI Reference - Command-line interface guide
:::