run
Run the Box
The run
method serves as the core mechanism for interacting with a Scoopika box. It allows you to trigger the execution of agents within the box based on the provided inputs and session context.
How it works
When you run a box, first it selects what agents to execute from the available agents in the box. taking into consideration the current inputs and any historical context in the chat session.
If the LLM powering the box supports parallel function-calling, the box might actually select multiple agents for one run based on the context. the agents are executed in order one by one, and each agent will have access to the results of the previous agent.
Arguments
Takes one argument as an object with the following properties:
Specifies the input properties for the box run.
Inputs
object, but notice that the message
field is required for a box runAllows you to provide a Hooks object
to establish real-time communication channels with the box during its processing.
Response
The run method returns a Promise
that resolves to an array of BoxResponse
objects upon successful box run completion. Each object contains the agent’s name, generated response (always text-based), and other relevant information about the run.