Skip to main content
Agent RPC lets an agent ask its payload type container to perform an asynchronous, command-specific operation. The request arrives in a normal post_response message and the result is delivered in the callback’s next response.

Agent request

Add agent_rpc to a response for the task that owns the request:
arguments can be any JSON-compatible value. Mythic uses the task to route the request to the command’s payload type container and preserve callback/task correlation.

Python handler

Override agent_rpc on the command class:

Go handler

Register a payload-wide handler on the payload definition:
The Mythic sets callback_id and agent_task_id on the response. Handler code supplies only status and output.

Agent result

Mythic returns the asynchronous result in the normal responses array:
Treat output as an application-level response. Validate its shape on the agent and handle an error status without assuming tasking will also be present.