← ClaudeAtlas

integrate-arcjet-guard-agent-framework-golisted

Integrate Arcjet Guard into Microsoft Agent Framework for Go (github.com/microsoft/agent-framework-go). Wrap a functool or MCP tool with GuardTool, guard every tool an agent can see and screen inbound text with GuardMiddleware, or guard any Go function with arcjet.GuardAction. Use when asked to add Arcjet to a Go agent built on Microsoft Agent Framework, rate limit its tools, block prompt injection, or fail closed on tool calls. This is the Go framework, not the .NET or Python Microsoft Agent Framework.
arcjet/arcjet-plugin · ★ 1 · AI & Automation · score 80
Install: claude install-skill arcjet/arcjet-plugin
# Integrate Arcjet Guard into Microsoft Agent Framework for Go `github.com/arcjet/arcjet-go/agentframework` wraps the application's existing `arcjet.GuardClient`. Shared Guard fundamentals (client, rules, labels, decisions, capture) live in [../arcjet/references/guards_go.md](../arcjet/references/guards_go.md). Load that reference for anything that is not framework-specific. Three surfaces, one decision rule: - **Any Go function** → `arcjet.GuardAction` in the root module. No framework dependency. Returns `*arcjet.GuardDeniedError` or `*arcjet.GuardUnavailableError`. - **A `tool.FuncTool` you can name at wiring time** (from `functool.New`, `mcptool.ListTools`, or `agenttool.New`) → `agentframework.GuardTool`, or `GuardTools` for a list. The result is still a `tool.FuncTool`. - **An agent whose tools the model picks, or user text to screen** → `agentframework.GuardMiddleware` in `agent.Config.Middlewares`. This is the Go framework. The .NET and Python Microsoft Agent Framework implementations have no Arcjet adapter. Do not import `@arcjet/guard` or `arcjet.guard` here. ## Denials are tool results, never errors The framework replaces a tool error with `Error: Function failed.` and allows three consecutive rounds of failing tool calls before the fourth ends the run. `GuardTool` therefore returns `arcjet.GuardDenialResult` as a successful result. Do not "fix" this by returning an error, and do not set `IncludeDetailedErrors` to make errors carry the denial. ## Fa