Import these helpers from aqven.spec. How to write a step in Python shows complete files and when to use them.
def In(*, description: 'str', max_length: 'int | None' = None, max_items: 'int | None' = None, minimum: 'float | None' = None, maximum: 'float | None' = None, pattern: 'str | None' = None) -> 'Any'
def Out(*, description: 'str', max_length: 'int | None' = None, max_items: 'int | None' = None, minimum: 'float | None' = None, maximum: 'float | None' = None, pattern: 'str | None' = None) -> 'Any'
inference_spec
Section titled “inference_spec”def inference_spec(model: 'type[Inference]', *, description: 'str', prompt: 'str | None' = None, variants: 'Mapping[str, VariantSlot] | None' = None, allowed_sets: 'Sequence[AllowedSetSpec]' = (), examples: 'Sequence[ExampleSpec]' = (), checks: 'Sequence[CheckSpec]' = ()) -> 'InferenceSpec'
def llm(node_id: 'str', *, inference: 'str', agent: 'str', bind: 'Mapping[str, str]', description: 'str') -> 'LlmNode'
def code(node_id: 'str', fn: 'Callable[..., BaseModel]', *, bind: 'Mapping[str, str]', description: 'str') -> 'CodeNode'
def tool(node_id: 'str', *, tool: 'str', bind: 'Mapping[str, str]', description: 'str') -> 'ToolNode'
def flow(*, description: 'str', input: 'type[BaseModel]', output: 'type[BaseModel]', returns: 'Mapping[str, str]', nodes: 'Sequence[BuiltNode[NodeBase]]', context: 'Sequence[RunContextKey]' = (), limits: 'Limits | None' = None) -> 'Flow'
describe_annotation
Section titled “describe_annotation”def describe_annotation(annotation: 'object') -> 'tuple[TypeRef, Mapping[str, JsonValue]]'
Inference
Section titled “Inference”class Inference · aqven.spec.builder
class Flow · aqven.spec.builder
| Field | Type |
|---|---|
spec | <class 'aqven.spec.flow.FlowSpec'> |
nodes | collections.abc.Mapping[aqven.spec.names.NodeId, NodeSpec] |
BuiltNode
Section titled “BuiltNode”class BuiltNode · aqven.spec.builder
BuilderError
Section titled “BuilderError”class BuilderError · aqven.spec.builder