Skip to content

Python API

Generated signatures of the public AQVEN Python package.

The names below come from aqven.__all__. Import them from aqven. Signatures reflect the installed package used to generate this page.

class AppAccess · aqven.app.local_app

  • def guard(self, app: 'ASGIApp') -> 'ASGIApp'

class AqvenClient · aqven.client.api

  • async def aclose(self) -> 'None'
  • async def start_run(self, request: 'RunStartRequest') -> 'RunStarted'
  • async def get_run(self, run_id: 'RunId') -> 'RunSnapshot'
  • async def list_runs(self, *, flow_id: 'str | None' = None, status: 'RunStatus | None' = None, assignee: 'str | None' = None, deadline_before: 'datetime | None' = None, overdue: 'bool | None' = None, since: 'datetime | None' = None, until: 'datetime | None' = None, sort: 'RunSort | None' = None, cursor: 'str | None' = None, limit: 'int' = 20) -> 'Page[RunSummary]'
  • async def get_execution(self, run_id: 'RunId', address: 'ExecutionAddress', *, include_payloads: 'IncludePayloads' = 'truncated') -> 'ExecutionDetail'
  • async def resume(self, run_id: 'RunId', request: 'ResumeRequest') -> 'ResumeResult'
  • async def fork(self, run_id: 'RunId', request: 'ForkRequest') -> 'RunForked'
  • async def cancel(self, run_id: 'RunId', reason: 'str') -> 'RunStatus'
  • async def series_start(self, request: 'SeriesStartRequest') -> 'SeriesStarted'
  • async def series_get(self, series_id: 'SeriesId', wait_seconds: 'int' = 0, include_cases: 'bool' = False) -> 'SeriesGetResult'
  • async def series_cancel(self, series_id: 'SeriesId', reason: 'str | None' = None) -> 'SeriesSummaryView'
  • async def upload_blob(self, data: 'bytes', media_type: 'str', name: 'str | None' = None) -> 'MediaValue'
  • async def download_blob(self, media: 'MediaValue') -> 'bytes'
  • async def run_events(self, run_id: 'RunId', *, after_seq: 'int' = 0) -> 'AsyncIterator[RunEvent]'

class CancelRequest · aqven.runtime.runs

FieldTypeRequiredDefault
reasonstringYes—

class CheckReport · aqven.check.report

FieldTypeDefault
diagnosticstuple[aqven.diagnostics.Diagnostic, ...]—
projectaqven.loader.project.LoadedProject | None—

class ExecutionAddress · aqven.runtime.address

FieldTypeRequiredDefault
node_idstringYes—
branch_keystring | nullYes—
iterationinteger | nullYes—
item_indexinteger | nullYes—

class FlowHandle · aqven.runtime.project

FieldTypeDefault
flow_idaqven.spec.names.FlowId—
input_modeltype[I]—
output_modeltype[O]—
projectForwardRef('Project', is_class=True, owner=<class 'aqven.runtime.project.FlowHandle'>)—
  • async def run(self, input: 'I', options: 'RunOptions | None' = None) -> 'RunResult[O]'
  • async def start(self, input: 'I', options: 'RunOptions | None' = None) -> 'Run[O]'

class HumanWait · aqven.runtime.human

FieldTypeRequiredDefault
addressExecutionAddressYes—
wait_kind'form' | 'tool_approval'Yes—
attemptintegerYes—
state'waiting' | 'resolved' | 'timed_out'Yes—
assigneestringYes—
waiting_sincestringYes—
deadline_atstringYes—
on_timeout'fail' | 'default' | 'escalate'Yes—
form_type_idstringYes—

class HumanWaitDetail · aqven.runtime.human

FieldTypeRequiredDefault
addressExecutionAddressYes—
wait_kind'form' | 'tool_approval'Yes—
attemptintegerYes—
state'waiting' | 'resolved' | 'timed_out'Yes—
assigneestringYes—
waiting_sincestringYes—
deadline_atstringYes—
on_timeout'fail' | 'default' | 'escalate'Yes—
form_type_idstringYes—
form_schemaJsonObjectYes—
suspend_dataValueRef | nullYes—
attemptsHumanWaitAttempt[]Yes—
resolved_bystring | nullYes—
answer_refValueRef | nullYes—
ignored_answersIgnoredAnswer[]Yes—

class LocalAppOptions · aqven.app.local_app

FieldTypeDefault
studiobool | NoneNone
hoststr | NoneNone
portint | NoneNone
api<class 'bool'>True
mcp<class 'bool'>True
chat<class 'bool'>True
watch<class 'bool'>True
accessaqven.app.local_app.AppAccess | Nonefactory
data_dirpathlib.Path | NoneNone
studio_distpathlib.Path | NoneNone
dev_originstr | NoneNone
engineaqven.app.engine_host.EngineHost | NoneNone

class LocalTokenAccess · aqven.app.local_app

FieldTypeDefault
token<class 'str'>factory
port<class 'int'>0
dev_originstuple[str, ...]()
  • def policy(self) -> 'LocalAccessPolicy'
  • def guard(self, app: 'ASGIApp') -> 'ASGIApp'

class Project · aqven.runtime.project

FieldTypeDefault
root<class 'pathlib.Path'>—
reportForwardRef('CheckReport', is_class=True, owner=<class 'aqven.runtime.project.Project'>)—
  • def from_report(cls, report: 'CheckReport') -> 'Self'
  • def load(cls, root: 'Path') -> 'Self'
  • def from_package(cls, package: 'str') -> 'Self'
  • def flow(self, flow_id: 'str') -> 'FlowHandle[BaseModel, BaseModel]'
  • def flow_typed(self, flow_id: 'str', input_model: 'type[I]', output_model: 'type[O]') -> 'FlowHandle[I, O]'
  • def loaded_project(self) -> 'LoadedProject'
  • def engine(self) -> 'LocalEngine'
  • def compiled(self) -> 'CompiledProject'
  • def loaded_flow(self, flow_id: 'str') -> 'LoadedFlow'

class ProjectInvalid · aqven.runtime.project

class ResumeRequest · aqven.runtime.human

FieldTypeRequiredDefault
addressExecutionAddressYes—
attemptintegerYes—
payloadJsonValueYes—
client_op_idstringYes—

class ResumeResult · aqven.runtime.human

FieldTypeRequiredDefault
outcome'accepted' | 'replayed' | 'sent'Yes—
status'queued' | 'running' | 'suspended' | 'completed' | 'failed' | 'cancelled'Yes—
addressExecutionAddressYes—
attemptintegerYes—

class Run · aqven.runtime.project

FieldTypeDefault
run_idaqven.runtime.address.RunId—
output_modeltype[O]—
engineForwardRef('LocalEngine', is_class=True, owner=<class 'aqven.runtime.project.Run'>)—
  • async def status(self) -> 'RunStatus'
  • async def waits(self) -> 'tuple[HumanWait, ...]'
  • async def wait_detail(self, address: 'ExecutionAddress') -> 'HumanWaitDetail'
  • async def resume(self, request: 'ResumeRequest') -> 'ResumeResult'
  • def events(self, after_seq: 'int' = 0) -> 'AsyncIterator[RunEvent]'
  • async def result(self) -> 'RunResult[O]'
  • async def cancel(self, reason: 'str') -> 'RunStatus'
  • async def fork(self, from_address: 'ExecutionAddress') -> 'Run[O]'

class RunContext · aqven.runtime.options

FieldTypeRequiredDefault
datestring | nullNoNone
time_zonestring | nullNoNone
localestring | nullNoNone
tenant_idstring | nullNoNone

Type alias.

def RunId(x, /)

NewType creates simple unique types with almost zero runtime overhead.

class RunOptions · aqven.runtime.options

FieldTypeDefault
modeRunMode'live'
contextaqven.runtime.options.RunContext | NoneNone
cassettesaqven.runtime.options.CassetteConfig | NoneNone
human_answerstuple[aqven.runtime.human.ScriptedAnswer, ...]()
limitsaqven.spec.common.Limits | NoneNone
tool_httphttpx2.AsyncBaseTransport | NoneNone
mcp_stubstuple[aqven.runtime.replay.McpToolStub, ...]()
blobsaqven.runtime.steps.BlobStore | NoneNone
faultstuple[aqven.runtime.replay.ProviderFault, ...]()
modelsaqven.runtime.options.ModelProfile | NoneNone
outputstuple[aqven.runtime.overrides.NodeOutputOverride, ...]()

class RunResult · aqven.runtime.options

FieldTypeRequiredDefault
run_idstringYes—
status'queued' | 'running' | 'suspended' | 'completed' | 'failed' | 'cancelled'Yes—
outputBaseModel | nullYes—
errorRunError | nullYes—
cost_usdnumber | stringYes—
tokens_inintegerYes—
tokens_outintegerYes—

class RuntimeSettings · aqven.app.environment

FieldTypeDefault
studio<class 'bool'>True
host<class 'str'>'127.0.0.1'
port<class 'int'>5180
open_browser<class 'bool'>False

class ServerOptions · aqven.server.app

FieldTypeDefault
access_token<class 'str'>factory
portint | NoneNone
guard<class 'bool'>True
studio_distpathlib.Path | NoneNone
serve_studio<class 'bool'>True
serve_api<class 'bool'>True
dev_originstr | NoneNone
blob_directorypathlib.Path | NoneNone
watch<class 'bool'>True
watch_debounce_ms<class 'int'>250
mcp_urlstr | NoneNone
compileraqven.server.workspace.ProjectCompiler | NoneNone
environcollections.abc.Mapping[str, str]factory
shutdown_signalasyncio.locks.Event | NoneNone

def check_project(root: 'Path') -> 'CheckReport'

def create_app(root: 'Path', facade: 'EngineFacade', settings: 'SettingsStore', extra_routers: 'Sequence[APIRouter]' = (), *, options: 'ServerOptions | None' = None, extensions: 'ServerExtensions | None' = None, blobs: 'BlobFiles | None' = None, workspace: 'ProjectWorkspace | None' = None, series: 'SeriesJobs | None' = None, probes: 'StatusProbes | None' = None, writer: 'WriteService | None' = None) -> 'FastAPI'

def create_local_app(root: 'Path', options: 'LocalAppOptions | None' = None, environ: 'Mapping[str, str] | None' = None) -> 'FastAPI'

def create_mcp_server(root: 'Path', *, engine: 'EngineFacade | None' = None, write: 'bool' = True, python: 'str' = 'sys.executable') -> 'MCPServer'

def export_openapi(target: 'Path', app: 'FastAPI | None' = None) -> 'Path'

def load_project_env(root: 'Path', environ: 'MutableMapping[str, str] | None' = None) -> 'bool'

Load the project .env file into the environment of the process.

def local_app_lifespan(app: 'FastAPI') -> 'AsyncGenerator[None]'

def node_address(node_id: 'str', *, branch_key: 'str | None' = None, iteration: 'int | None' = None, item_index: 'int | None' = None) -> 'ExecutionAddress'

def openapi_text(app: 'FastAPI') -> 'str'

def runtime_settings(environ: 'Mapping[str, str] | None' = None, defaults: 'RuntimeSettings | None' = None) -> 'RuntimeSettings'