Skip to content

zeekay/zap-go

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZAP Go

Go bindings for ZAP (Zero-Copy App Proto) - high-performance Cap'n Proto RPC for AI agents.

Installation

go get github.com/zap-protocol/zap-go

Usage

package main

import (
    "context"
    "log"

    zap "github.com/zap-protocol/zap-go"
)

func main() {
    // Connect to ZAP server
    client, err := zap.Connect("localhost:9999")
    if err != nil {
        log.Fatal(err)
    }
    defer client.Close()

    // List available tools
    tools, err := client.ListTools(context.Background())
    if err != nil {
        log.Fatal(err)
    }

    for _, tool := range tools {
        log.Printf("Tool: %s - %s", tool.Name(), tool.Description())
    }

    // Call a tool
    result, err := client.CallTool(context.Background(), "search", map[string]any{
        "query": "hello world",
    })
    if err != nil {
        log.Fatal(err)
    }
    log.Printf("Result: %s", result.Content())
}

Regenerating from Schema

# Install capnp compiler and Go plugin
go install capnproto.org/go/capnp/v3/capnpc-go@latest

# Generate Go code from schema
capnp compile -I$GOPATH/src/capnproto.org/go/capnp/std -ogo zap.capnp

Features

  • Zero-copy message passing via Cap'n Proto
  • Full ZAP protocol support (tools, resources, prompts)
  • MCP Gateway bridging
  • Post-quantum cryptography (ML-KEM, ML-DSA, Ringtail)
  • W3C DID support
  • Agent consensus voting

Related Packages

License

MIT

About

ZAP Go - Zero-Copy App Proto bindings for Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Cap'n Proto 45.6%
  • Go 27.2%
  • ZAP 27.2%