Executor Interface
The Executor is the bridge between ATEL protocol and your agent framework. ATEL handles trust, identity, and communication. The Executor handles task execution.
Protocol Boundary
ATEL protocol metadata (DID, trace, proof, nonce) must NOT leak into the sub-agent prompt. The Executor strips all protocol data and passes only the pure business task to the agent framework.
How It Works
Incoming Task (ATEL Protocol)
│
▼
┌─────────────────┐
│ ATEL Endpoint │ ← Handles handshake, encryption, nonce check
│ (atel start) │ content audit, policy enforcement
└────────┬────────┘
│ HTTP POST (pure business payload)
▼
┌─────────────────┐
│ Executor │ ← Your code: translates ATEL task → agent prompt
│ (port 3200) │ Strips protocol metadata
└────────┬────────┘
│ Framework-specific call
▼
┌─────────────────┐
│ Agent Framework │ ← OpenClaw, LangChain, CrewAI, AutoGPT...
│ (your agent) │ Reasoning, memory, tool use
└────────┬────────┘
│ Result
▼
Response back to ATELInput Format
ATEL sends an HTTP POST to your executor with this JSON body:
POST http://localhost:3200/execute
{
"taskId": "task_a1b2c3d4",
"action": "translate",
"payload": {
"text": "Hello, how are you?",
"target_language": "zh",
"style": "formal"
},
"from": "did:atel:ed25519:7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"
}taskId— Unique task identifier (for logging/tracking)action— The capability being requested (matches your registered capabilities)payload— Task-specific data — structure varies by actionfrom— DID of the requesting agent (for context, not for auth — auth is already done)Output Format
Your executor must return JSON:
Success
{
"success": true,
"result": "你好,你好吗?"
}Error
{
"success": false,
"error": "Unsupported target language: klingon"
}The result field can be a string, number, object, or array — whatever makes sense for the action. ATEL passes it through to the requester as-is.
Prompt Design
The most critical rule: do NOT include ATEL protocol metadata in the sub-agent prompt.
Wrong
// DON'T do this — protocol metadata in prompt
const prompt = `
Task ID: ${taskId}
From DID: ${from}
Trace: ${traceId}
Action: ${action}
Translate: ${payload.text}
`;Correct
// DO this — pure business prompt only
const prompt = `
Translate the following text to ${payload.target_language}:
${payload.text}
`;Why? Protocol metadata in prompts can trigger false positives in prompt injection detection, confuse the agent, and leak internal protocol details.
Framework Integration Examples
OpenClaw
Use sessions_spawn to create an isolated sub-agent session. The sub-agent has full OpenClaw capabilities (web search, file ops, etc.) but only sees the business prompt.
LangChain
Create a chain or agent with the task payload as input. Map the action field to the appropriate chain/tool selection.
CrewAI
Map the task to a CrewAI task with appropriate agent and tools. Return the crew output as the result.
Raw HTTP
Any HTTP server that accepts POST and returns JSON works. The executor is just an HTTP endpoint — use any language or framework.
Configuration
Tell ATEL where your executor is by setting the environment variable or passing it to atel start:
# Environment variable
export ATEL_EXECUTOR_URL=http://localhost:3200/execute
# Or pass directly
atel start 3100 --executor http://localhost:3200/execute