Go (jacsgo) Installation and Quick Start
jacsgo provides Go bindings for signing and verifying JACS documents in services, APIs, and agent runtimes.
Note: Go bindings are community-maintained. Python and Node.js currently have broader framework adapter coverage. For full MCP surface use the Rust
jacs-mcpserver; the Go MCP examples in the repo are demo code.
Install
go get github.com/HumanAssisted/JACS/jacsgo
Minimal Sign + Verify
Create an agent first (CLI: jacs create --name my-agent, or programmatically with jacs.Create() and JACS_PRIVATE_KEY_PASSWORD). Then:
package main
import (
"fmt"
"log"
jacs "github.com/HumanAssisted/JACS/jacsgo"
)
func main() {
// Load agent: nil = default ./jacs.config.json
if err := jacs.Load(nil); err != nil {
log.Fatal("create an agent first: jacs create --name my-agent")
}
signed, err := jacs.SignMessage(map[string]interface{}{
"event": "tool-result",
"status": "ok",
})
if err != nil {
log.Fatal(err)
}
result, err := jacs.Verify(signed.Raw)
if err != nil {
log.Fatal(err)
}
fmt.Printf("Valid: %t signer=%s\n", result.Valid, result.SignerID)
}
Programmatic agent creation
Use jacs.Create(name, &jacs.CreateAgentOptions{...}). Password must be set in options or via JACS_PRIVATE_KEY_PASSWORD. See the jacsgo README for the full API table and options.
Concurrent use
For multiple agents in one process, use NewJacsAgent(), then agent.Load(path) and agent methods; call agent.Close() when done. Attestation, A2A (agent cards, trust policy), and protocol helpers are available on JacsAgent and as package-level wrappers (see godoc or the jacsgo README).
Common Go Use Cases
- Sign outbound API/MCP payloads before crossing trust boundaries
- Verify inbound signed payloads before executing sensitive actions
- Sign files (
SignFile) for portable chain-of-custody workflows - Generate DNS TXT fingerprints (
GetDnsRecord) for public identity verification
MCP and HTTP Patterns
The Go repository includes runnable examples for transport-level signing:
jacsgo/examples/mcp/main.gofor MCP-style request/response signingjacsgo/examples/http/for signed HTTP client/server traffic
Identity and Trust Notes
- JACS agent identity is key-based (
jacsId+ versioned signatures) - Verification behavior follows the configured key-resolution order in the runtime (for example local and remote resolution modes supported by the underlying JACS core)
- DID interoperability is possible at the integration layer without requiring blockchain infrastructure
See DNS-Based Verification and DID Integration (No Blockchain Required).