Navigation
API Reference
Complete reference for smf-forge agent types, configuration schema, and engine internals.
AgentConfig
| Field | Type | Default | Description |
|---|---|---|---|
| name | str | required | Unique agent identifier |
| type | str | "echo" | Agent type name (echo, http, shell, transform, or custom) |
| model | str | None | None | LLM model name (for http type) |
| provider | str | None | None | Provider identifier |
| base_url | str | None | None | API base URL (for http type) |
| api_key | str | None | None | API key (supports env var resolution) |
| system_prompt | str | "" | System prompt for the LLM |
| temperature | float | 0.7 | Sampling temperature |
| max_tokens | int | 4096 | Maximum response tokens |
| options | dict | {} | Type-specific configuration options |
Pipeline Step Configuration
| Field | Type | Required | Description |
|---|---|---|---|
| name | str | Yes | Unique step name (used as context key for downstream steps) |
| agent | str | Yes | Agent name reference from the agents section |
| prompt | str | No | Jinja2 template for the prompt. Context variables available. |
| depends_on | list[str] | No | List of step names this step depends on |
PipelineEngine
class PipelineEngine:
def __init__(self, fail_fast: bool = True, verbose: bool = False)
async def run(
self,
pipeline: dict, # Pipeline config with 'name' and 'steps'
agent_registry: dict, # Map of agent_name -> BaseAgent instance
initial_context: dict | None = None, # Optional initial context (e.g. {"prompt": "..."})
) -> PipelineResult
@dataclass
class PipelineResult:
pipeline_name: str
steps: list[StepResult]
total_duration_ms: float
success: bool
@property
def failed_steps -> list[StepResult]
@dataclass
class StepResult:
step_name: str
agent_name: str
status: StepStatus # PENDING | RUNNING | SUCCESS | FAILED | SKIPPED
output: Any
error: str | None
duration_ms: float
metadata: dict