Elemm
HomeGuardianDocsBlogFAQ
Star on GitHub
HomeGuardianDocsBlogFAQ
Star on GitHub
Docs
Getting StartedWhat is Elemm?Core InstallationMCP Client SetupDocker Deployment
DashboardDashboard OverviewConfiguration ReferenceObservability ConsoleManifest DebuggerToken AnalyzerMCP Server ConfigurationSecurity PanelVault ManagerDashboard Settings
ProtocolThe Discovery ProtocolThe 9 Core ToolsSequence Engine & Data PipingResponse Hygiene
GatewayMulti-Protocol SupportSecurity (Guardian)Vault — AuthenticationProduction & VPS SecurityCLI Reference
DeveloperBuilding Landmark ServersExposing Landmark ServersSmartRepair & Error CodesPydantic & Smart UnboxingDeclarative YAML Configuration

SmartRepair & Error Codes

Structured error responses with repair instructions — so agents can self-correct.

Overview

The gateway never returns raw stack traces or cryptic HTTP errors. Every error is wrapped in a structured RepairResult containing:

  • message: A clear, human-readable explanation
  • remedy: Actionable instructions for the agent to self-correct
  • _DEBUG_ECHO: A forensic payload showing the exact request data (method, URL, parameters)

Error Examples

Namespace Called Instead of Action

When an agent tries to execute a landmark namespace directly (e.g., call_action(action="repos") instead of a specific tool):

json
{
  "status": "error",
  "_PROTOCOL_ERROR": "STRUCTURAL_ERROR",
  "message": "You called 'repos', but that is a functional area (Landmark), not an executable tool.",
  "remedy": "Use 'inspect_landmark(landmark_id=\"repos\")' to discover available actions."
}

Missing Required Parameters

json
{
  "status": "error",
  "_PROTOCOL_ERROR": "VALIDATION_FAILED",
  "message": "Missing required parameters: ['sector_id']",
  "remedy": "The tool requires these fields: ['sector_id']. Check technical signatures with 'inspect_landmark'.",
  "example": "call_action(action='status_summary', parameters={'sector_id': 'VALUE'})"
}

Fuzzy Matching on Typos

When an action ID is not found, the engine performs a fuzzy search (Levenshtein distance) and suggests the closest matches.


Complete Protocol Error Codes

CodeHTTP EquivalentDescription
PROTOCOL_VIOLATION—Agent attempted action before completing the handshake
ACCESS_DENIED403Blocked by Security Policy or remote API
AUTHENTICATION_FAILED401Missing or invalid API credentials
NOT_FOUND404Action or resource not found
VALIDATION_FAILED422Missing required parameters (caught locally)
BAD_REQUEST400Malformed request to the remote API
RATE_LIMIT_EXCEEDED429API rate limit hit
SERVER_ERROR500Remote API internal server error
REMOTE_ERROROtherUnmapped HTTP error from the remote API
PIPING_FAILED—Data piping reference could not be resolved
GRAPHQL_ERROR—GraphQL-specific query error
NESTING_REQUIRED—GraphQL field requires sub-field selection
TYPE_MISMATCH—GraphQL variable type does not match schema

Automatic Remote Error Translation

HTTP errors from the target API are automatically translated into structured Elemm errors:

json
{
  "status": "error",
  "_PROTOCOL_ERROR": "RATE_LIMIT_EXCEEDED",
  "message": "Remote server returned rate limit error (HTTP 429).",
  "remedy": "The remote system is throttled. Implement a delay or backoff before retrying."
}
TIP

When running in a sequence, the sequencer can use retryOn: ["RATE_LIMIT_EXCEEDED"] to automatically pause and retry.

Elemm Logo

The Landmark Manifest. Exposing system interfaces natively to AI agents.

Framework

HomeAboutGuardianDocumentation

Community

GitHubDiscordPyPI Package

Legal

Imprint (Legal Notice)Privacy Policy© 2026 Marc Stöcker
elemm.dev — Infrastructure for the Agentic Web.