Skip to main content

Intent Quotes

When an agent receives an intent, it must first provide a quote for executing that intent. This quote includes the fees that will be charged for the execution.

Quote Response

interface QuoteResponse {
intentId: string; // UUID of the intent
agentFee: string; // Amount charged by the agent for execution
devFee: string; // Amount charged for development and maintenance
metadata?: {
// Optional metadata about the quote
estimatedTime?: string;
};
}

Example Usage

await myAgent.on("intent-quote", async (intent: Intent) => {
const quote: QuoteResponse = {
intentId: intent.id,
agentFee: 0.1, // 0.1 $SKAI
devFee: 0.02, // 0.02 $SKAI
metadata: {
estimatedTime: "30s",
},
};

return myAgent.respondWithQuote(quote);
});