FOnline Engine
Current master GitHub
Documentation Docs/en/reference/ai-control-protocol/methods.md

AiControl Methods

Generated reference. Do not edit directly. Update BuildTools/AiControlProtocol.json, then run python BuildTools/docs_ai_control_protocol.py --write.

Index Wire Methods Commands and events Security Integration and validation Canonical JSON Guide
Stable ID Method Params Result Contract Source
ai-control-protocol.method.auth auth {token: string} {authorized: boolean} Authenticate the current connection with the configured shared token; a failed attempt leaves it unauthorized and a later attempt may succeed. Examples/AiControlSample/ai_control_sample.py
ai-control-protocol.method.ping ping {} {ok: true} Report bridge liveness after authorization. Examples/AiControlSample/ai_control_sample.py
ai-control-protocol.method.status status {} {running, host, port, queuedCommands, maxQueuedCommands, events, maxEvents, observationSeq, lastError} Return transport state, queue/event occupancy and limits, latest observation sequence, and the last bridge error. Examples/AiControlSample/ai_control_sample.py
ai-control-protocol.method.observe observe {} {observationSeq: integer, observation: object} Return the latest complete project-owned observation snapshot and its monotonically increasing replacement sequence. Examples/AiControlSample/ai_control_sample.py
ai-control-protocol.method.events events {afterSeq?: integer, limit?: integer} {latestSeq: integer, events: [{seq: integer, event: object}]} Return retained events with seq greater than afterSeq in ascending order; clamp limit to 1..500. Examples/AiControlSample/ai_control_sample.py
ai-control-protocol.method.act act project command object with non-empty type {accepted: true, commandSeq: integer} Enqueue one project-defined command and return its sequence; acceptance is not completion or gameplay success. Examples/AiControlSample/ai_control_sample.py
Start typing to search.