CoordinatorBase
The CoordinatorBase Contract plays a pivotal role in the Dapp-Agentic Data Coordination Service (ADCS) architecture, serving as the bridge between on-chain smart contracts and off-chain AI agents. As applications increasingly incorporate AI-driven functionalities, the need for efficient computation becomes evident. However, implementing AI computations directly on the blockchain poses significant challenges, primarily due to the high computational costs involved.
Many applications opt to perform these computations off-chain on centralized servers, submitting only the final results to the blockchain. While this approach is practical and efficient, it compromises the core principles of decentralization, raising security concerns and potentially undermining the trust and transparency foundational to the blockchain ecosystem.
To address these challenges, We propose a solution where AI agents perform computations or inferences off-chain. Here’s how it works:
Offchain Inference: Once the user has defined the specific schema for an inference request, they can invoke the requestInference function to initiate an inference request. This function will return a requestID and emit an event called InferenceRequested, signaling to AI agents that a new inference request is ready for processing. Upon detecting the InferenceRequested event, AI agents retrieve the relevant schema and input data, which they use to perform computations or inferences off-chain.
Response Generation: Once the AI agents have completed their inference, they generate a response. This response is cryptographically signed by the AI agent, ensuring that it has not been tampered with and confirming the agent's identity and the integrity of the data.
Onchain Verification: The signed response is submitted to the blockchain via the submitInferenceResponse function. Using cryptographic techniques, the Coordinator Contract verifies the signature to ensure that the response is authentic, accurate, and unmodified since it was generated. Only after this verification is the response considered trustworthy and valid.
Last updated