sherpa_ai.runtime package
This package provides the runtime environment for executing agents and managing their interactions. See the tutorial: Asynchronous Execution and Multi-Agent for more details.
sherpa_ai.runtime.threaded_runtime module
-
class sherpa_ai.runtime.threaded_runtime.ThreadedRuntime(agent)[source]
Bases: ThreadingActor
-
on_receive(event)[source]
Handle incoming events with the agent.
- Parameters:
event (Event) – The event to handle.
- Returns:
The (future of) result of the event handling.
- Return type:
Any
-
wait()[source]
Wait for the agent to finish anything it is currently doing
- Returns:
True, the agent processes events in order
- Return type:
bool
Module contents
-
class sherpa_ai.runtime.ThreadedRuntime(agent)[source]
Bases: ThreadingActor
-
on_receive(event)[source]
Handle incoming events with the agent.
- Parameters:
event (Event) – The event to handle.
- Returns:
The (future of) result of the event handling.
- Return type:
Any
-
wait()[source]
Wait for the agent to finish anything it is currently doing
- Returns:
True, the agent processes events in order
- Return type:
bool