This tutorial shows how to configure a model, create a minimal VeADK Go agent, and run it from the command line or Web UI. The example uses the V2 module path.
Prerequisites
- You have completed Installation and installed
github.com/volcengine/veadk-go/v2 in your project.
- You have an API Key for Volcengine Ark or another OpenAI-compatible model service, and permission to call the selected model.
- The following commands use Bash or zsh. Run configuration and execution commands in the same terminal.
Create config.yaml in the project root with the model name and endpoint:
Then export the API Key in the current terminal:
provider: openai means the OpenAI-compatible protocol is used. Requests are sent to the model service configured by api_base. Replace the model name with one your account can call.
Write the Agent
Create main.go in the project root:
veagent.New(&veagent.Config{}) reads the model configuration you created earlier. launcher.Config uses a single agent and an in-memory session service. full.NewLauncher() provides command-line and Web UI entry points.
Run the Command-Line Entry Point
Run this command in the directory that contains main.go:
This command starts the ADK launcher command-line entry point. If the current launcher needs more arguments or subcommands, the terminal prints the available syntax. Follow that output to enter a prompt or choose a run mode.
When the model returns a non-empty answer, the model configuration and agent startup path are working.
Open the Web UI
The same main.go can start the ADK Web UI:
If the agent run may take longer, increase read and write timeouts:
Call the Runner Directly
If you do not need the launcher and want to call an agent from your own Go service, use the VeADK Go runner package:
RunText is useful for plain text input when you only need the final text response. For multimodal or multi-part input, use runner.UserParts, runner.UserBytes, or runner.UserURI to build the user message, then consume the event stream returned by Run.
Troubleshooting the First Run
Last modified on October 20, 2026