Skip to content

vNext API Reference

Unified agent and workflow surface for AgenticGoKit

The core/vnext package delivers the next-generation agent runtime with a focused API surface, streamlined builder, and first-class integrations for memory, tools, MCP servers, and workflows. This is the recommended API for new projects, offering production-ready streaming, workflow orchestration, and comprehensive error handling.

📦 Package Overview

  • github.com/kunalkushwaha/agenticgokit/core/vnext: primary entry point
  • Consolidated interfaces: Agent, Workflow, ToolManager, Memory
  • Functional options and presets for rapid agent construction
  • Configuration loaders for single agents and multi-agent projects (TOML)
  • Streaming, detailed results, tracing, and error codes baked in

🧭 How to Use This Reference

TopicDocument
Core agent interface, results, run optionsagent.md
Streamlined builder & presetsbuilder.md
Configuration schemas & loadersconfiguration.md
Memory APIs, RAG helpers, sessionsmemory.md
Tool manager, MCP integration, cachingtools.md
Workflow orchestration & streamingworkflow.md
Streaming primitives & helpersstreaming.md

🚀 Quick Start

go
package main

import (
    "context"
    "log"

    "github.com/kunalkushwaha/agenticgokit/core/vnext"
)

func main() {
    // Quick agent creation
    agent, err := vnext.NewChatAgent("demo-bot")
    if err != nil {
        log.Fatal(err)
    }

    // Basic execution
    result, err := agent.Run(context.Background(), "Explain vnext workflows")
    if err != nil {
        log.Fatal(err)
    }

    log.Println("Response:", result.Content)
    
    // Streaming execution  
    stream, err := agent.RunStream(ctx, "Generate a detailed report")
    if err != nil {
        log.Fatal(err)
    }
    
    for chunk := range stream.Chunks() {
        if chunk.Type == vnext.ChunkTypeDelta {
            fmt.Print(chunk.Delta) // Real-time token display
        }
    }
    
    finalResult, _ := stream.Wait()
    log.Println("Final:", finalResult.Content)
}

Read the individual documents for advanced topics like memory enrichment, MPC discovery, workflow streaming, and detailed execution traces.

Released under the Apache 2.0 License.