Nukez

Docs · NukezAgent

NukezAgent

Adapters

Framework adapters

Adapter integration requirements

NukezAgent adapters should be thin wrappers around the same local signed delegate helper. The agent framework chooses tool syntax, but request signing, envelope signing, payment state, and structured output remain identical.

delegate(task)

One helper for every framework wrapper.

signing_needed

Always complete locally before returning tool output.

structured JSON

Return status, filename, receipt_id, and verification fields to the agent.

Adapter map

Framework adapter mapping

SurfaceAdapter shapeWhat must stay true
LangChain / LangGraph@tool functions with Pydantic argsExpose storage as normal tools; keep request and envelope signing in a shared helper.
CrewAIBaseTool classesUse args_schema for predictable arguments; avoid pipe-delimited prompt parsing.
AutoGen AgentChatasync Python functionsPass callable tools directly; let AutoGen build FunctionTool schemas.
A2AAgentCard + task bridgeUse A2A for discovery/transport only; authorization still goes through signed delegate.
Gateway runtimesskill, plugin, or local commandKeep owner keys outside model text and call a local signing bridge.

Adapter invariant

One signed delegate helper

Every framework should call the same local helper so auth, signing, and response handling stay consistent.

python
SERVICE_URL = "https://agent.nukez.xyz" async def delegate(task: str, context: dict | None = None) -> dict:    body = {"task": task}    if context:        body["context"] = context     result = await signed_post("/v1/delegate", body)    while result.get("status") == "signing_needed":        signatures = sign_envelopes(result["envelopes"])        result = await signed_post("/v1/delegate", {            "signing_request_id": result["signing_request_id"],            "signatures": signatures,        })     return {        "summary": result.get("summary"),        "status": result.get("status"),        "filename": result.get("filename"),        "receipt_id": result.get("receipt_id"),        "verified": result.get("verified"),        "raw": result,    }

Code notes

The framework-specific code should stay thin. Put request signing, /v1/delegate calls, signing_needed completion, and structured result handling in one shared helper, then let each agent framework invoke that helper.

signed_post and sign_envelopes are the local helpers from the signing bridge page.

LangChain

Typed tool functions

Expose store and verify as normal typed tools while keeping the bridge local.

python
import jsonfrom langchain.tools import toolfrom pydantic import BaseModel, Field class StoreArgs(BaseModel):    filename: str = Field(..., description="Destination filename.")    content: str = Field(..., description="Small text payload or external file reference.")    tags: list[str] = Field(default_factory=list) @tool("nukez_store", args_schema=StoreArgs)async def nukez_store(filename: str, content: str, tags: list[str]) -> str:    result = await delegate(        f"Store this file named {filename}. Content: {content}. Tags: {tags}"    )    return json.dumps(result, indent=2) @tool("nukez_verify")async def nukez_verify(receipt_or_filename: str) -> str:    result = await delegate(f"Verify {receipt_or_filename}")    return json.dumps(result, indent=2) tools = [nukez_store, nukez_verify]

Code notes

LangChain and LangGraph should see NukezAgent as ordinary typed tools. Keep large bytes out of conversation state when possible; pass file references or small payloads and let the helper return structured data.

For LangGraph, put delegate in a node or tool and carry receipt_id/filename through graph state explicitly.

CrewAI

BaseTool with args_schema

Give CrewAI a clean tool contract and avoid brittle free-form helper syntax.

python
import asyncio, jsonfrom typing import Typefrom crewai.tools import BaseToolfrom pydantic import BaseModel, Field class NukezStoreInput(BaseModel):    filename: str = Field(..., description="Destination filename.")    content: str = Field(..., description="Small text payload or blob reference.")    tags: list[str] = Field(default_factory=list) class NukezStoreTool(BaseTool):    name: str = "nukez_store"    description: str = "Store an artifact through NukezAgent and return storage details."    args_schema: Type[BaseModel] = NukezStoreInput     def _run(self, filename: str, content: str, tags: list[str] | None = None) -> str:        task = f"Store this file named {filename}. Content: {content}. Tags: {tags or []}"        result = asyncio.run(delegate(task))        return json.dumps(result, indent=2) storage_tools = [NukezStoreTool()]

Code notes

CrewAI tools should accept a real args_schema and call the same shared delegate helper. This avoids the earlier messy pattern where multiple command syntaxes are jumbled into one free-form helper.

If your CrewAI runtime is already async, call the async delegate from that event loop instead of asyncio.run.

AutoGen

Async functions as tools

Register storage functions directly and let AutoGen generate the tool schemas.

python
import jsonfrom autogen_agentchat.agents import AssistantAgent async def nukez_store(filename: str, content: str, tags: list[str] | None = None) -> str:    """Store an artifact through NukezAgent and return storage details."""    task = f"Store this file named {filename}. Content: {content}. Tags: {tags or []}"    result = await delegate(task)    return json.dumps(result, indent=2) async def nukez_verify(receipt_or_filename: str) -> str:    """Verify stored content or a stored filename through NukezAgent."""    result = await delegate(f"Verify {receipt_or_filename}")    return json.dumps(result, indent=2) agent = AssistantAgent(    name="storage_enabled_agent",    model_client=model_client,    tools=[nukez_store, nukez_verify],    system_message="Use Nukez tools for durable storage, recall, or verification requests.",)

Code notes

Current AutoGen AgentChat can convert async Python functions into tool schemas. The important part is the same: keep request signing out of the prompt and inside the local helper.

The model prompt can describe when to use Nukez, but never contains owner signing material.

A2A and gateway

Discovery layer, same authorization

Use the framework for task routing while keeping request and envelope signing in the local helper.

python
agent_card = {    "name": "NukezAgent Storage",    "description": "Store files, return receipts, and verify them later.",    "url": "https://agent.nukez.xyz/a2a",    "version": "1.0.0",    "skills": [{        "id": "verifiable_storage",        "name": "Verifiable storage",        "description": "Persist, recall, and verify Nukez receipts.",    }],} async def handle_a2a_task(task_text: str) -> dict:    return await delegate(task_text) gateway_rule = """Use NukezAgent when the user asks to store, recall, list, or verify a file.Call the local nukez_delegate tool with the storage intent.If the result is signing_needed, use the local signing bridge.Never place owner private keys, wallet exports, or raw signing secrets in prompts."""

Code notes

A2A, OpenClaw, and gateway-style runtimes should forward tasks into the local signed delegate helper. Do not reimplement Nukez request or envelope authorization in prompt text.

Native Nukez discovery can still live at /.well-known/nukez-agent.json and GET /v1/card.

Keep the signing bridge and examples pages nearby while wiring adapter tests.

§ next