custom-agent-api
Each agent basically just has CRUD endpoints. The run function here is the entrypoint when the run endpoint is hit. For the run endpoint, you pass arguments (via inputs field) which I typically have as function_name and function_input_data. So it's basically serverless - you can effectively create any "endpoint" you want for the agent. In the run function, you can instantiate your agent class and call methods from that class. You could think of each class method as an "endpoint". You could make it so that one of those methods handles webhooks.