← Back to Build Log
build-logengineeringintegrations

SDK wrapper patterns

Started designing how the SDK wraps existing agent frameworks. The goal is dead simple: if you are using LangChain or CrewAI or your own custom agent loop, adding Authensor should be a few lines of code. Not a rewrite. Not a new abstraction layer. A wrapper that intercepts tool calls and evaluates them.

The pattern that works best is a middleware approach. You wrap your tool executor with an Authensor check. Before any tool call goes through, the wrapper extracts the intent (what tool, what parameters, what context), sends it for evaluation, and either proceeds, routes to review, or blocks. The agent framework does not need to know Authensor exists.

Tested this against three different agent architectures and the wrapper pattern holds up. The tricky part is context extraction. Different frameworks represent tool calls differently, so the wrapper needs to normalize. Built adapters for the common ones and a generic fallback that works with any callable.

One design decision I am firm on: the SDK should never silently degrade. If the policy engine is unreachable, the wrapper blocks by default and raises an error. Not "allow because we could not check." The whole point is that unchecked actions do not happen.

The SDK needs to feel like a natural part of the agent framework. Not an external dependency that you are constantly working around.