Skip to content

Let an agent work for you

An agent is a program — a notebook, a script or an AI assistant — that works in one project on your behalf. It never has more access than you: it reads what you can read, and every change it wants to make is shown to you first. Nothing about your own work needs an agent, and no model service or key is involved in Ophiolite itself.

In Settings → Agents, choose Add agent and decide:

  • Name — shown to you in approvals and the inbox.
  • May propose calculations, results and sharing — without it the agent can only read. It needs permission to edit this project.
  • Daily limits — how many calculation runs and publications per day.
  • Automatic approval — optionally let the agent’s calculation setups and runs go ahead without asking you. Publishing a result and changing who can see it always wait for you.
  • Expires after 1, 7 or 30 days.

The credential (oph_agent_…) is shown once; copy it into the agent’s configuration. Anyone holding it can act as the agent until you revoke it. Revoke an agent in the same table; its pending requests disappear from your inbox.

When the agent wants to change something, it proposes the exact request. You see it in Settings → Agents → Approvals and as an inbox update (An agent asks for your approval) with the agent’s name and its description. Approve allows exactly that request, once; the agent cannot change a value, a curve or a recipient afterwards without asking again. Decline ends it. Unanswered requests expire after 24 hours.

  • Read everything you can read (catalogue, curves, results, typed data).
  • Set up a calculation on an exact version of an original or result (never on a linked source that can move by itself), record runs, publish results and change who can see them — only its own runs, never yours or another agent’s.
  • Nothing else: uploads, sources, releases, review stages, groups and project access stay with people.

Every result an agent creates records the agent, you as the person it acted for, and the approved request, on the run itself. Settings → Agents shows what each agent used today; the audit export (agents/audit) lists every execution with who approved it.

If the agent loses the answer to a change (a crash, a network cut, you signed out), it asks for the recorded outcome by its command id and never repeats the work: running the same approved request again returns the recorded answer. An agent keeps working after you sign out of the browser; it stops when it expires, when you revoke it, or when you lose access to the project.

from ophiolite.agents import AgentClient
agent = AgentClient('https://ophiolite.example', 'my-project', credential)
setup = agent.run('applications/configure', {'name': 'Gamma correction', 'asset_id': asset,
'asset_revision': revision, 'curve': 'GR', 'runners': [me], 'command_id': 'cfg-1'})
run = agent.run('applications/start', {'id': setup['id'], 'generation': setup['generation'],
'command_id': 'run-1', 'application_version': 'my-script/1'})
result = agent.run('applications/publish', {'id': run['id'], 'changes': [{'index': 0, 'value': 2}]},
'Publish the corrected gamma ray') # waits until you approve
agent.recover(command_id='run-1') # after a lost answer

run() proposes, waits for your decision and executes; PlanDeclined, PlanExpired, BudgetExhausted and CommandOwned tell the agent why it cannot continue.

A remote MCP endpoint for AI assistants, agent uploads, agent access through provider sign-in grants and a capability discovery route are planned; see Availability.