Elemm
HomeDocsFAQ
Star on GitHub
HomeDocsFAQ
Star on GitHub
Docs
Getting StartedWhat is Elemm?Core InstallationMCP Client SetupDocker Deployment
PlatformDashboard & ObservabilityConfiguration Reference
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

Building Landmark Servers

Expose Python functions as semantic landmarks using simple decorators.

Overview

The AIProtocolManager (aliased as ElemmGateway) is your primary interface. It allows you to register Python functions as "Actions" within specific "Landmarks".


Defining Actions with Decorators

python
from elemm import AIProtocolManager, MetadataRegistry

registry = MetadataRegistry("landmarks.yaml")
manager = AIProtocolManager(registry=registry)

@manager.landmark("compute:toggle_power")
async def toggle_power(instance_id: str, state: str):
    """Control the power state of a virtual machine."""
    return {"status": "success", "instance": instance_id, "new_state": state}

Advanced Decorator Options (Remedies & Instructions)

You can pass extra metadata directly into the decorator to guide the AI when errors occur or when it inspects the landmark.

python
@manager.landmark(
    "compute:delete_instance",
    description="Deletes a virtual machine permanently.",
    remedy="If an instance is not found, use compute:list_instances to check available IDs.",
    instructions="ALWAYS prompt the user for confirmation before calling this tool.",
    method="DELETE"
)
async def delete_instance(instance_id: str):
    # Implementation...
    pass
  • remedy: A string that is dynamically attached to error responses (via the SmartRepair engine) if this tool fails. It guides the LLM on what to do next.
  • instructions: Behavioral guidelines injected when the agent inspects this landmark.
  • method: HTTP Method or operational mode (useful for security policies).
  • returns / response_schema: Explicit overrides for the return type if Pydantic isn't enough.
Elemm Logo

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

Framework

HomeAboutDocumentation

Community

GitHubDiscordPyPI Package

Legal

License: GPLv3© 2026 Marc Stöcker
elemm.dev — Infrastructure for the Agentic Web.