execute • AI Agent SDK

execute: Execute the async middleware chain.

execute

Async

Method

</div>

This is a method of the AsyncMiddlewareChain class in the middleware module.

Execute the async middleware chain.

Signature

python
async def execute(request: Any, final_handler: Callable) -> Any

Parameters

ParamField Any

The request object to pass through

ParamField Callable

The actual async operation to perform

Returns

ResponseField Any

The result from the chain

Uses

  • final_handler
  • build_chain
  • middleware
  • chain

Used By

Source

View on GitHub

praisonaiagents/hooks/middleware.py at line 163