Skip to content

volcengine/veadk-go

Repository files navigation

Volcengine Agent Development Kit Logo

Volcengine Agent Development Kit

License

An open-source kit for agent development, integrated the powerful capabilities of Volcengine.

For more details, see our documents.

Installation

Before you start, make sure you have the following installed:

  • Go 1.24.4 or later
go get github.com/volcengine/veadk-go

Configuration

We recommand you to create a config.yaml file in the root directory of your own project, VeADK is able to read it automatically. For running a minimal agent, you just need to set the following configs in your config.yaml file:

model:
  agent:
    provider: openai
    name: doubao-seed-1-6-250615
    api_base: https://ark.cn-beijing.volces.com/api/v3/
    api_key: # <-- set your Volcengine ARK api key here

Have a try

Enjoy a minimal agent from VeADK:

package main

import (
	"context"
	"fmt"
	"log"
	"os"

	_ "github.com/volcengine/veadk-go/agent"
	veagent "github.com/volcengine/veadk-go/agent/llmagent"
	"google.golang.org/adk/agent"
	"google.golang.org/adk/cmd/launcher"
	"google.golang.org/adk/cmd/launcher/full"
	"google.golang.org/adk/session"
)

func main() {
	ctx := context.Background()
	veAgent, err := veagent.New(&veagent.Config{
		ModelExtraConfig: map[string]any{
			"extra_body": map[string]any{
				"thinking": map[string]string{
					"type": "disabled",
				},
			},
		},
	})
	if err != nil {
		fmt.Printf("NewVeAgent failed: %v", err)
		return
	}

	config := &launcher.Config{
		AgentLoader:    agent.NewSingleLoader(veAgent),
		SessionService: session.InMemoryService(),
	}

	l := full.NewLauncher()
	if err = l.Execute(ctx, config, os.Args[1:]); err != nil {
		log.Fatalf("Run failed: %v\n\n%s", err, l.CommandLineSyntax())
	}
}

Run your agent

1、Run with command-line interface

Run your agent using the following Go command:

go run agent.go

2、Run with web interface

Run your agent with the ADK web interface using the following Go command:

go run agent.go web api webui

If a large agent takes a long time to run, you can increase the timeout parameter.

go run agent.go web -read-timeout 3m -write-timeout 3m api webui

License

This project is licensed under the Apache 2.0 License.