ArmorIQ LogoArmorIQ SDK

Step verification failed

Ensure the action exists in the captured plan.

Step verification failed

Cause: Action not in original plan or Merkle proof invalid.

Solution:

# Ensure action is in the plan generated by LLM
captured = client.capture_plan(
    llm="gpt-4",
    prompt="Fetch data and analyze it"  # LLM will include both actions
)
token = client.get_intent_token(captured)["token"]

# This will work - action matches plan
result = client.invoke("data-mcp", "fetch_data", token, {})

# This will fail - action not in plan
result = client.invoke("data-mcp", "delete_data", token, {})  # ✗
import { ArmorIQClient, IntentMismatchException } from '@armoriq/sdk';

// Ensure action is in the plan you provide
const plan = {
  goal: 'Fetch data and analyze it',
  steps: [
    { action: 'fetch_data', mcp: 'data-mcp' },
    { action: 'analyze', mcp: 'analytics-mcp' }
  ]
};

const captured = client.capturePlan('gpt-4', 'Fetch data and analyze it', plan);
const token = await client.getIntentToken(captured);

// This will work - action matches plan
const result = await client.invoke('data-mcp', 'fetch_data', token, {});

// This will fail - action not in plan
try {
  await client.invoke('data-mcp', 'delete_data', token, {});  // ✗
} catch (error) {
  if (error instanceof IntentMismatchException) {
    console.error(`Action not in plan: ${error.action}`);
    console.error('You can only invoke actions that were in the original plan.');
  }
}

On this page