vage

module
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2026 License: Apache-2.0

README

vage

Build codecov

A Go framework for building LLM-based intelligent agent systems.

Features

  • Composable Agents — TaskAgent (ReAct tool-calling), RouterAgent (routing), WorkflowAgent (DAG orchestration), and CustomAgent (user-defined)
  • DAG Orchestration — Parallel execution, loops, conditionals, compensation (Saga), checkpointing, backpressure, priority scheduling
  • Three-Level Memory — Working (request) → Session (conversation) → Store (persistent), with context compression and token budgets
  • Security Guardrails — Prompt injection, content filter, PII, topic, length, and custom guards
  • LLM Middleware — Decorator chain: logging, circuit breaker, rate limiting, retry, timeout, cache, metrics
  • Tool System — Local functions, MCP remote tools, agent-as-tool, built-in bash tool with process isolation
  • Agent Skills — Compatible with the Agent Skills open standard
  • MCP Protocol — Client (consume external tools) and server (expose agent capabilities)
  • Evaluation — ExactMatch, Contains, LLMJudge, ToolCall, Latency, Cost evaluators
  • HTTP Service — REST endpoints for sync, streaming, and async agent execution

Installation

go get github.com/vogo/vage

Quick Start

package main

import (
	"context"
	"fmt"

	"github.com/vogo/vage/agent"
	"github.com/vogo/vage/schema"
)

func main() {
	a := agent.New("greeter", "Greeter", "A simple greeting agent",
		func(ctx context.Context, req *schema.RunRequest) (*schema.RunResponse, error) {
			return schema.TextRunResponse("Hello! How can I help you?"), nil
		},
	)

	resp, err := agent.RunText(context.Background(), a, "Hi")
	if err != nil {
		panic(err)
	}
	fmt.Println(resp)
}

License

Apache License 2.0 — see LICENSE.

Directories

Path Synopsis
Package largemodel provides middleware for aimodel.ChatCompleter, adding retry, caching, rate limiting, timeout, and logging capabilities.
Package largemodel provides middleware for aimodel.ChatCompleter, adding retry, caching, rate limiting, timeout, and logging capabilities.
mcp
security
credscrub
Package credscrub scans strings and JSON payloads for credentials (API tokens, access keys, private keys) and can redact or report them.
Package credscrub scans strings and JSON payloads for credentials (API tokens, access keys, private keys) and can redact or report them.
todo
Package todo implements the todo_write built-in tool: a session-scoped, in-memory task tracker that the LLM agent maintains during a multi-step task.
Package todo implements the todo_write built-in tool: a session-scoped, in-memory task tracker that the LLM agent maintains during a multi-step task.
toolkit
Package toolkit provides shared utilities for file tools, including path validation, atomic file writes, file locking, and edit snippet generation.
Package toolkit provides shared utilities for file tools, including path validation, atomic file writes, file locking, and edit snippet generation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL