agent-receipts/sdk-go
Go SDK for the Agent Receipts protocol — cryptographically signed audit trails for AI agent actions
Platform-specific configuration:
{
"mcpServers": {
"sdk-go": {
"command": "npx",
"args": [
"-y",
"sdk-go"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
<div align="center">
[](LICENSE) [](https://go.dev/)
Cryptographically signed audit trails for AI agent actions.
Spec • TypeScript SDK • Python SDK
</div>
---
go get github.com/agent-receipts/sdk-go| Package | Description | |---------|-------------| | receipt | Create, sign (Ed25519), verify, and hash-chain Action Receipts (W3C Verifiable Credentials) | | taxonomy | Built-in action type registry (15 types), tool call classification, custom mappings | | store | SQLite-backed receipt persistence, query, stats, and chain verification |
package main
import (
"fmt"
"log"
"github.com/agent-receipts/sdk-go/receipt"
"github.com/agent-receipts/sdk-go/store"
"github.com/agent-receipts/sdk-go/taxonomy"
)
func main() {
// Generate an Ed25519 key pair
kp, err := receipt.GenerateKeyPair()
if err != nil {
log.Fatal(err)
}
// Classify a tool call
mappings := []taxonomy.TaxonomyMapping{
{ToolName: "read_file", ActionType: "filesystem.file.read"},
}
class := taxonomy.ClassifyToolCall("read_file", mappings)
// Create an unsigned receipt
unsigned := receipt.Create(receipt.CreateInput{
Issuer: receipt.Issuer{ID: "did:agent:my-proxy"},
Principal: receipt.Principal{ID: "did:user:alice"},
Action: receipt.Action{Type: class.ActionType, RiskLevel: class.RiskLevel},
Outcome: receipt.Outcome{Status: receipt.StatusSuccess},
Chain: receipt.Chain{Sequence: 1, ChainID: "session-001"},
})
// Sign it
signed, err := receipt.Sign(unsigned, kp.PrivateKey, "did:agent:my-proxy#key-1")
if err != nil {
log.Fatal(err)
}
// Verify the Loading reviews...