command
Version:
v1.1.60
Opens a new window with list of versions in this module.
Published: Jul 6, 2026
License: MIT
Opens a new window with license information.
Imports: 5
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 how to use the public agent package of VibeCoding to construct and run a basic AI agent with streaming outputs.
How it Works
The example utilizes the fluent Builder API provided by the agent package:
- It resolves a provider by name (
WithProviderByName), mapping to the built-in OpenAI implementation.
- It sets the desired model (
gpt-4o-mini) and mode (agent).
- It initializes the execution context in the current directory (
WithWorkDir).
- It calls
a.Run() which returns a channel of Event objects containing text/thinking streams, tool calls, results, and execution statuses.
How to Run
- Make sure you are in the root directory of the project.
- Set your OpenAI API key:
export OPENAI_API_KEY="your-api-key"
- Run the example:
go run example/simple_agent/main.go
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.