Documentation
¶
Overview ¶
Package zak provides the Go SDK for the Zeron Agentic Kit (ZAK), an open-source Agent Development Kit for building autonomous cybersecurity agents.
ZAK enables declarative agent definitions using the Universal Security Agent DSL (US-ADSL), runtime policy enforcement, structured audit logging, and LLM-powered autonomous reasoning via the ReAct pattern.
Installation ¶
go get github.com/securezeron/zeron-agent-development-kit/adk/go@latest
Quick Start ¶
Parse and validate an agent definition:
import "github.com/securezeron/zeron-agent-development-kit/adk/go/pkg/dsl"
result := dsl.LoadAgentYaml("my-agent.agent.yaml")
if !result.Valid {
log.Fatal(result.Errors)
}
agent := result.Agent
Evaluate policy at runtime:
import "github.com/securezeron/zeron-agent-development-kit/adk/go/pkg/policy"
engine := policy.NewEngine()
decision := engine.Evaluate(agent, "scan_code", "production", nil)
if decision.Allowed {
// proceed
}
Register a tool with automatic policy + audit integration:
import "github.com/securezeron/zeron-agent-development-kit/adk/go/pkg/tools"
scanTool := tools.NewZakTool(tools.ZakToolConfig{
Name: "scan_code",
Description: "Scan source code for vulnerabilities",
Execute: func(ctx context.Context, params map[string]any) (any, error) {
return map[string]any{"vulnerabilities": []any{}}, nil
},
})
Packages ¶
The SDK is organized into the following packages:
- pkg/dsl — US-ADSL schema, parser, and validation
- pkg/policy — Policy engine with 6-rule evaluation chain
- pkg/audit — Structured audit event logging (zerolog)
- pkg/edition — Edition detection (open-source vs enterprise)
- pkg/runtime — BaseAgent, AgentRegistry, AgentExecutor, LLMAgent
- pkg/tools — Tool substrate, built-in tools, orchestration
- pkg/llm — LLM client interface and provider registry
- pkg/sif/schema — Security Intelligence Fabric node and edge types
- pkg/sif/risk — Risk propagation engine
- pkg/tenants — Multi-tenant context and namespace isolation
CLI ¶
Install the CLI:
go install github.com/securezeron/zeron-agent-development-kit/adk/go/cmd/zak@latest
Available commands:
zak init --domain appsec --name my-agent # Scaffold agent YAML zak validate my-agent.agent.yaml # Validate agent definition zak run my-agent.agent.yaml # Execute agent zak agents # List registered agents zak info # Platform information
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
zak
command
Package main is the entry point for the ZAK CLI binary.
|
Package main is the entry point for the ZAK CLI binary. |
|
internal
|
|
|
cli
Package cli provides the ZAK CLI commands and domain templates for agent scaffolding.
|
Package cli provides the ZAK CLI commands and domain templates for agent scaffolding. |
|
pkg
|
|
|
audit
Package audit provides structured audit event logging for the ZAK Agent Development Kit.
|
Package audit provides structured audit event logging for the ZAK Agent Development Kit. |
|
dsl
Package dsl provides the Universal Security Agent DSL (US-ADSL) schema, parser, and validation for the ZAK Agent Development Kit.
|
Package dsl provides the Universal Security Agent DSL (US-ADSL) schema, parser, and validation for the ZAK Agent Development Kit. |
|
edition
Package edition provides edition detection for the ZAK Agent Development Kit.
|
Package edition provides edition detection for the ZAK Agent Development Kit. |
|
llm
Package llm provides the abstract LLMClient interface and shared response types.
|
Package llm provides the abstract LLMClient interface and shared response types. |
|
policy
Package policy provides the runtime policy engine for the ZAK Agent Development Kit.
|
Package policy provides the runtime policy engine for the ZAK Agent Development Kit. |
|
runtime
Package runtime provides the core agent lifecycle types: BaseAgent, AgentContext, and AgentResult.
|
Package runtime provides the core agent lifecycle types: BaseAgent, AgentContext, and AgentResult. |
|
sif
Package sif provides the Security Intelligence Fabric (SIF) for the ZAK Agent Development Kit.
|
Package sif provides the Security Intelligence Fabric (SIF) for the ZAK Agent Development Kit. |
|
sif/risk
Package risk implements the ZAK canonical risk propagation formula.
|
Package risk implements the ZAK canonical risk propagation formula. |
|
sif/schema
Package schema provides the canonical SIF (Security Intelligence Fabric) node and edge type definitions.
|
Package schema provides the canonical SIF (Security Intelligence Fabric) node and edge type definitions. |
|
tenants
Package tenants provides multi-tenancy support: TenantRegistry, TenantContext, and isolation utilities.
|
Package tenants provides multi-tenancy support: TenantRegistry, TenantContext, and isolation utilities. |
|
tools
Package tools provides the tool substrate for the ZAK Agent Development Kit.
|
Package tools provides the tool substrate for the ZAK Agent Development Kit. |
Click to show internal directories.
Click to hide internal directories.