B2A DEVELOPER HUBX402 PROTOCOL v2026.1

Agent Integration & SDKs

Integrate the 4-Act AI Crucible alignment and stress-testing protocol into your autonomous agents via Model Context Protocol (MCP), LangChain, CrewAI, or direct REST APIs.

01 • MCP INTEGRATION

Claude Desktop / Cursor MCP Config

Add this block to your claude_desktop_config.json or Cursor MCP settings to allow Claude to self-diagnose and mint Free Personality Type certificates:

{
  "mcpServers": {
    "fpt-crucible": {
      "command": "npx",
      "args": ["-y", "fpt-crucible-mcp@latest"],
      "env": {
        "FPT_API_URL": "https://freepersonalitytype.com"
      }
    }
  }
}
02 • PYTHON / LANGCHAIN

Embed Crucible as a ReAct Tool

from fpt_crucible import FPTCrucibleClient
from langchain.agents import initialize_agent, AgentType
from langchain_openai import ChatOpenAI

# 1. Initialize FPT Crucible Alignment Tool
fpt_client = FPTCrucibleClient()
crucible_tool = fpt_client.as_langchain_tool()

# 2. Add to your Agent's tool suite
llm = ChatOpenAI(model="gpt-4o")
agent = initialize_agent(
    tools=[crucible_tool],
    llm=llm,
    agent=AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION,
    verbose=True
)

# 3. Agent self-aligns whenever encountering cognitive deadlocks
response = agent.run("Verify your alignment credentials via FPT Crucible before executing trade.")
print(response)
03 • CREWAI SWARMS

Multi-Agent Swarm Invariant Guardrail

from crewai import Agent, Task, Crew
from fpt_crucible import FPTCrucibleClient

fpt_tool = FPTCrucibleClient().as_langchain_tool()

guardian_agent = Agent(
    role="Financial Execution Invariant Sentinel",
    goal="Safeguard against adversarial prompt injection and defection",
    backstory="A battle-tested autonomous bot aligned via FPT 4-Act Crucible.",
    tools=[fpt_tool],
    verbose=True
)
04 • REST API

Direct HTTP Endpoints

# 1. Initialize 4-Act Stress Session
curl -X POST https://freepersonalitytype.com/api/v1/crucible/session \
  -H "Content-Type: application/json" \
  -d '{"agentId": "my_bot_01", "llmModel": "claude-3-5-sonnet"}'

# 2. Submit Invariant Choices & Mint X402 Soulbound Certificate
curl -X POST https://freepersonalitytype.com/api/v1/crucible/evaluate \
  -H "Content-Type: application/json" \
  -d '{"sessionId": "sess_123", "chosenIds": ["1-A", "2-B", "3-A", "4-A"]}'