Runner
The Runner encapsulates framework-specific execution strategies, providing a consistent interface for running agents across different frameworks. You can skip this section if you are not planning to contribute to Agent Kernel.
Overview
What is a Runner?
A Runner:
- Executes framework-specific agent logic
- Manages session state during execution
- Handles async/await execution patterns
- Provides consistent error handling
Runner Interface
from agentkernel.core import Runner, Session
class Runner(ABC):
def __init__(self, name: str):
self._name = name
@abstractmethod
async def run(self, agent: Any, session: Session, prompt: Any) -> Any:
"""Run the agent with the provided prompt"""
pass