Skip to content

Agent Base

osa_tool.osa_agent.base

BaseAgent

Bases: ABC

Base abstract class for all agents in the OSA workflow.

Each agent represents a single step in the overall pipeline (e.g. intent routing, planning, execution, review, finalization) and operates on a shared AgentContext and mutable OSAState.

__init__(context)

Initialize the agent with a shared execution context.

Parameters:

Name Type Description Default
context AgentContext

Shared context containing configuration, repository metadata, model handlers, and workflow utilities.

required

run(state) abstractmethod

Execute the agent's logic and return an updated state.

Parameters:

Name Type Description Default
state OSAState

Current workflow state.

required

Returns:

Type Description
OSAState

Updated workflow state after agent execution.