command
Version:
v1.4.0
Opens a new window with list of versions in this module.
Published: Mar 12, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Simple Agent Example
This example demonstrates the basic usage of Agno-Go framework with an agent that can perform mathematical calculations using tools.
Prerequisites
- Go 1.21 or higher
- OpenAI API key
Setup
- Set your OpenAI API key:
export OPENAI_API_KEY="your-api-key-here"
- Run the example:
go run main.go
Or build and run:
go build -o simple_agent
./simple_agent
What It Does
This example creates an agent that:
- Uses GPT-4o-mini model
- Has access to calculator tools (add, subtract, multiply, divide)
- Can execute multi-step calculations
- Automatically calls tools as needed
Expected Output
The agent will:
- Understand the mathematical query
- Call the
multiply tool with arguments (25, 4) → 100
- Call the
add tool with arguments (100, 15) → 115
- Return the final answer: "115"
Code Structure
- Model Setup: Creates OpenAI model instance
- Tools: Registers calculator toolkit
- Agent Creation: Configures agent with model, tools, and instructions
- Execution: Runs agent with user input and displays results
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.