[`agentic_crew.runners.single_agent_runner`](#module-agentic_crew.runners.single_agent_runner)
Single-agent runner base class.
Single-agent runners execute simple, sequential tasks without multi-agent collaboration overhead. They’re ideal for:
- Quick file edits
- Code generation
- Local development
- Sequential workflows
Unlike multi-agent crews, single-agent runners:
- Take a single task string as input
- Execute in one pass without delegation
- Return results directly
- Have minimal configuration overhead
Module Contents
Section titled “Module Contents”Classes
Section titled “Classes”SingleAgentRunner | Base class for single-agent runners. |
|---|
class agentic_crew.runners.single_agent_runner.SingleAgentRunner
Section titled “class agentic_crew.runners.single_agent_runner.SingleAgentRunner”Bases: abc.ABC
Base class for single-agent runners.
Single-agent runners provide a simpler execution model than multi-agent crews. They execute a single task and return the result, without the complexity of agent collaboration, delegation, or hierarchical processes.
runner_name : str
Section titled “runner_name : str”‘single_agent’
abstractmethod run(task: str, working_dir: str | None = None, **kwargs: Any) → str
Section titled “abstractmethod run(task: str, working_dir: str | None = None, **kwargs: Any) → str”Execute a single task and return the result.
Args: task: The task to execute (e.g., “Add error handling to auth.py”). working_dir: Optional working directory for execution. **kwargs: Additional runner-specific parameters.
Returns: Task output as a string.
Raises: RuntimeError: If execution fails.
is_available() → bool
Section titled “is_available() → bool”Check if this runner is available (dependencies installed, etc.).
Returns: True if the runner can be used.
get_required_env_vars() → list[str]
Section titled “get_required_env_vars() → list[str]”Get list of required environment variables.
Returns: List of environment variable names required by this runner.