Skip to content
jwc1lovePublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Minimal Agent Scaffold (Go)

This repository is a tiny, dependency-free agent scaffold.

What is included

  • context_manager/manager.go: in-memory conversation context.
  • agent/base_agent.go: core loop (Model, Tool, ToolCall).
  • agent/agent.go: lightweight constructors and function tool helper.
  • agent/session_chat_conversations.go: minimal session wrapper and EchoModel demo.

Quick start

package main

import (
	"context"
	"fmt"
	"time"

	"pkg/agent"
)

func main() {
	a := agent.New(
		agent.EchoModel{},
		"You are a concise assistant.",
		agent.NewFuncTool("time_now", func(ctx context.Context, _ string) (string, error) {
			return time.Now().Format(time.RFC3339), nil
		}),
	)

	s := agent.NewSession("demo-session", a)
	reply, err := s.Chat(context.Background(), "/time")
	if err != nil {
		panic(err)
	}

	fmt.Println(reply)
}

Validation

go test ./...

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages