Browse documentation
aner.agent

Scientific agents in Aner

Review proposals, run predictions synchronously or asynchronously, and verify their receipts.

Released in Aner 0.1.2Aner 0.1.2 or newer

Import aner.agent when a scientist needs to control which prediction a model may request, when it may run and what evidence survives a restart. The building energy pilot joins a local language model to a fitted predictor. The model proposes an observation ID. The scientist authorizes it. The predictor computes the energy in kWh. This reference describes Aner 0.1.2 on macOS and Linux.

ModuleRole in the pilot
aner.agentRegister a read only Aner function, review a proposal, record a decision and hand a bounded approval to a specialist. Serve and call the prediction through MCP and verify a portable receipt.
aner.llmUse prediction_turn for the fixed observation tool or tool_turn for a registered prediction function. Inspect the returned model and typed arguments before dispatch.
aner.dataAssign row and building identities, partition by building and expose only the selected features for prediction.
aner.mlFit the scaler and predictive model on training buildings and calculate the measurement on the held out row.

Choose a workflow

Scientific taskNative entry points
Choose synchronous or asynchronous executionllm.prediction_turn_async, llm.tool_turn_async, run.step_async, task.ready, task.wait
Inspect a prediction and control its executionagent.start_run, agent.open_run, approve, deny, step, pause, resume, cancel, replay
Compare two models on unseen buildingsagent.register_tool, llm.tool_turn, agent.call_tool
Call an approved tool from an Aner notebookagent.serve_mcp, agent.mcp_prediction, agent.export_run, agent.verify_run
Delegate one approved observationdelegate_prediction, agent.open_delegation, predict_delegated, remaining_calls, replay_delegation, prediction_report

To inspect a run created by the building energy example, open an Aner notebook at the project root and run this cell.

aner
import aner.agent
let run = agent.open_run("energy-401.run")
print(run.row_id())
print(run.state())
print(run.replay())

For the public fixture the fitted model predicts 108 kWh for observation 401. A request for 402 under this approval returns a scope denial. See the language model reference for provider configuration.

See the complete callable index for the native module and method name catalogue.

Guides and references for aner.agent

Aner documentation · Reference and guides