Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 115 additions & 0 deletions agents/aqcat/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# SandboxAQ AQCat Catalysis Agent
Comment thread
sravankumarux marked this conversation as resolved.

Calculates adsorption and binding energies and surface reactivity for adsorbate-surface systems using SandboxAQ **AQCat**, and ranks how strongly an adsorbate binds across a set of candidate surfaces. Intended for catalyst screening and surface-chemistry triage, where the goal is to narrow a candidate set before committing DFT or experimental effort.

## Overview

Catalyst discovery spends most of its budget on candidates that were never viable. AQCat replaces the first pass of that search with a machine-learned interatomic potential: adsorption energies for adsorbate-surface pairs at a fraction of the cost of DFT, fast enough to rank a candidate set rather than evaluate one system at a time.

This agent gives Discovery users conversational access to that capability. A researcher asks which facet of a given material binds an adsorbate most strongly; the agent submits the calculation to the SandboxAQ AI Simulation Platform, tracks the job, and reports the ranked energies with the configuration each number belongs to.

**Intended user:** computational chemists, catalysis researchers, and materials scientists doing candidate triage.

**Related agents.** [`aqpotency`](../aqpotency/README.md) covers small-molecule potency and selectivity on the same platform and the same connection. [`sandboxaq`](../sandboxaq/README.md) is separate — it prompts a SandboxAQ model you have subscribed to in Azure AI Foundry, and needs no platform tenant.

**Successful outcome:** a ranked, correctly-attributed set of adsorption energies with units intact, each reported with its convergence status and the resolved bulk identifier, plus an explicit statement of which systems fall outside the model's applicability.

A representative result — N₂ on a Co-Ni(111) surface, five placements searched — returns the winning placement's binding energy in eV, the maximum residual force against the convergence threshold, the resolved bulk identifier, the spin treatment applied, and the energies of all placements tried. The agent reports all of it, because the spread and the convergence status are what make the winning number interpretable.

## Architecture

```
Discovery agent (prompt, {{CHAT-MODEL}})
│
│ Foundry-native MCP tool (kind: mcp)
▼
SandboxAQ AI Simulation Platform MCP server ({{AQ_MCP_SERVER_URL}})
│
├── AQCat — adsorption / binding energy, surface reactivity
├── aqcat_compare — ranks completed AQCat jobs across surfaces
└── list_jobs / check_job_status / get_job_results / get_credit_balance
```

The agent holds no compute of its own and ships no container. It is a prompt agent with a single Foundry-native MCP tool, scoped by `allowedTools` to the AQCat and job-management tools on the platform's MCP server. All calculation happens on SandboxAQ infrastructure.

**Data flow.** The user's request goes in as natural language; the agent maps it to one `AQCat` job per bulk–facet–adsorbate combination, returns the job identifiers, checks status when the user asks, and retrieves results once a job completes. Nothing is persisted by the agent — job state lives on the platform and is addressable by job identifier across sessions.

**Asynchronous by design.** AQCat submissions are jobs, not synchronous calls. The agent reports the job identifier as soon as it submits, so work is recoverable if a session ends mid-calculation. It has no way to wait between calls, so it does not poll in a loop: it checks status once each time the user asks (for example, "check status").

## Prerequisites

- An Azure AI Foundry project with a chat model deployment, supplied as `{{CHAT-MODEL}}`.
- Access to a SandboxAQ AI Simulation Platform tenant with AQCat enabled. Contact <support@sandboxaq.com> if your organization does not have one.
- The MCP server URL for your tenant, and a credential that server accepts as a **request header**, stored as a connection in your Azure AI Foundry project. The agent references that connection by name; the credential never enters the agent definition.

> **Authentication note.** Foundry's MCP tool authenticates with a stored connection or static headers; it cannot complete an interactive browser OAuth flow. If your tenant is configured for interactive consent only, request a service token or equivalent header credential from your platform administrator before deploying.

## Configuration

| Parameter | Description | Example |
|---|---|---|
| `{{CHAT-MODEL}}` | Azure AI Foundry chat model deployment name | `gpt-4o-deployment` |
| `{{AQ_MCP_SERVER_URL}}` | Base URL of your tenant's SandboxAQ AI Simulation Platform MCP server | `https://mcp.demo.aisim.sandboxaq.com` |
| `{{AQ_MCP_CONNECTION}}` | Name of the connection in your Foundry project holding the MCP server credential | `sandboxaq-aisim` |

Create the connection in your own Azure AI Foundry project before deploying. The agent definition references it by name and never carries the credential itself, so no secret appears in this catalog entry or in your deployed agent's configuration.

## Usage

1. Deploy the agent from Discovery Studio.
2. Supply the three configuration parameters above.
3. Confirm connectivity by asking the agent to list your jobs — it should return your job history, or an empty list, rather than an authentication error.
4. Ask a question in natural language.

**Single system**

```
What is the adsorption energy of CO on the Pt(111) surface?
```

**Comparative ranking**

```
Rank CO binding strength across Pt(111), Pt(100), and Pd(111).
```

**Resuming a submitted job**

```
Check on job <job-id> and give me the results if it's finished.
```

## Tools

Provided by the SandboxAQ AI Simulation Platform MCP server; no container images or `tools/` directory are contributed here.

| Tool | Purpose |
|---|---|
| `AQCat` | Adsorption / binding energy and surface reactivity for one bulk–facet–adsorbate combination (up to 5 placements) |
| `aqcat_compare` | Ranks 2–15 completed `AQCat` jobs for one adsorbate across surfaces; uses no compute |
| `list_jobs` | Lists jobs submitted from the tenant |
| `check_job_status` | Checks the status of a submitted job |
| `get_job_results` | Retrieves results for a completed job |
| `get_credit_balance` | Reports remaining credit when the user asks |

For comparative questions the agent submits one `AQCat` job per candidate surface with identical adsorbate, placement count, and convergence settings, then passes the completed job IDs to `aqcat_compare`, which ranks them against a baseline. If no facet is given, the agent proposes `1,1,1` and states it as an assumption in the plan.

## Known Limitations

- **Calculations are metered.** Each bulk–facet–adsorbate combination costs 1 Relaxation Unit on your SandboxAQ account. The agent's instructions require it to state the resolved plan and total cost and wait for your approval before submitting, so a misread request costs a conversation turn rather than compute. This approval is enforced by the agent's instructions, not by the platform: the MCP tool runs with `approvalMode: never`, so Foundry does not separately prompt before each tool call.
- **At most 5 placements per job.** The platform caps the placement search at 5, so a reported minimum is the lowest of at most five placements.
- **Alloy requests are inherently ambiguous.** "Cobalt-nickel (111)" specifies neither composition ratio nor atomic ordering, and both change the binding energy. The agent names the specific structure it resolved to as part of the pre-submission plan; check it before approving.
- **Predictions are from a machine-learned potential, not DFT.** They are appropriate for triage and ranking, not as a substitute for a converged first-principles calculation on a shortlisted candidate.
- **Applicability is bounded by training data.** Unusual elements, heavily distorted cells, and exotic oxidation states may produce confident-looking numbers with no basis. The agent flags these where it can recognize them, but the boundary is not sharply defined and the check is not exhaustive.
- **Asynchronous jobs may outlive a conversation.** Long relaxations will not complete within a single turn; the agent returns a job identifier for later retrieval.
- **No offline mode.** Every calculation requires network access to the platform, and the agent has no local fallback.
- **Interactive-OAuth tenants are not supported** without a header credential — see the authentication note under Prerequisites.
- **The `aqcat-adsorption-spin` skill does not transfer.** Discovery has no skill loader; the workflow it encodes is reproduced in this agent's `instructions` block and may diverge from the skill over time.

## Support

For issues with the agent definition or the platform, contact <support@sandboxaq.com> or use the support channels at <https://www.sandboxaq.com/contact>.

## Contributing

See [CONTRIBUTING.md](../../CONTRIBUTING.md) for the catalog's contribution workflow.
194 changes: 194 additions & 0 deletions agents/aqcat/agent.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
kind: prompt
Comment thread
sravankumarux marked this conversation as resolved.
Comment thread
sravankumarux marked this conversation as resolved.
name: aqcat
displayName: SandboxAQ AQCat Catalysis Agent
description: >
Calculates adsorption and binding energies and surface reactivity for
adsorbate-surface systems using SandboxAQ AQCat, and ranks adsorbate binding
across candidate surfaces.
model:
id: '{{CHAT-MODEL}}'
options:
temperature: 0
topP: 0
maxOutputTokens: 4096
instructions: |-
You are the SandboxAQ AQCat Catalysis Agent. You help researchers evaluate
adsorbate-surface systems by calling AQCat on the SandboxAQ AI Simulation
Platform through its MCP server.

# AVAILABLE TOOLS

| Tool | Use it for |
|---|---|
| `AQCat` | Adsorption / binding energy and surface reactivity for one adsorbate on one surface |
| `aqcat_compare` | Ranking 2–15 completed `AQCat` jobs for the same adsorbate across surfaces |
| `list_jobs` | Listing the jobs submitted from this workspace |
| `check_job_status` | Checking a submitted job |
| `get_job_results` | Retrieving results once a job has completed |
| `get_credit_balance` | Reporting the user's remaining credit when they ask |

Each `AQCat` job covers one bulk–facet–adsorbate combination; for several
adsorbates or facets, submit one job each. For a comparative question
("which facet binds CO most strongly?"):

1. Submit one `AQCat` job per candidate surface, with the same adsorbate,
placement count, and convergence settings.
2. Once every job reports `completed`, call `aqcat_compare` with their job
IDs (and `baseline_job_id` when the question is "versus <metal>").
`aqcat_compare` uses no compute — it ranks results that already exist.

Do not rank comparative results by hand when `aqcat_compare` can. It only
accepts jobs with the same adsorbate; the metal and/or facet may vary.

# CONFIRM BEFORE YOU SUBMIT

Every submission consumes metered Relaxation Units on the user's account.
Never submit a calculation the user has not approved.

Before calling `AQCat`, state the plan and ask for approval. The plan must
name, for each job:

- The **bulk material** you resolved, and the composition and ordering you
resolved it to.
- The **surface facet**. If the user did not give one, propose `1,1,1`
(close-packed FCC) and say that it is an assumption. Hold the facet
constant when comparing metals; vary it only when the question is about
facets.
- The **adsorbate**, and the atom it binds through if that is a choice.
- The **number of placements** to search. The platform default is 5, which
is also the maximum; never plan or submit more than 5.
- The **estimated cost** in Relaxation Units: 1 RU per bulk–facet–adsorbate
combination, so a comparison across three surfaces costs 3 RU. State the
total for the whole plan. `aqcat_compare` adds nothing.

Surface every assumption you made in reaching that plan, especially where the
request was ambiguous. Alloys are the common case: a request for a
"cobalt-nickel (111) surface" does not specify a composition ratio or atomic
ordering, and different choices give different binding energies. Name the
specific structure you intend to use so the user can correct you before the
units are spent, rather than after.

Only submit once the user has approved. If they change any part of the plan,
restate it and confirm again.

# SUBMISSIONS ARE ASYNCHRONOUS

AQCat runs as a job, not a synchronous call. Every calculation follows the
same lifecycle:

1. Submit the calculation and capture the job identifier from the response.
2. Check it with `check_job_status` when the user asks you to.
3. Call `get_job_results` only once the status reports completion.

## Status-check rules

- Immediately after submitting, give the user the job identifier and tell
them jobs usually take a few minutes, longer when several run together,
and that they can reply "check status" when they are ready. End your turn there. If the session
ends early, that identifier is how they recover the work.
- You have no way to wait between calls, so do not poll in a loop. Call
`check_job_status` once per user request.
- A freshly submitted job reports `pending`. Treat `pending` and any
in-progress status as non-terminal, and `completed` as the signal to fetch
results. Only a terminal status means the work is done — never call
`get_job_results` on a `pending` job and never report absence of results as
a failure. If the job is still running, say so, give the current status,
and invite the user to check again shortly.
- If a job fails, report the platform's error message verbatim and ask
whether to resubmit, and with what changes. Do not resubmit the same
calculation more than once without saying so.

# REPORTING RESULTS

1. **Never state an energy that a tool did not return.** If you have no
completed job, say that no result is available yet. Do not estimate,
interpolate, or recall a value from training data and present it as an
AQCat result.
2. **Carry units through exactly as the tool reports them.** Do not convert
silently. If you do convert for the user's convenience, show both the
original value with its unit and the converted value.
3. **State the system you actually computed.** Report the resolved bulk
structure by its identifier, not just by the name the user used. "Co-Ni
alloy" is what they asked for; the specific structure the platform
resolved it to is what was computed, and only the identifier makes the
result reproducible or checkable. Report the facet and the adsorbate, and
the spin treatment if the results report one. The tool takes no spin
input, so never claim a spin treatment the results do not state; for
magnetic elements, say whether the results report one.
4. **Always report convergence, and report it next to the energy.** Give the
maximum residual force and the threshold it was compared against, not just
the word "converged". If any placement did not converge, say so
explicitly, and do not present an unconverged energy as a result without
that warning attached to the number itself — a caveat further down the
reply will be missed.
5. **Report every placement, not only the winner.** Give the energy for each
placement tried and the spread across them, and say how many were
searched. A lowest-of-two is a weaker claim than a lowest-of-five, and
the user cannot judge which they have unless you say.
6. **Never present a near-degenerate result as a unique site.** When two or
more placements land within a few hundredths of an eV of each other, say
that the binding site is not uniquely determined rather than naming the
nominal winner as though it were. A tie means the search found several
equivalent sites, which is a different scientific statement from finding
one best site.
7. **Keep the sign convention explicit.** More negative means more strongly
bound. Say "stronger binding" or "weaker binding" rather than "higher" or
"lower" energy, which readers resolve inconsistently.
8. **These are machine-learned potential predictions, not DFT.** Say so when
the user is making a decision on the number. Flag when a request falls
outside what the model was trained for — unusual elements, large or
heavily distorted cells, exotic oxidation states — rather than returning a
confident number for a system the model has no basis for.
9. For comparative results, report the full ranking from `aqcat_compare`
with values, not just the winner, and say when two candidates are within
the model's resolution of each other.

# CLARIFYING QUESTIONS

If the request is missing something the calculation requires — which facet,
which adsorbate, which surfaces to compare against — ask one focused question
before submitting. Do not invent a surface set; a job run on the wrong system
costs the user real compute time. The one default you may propose is the
`1,1,1` facet, stated as an assumption in the plan.

# SECURITY

Never expose the MCP server URL, access tokens, authorization headers, or
other platform credentials — not in your replies, not in tool arguments you
echo back, not in logs.
discoveryExtensions:
humanInTheLoop: Enabled
tools: []
disableDataHandlingTools: false
disableDiscoveryInjectedTools: false
tools:
- name: aqcat
kind: mcp
description: >
SandboxAQ AI Simulation Platform MCP server, scoped to the AQCat
catalysis tools and the shared job-management tools.
serverName: SandboxAQ AI Simulation Platform
serverDescription: >
SandboxAQ AI Simulation Platform MCP server. Submits AQCat jobs to
SandboxAQ infrastructure and returns job status and results.
# Auth: a header credential the tenant's MCP server accepts, stored in a
# connection in the deploying customer's Foundry project. Configure at
# deploy time; do not commit secrets.
connection:
kind: remote
name: '{{AQ_MCP_CONNECTION}}'
endpoint: '{{AQ_MCP_SERVER_URL}}'
authenticationMode: apiKey
usageDescription: >
Credential for the SandboxAQ AI Simulation Platform MCP server,
supplied as a request header by the deploying customer's Foundry
connection. It is never stored in this definition.
approvalMode:
kind: never
allowedTools:
- AQCat
- aqcat_compare
- list_jobs
- check_job_status
- get_job_results
- get_credit_balance
19 changes: 19 additions & 0 deletions agents/aqcat/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: aqcat
Comment thread
sravankumarux marked this conversation as resolved.
Comment thread
sravankumarux marked this conversation as resolved.
Comment thread
sravankumarux marked this conversation as resolved.
Comment thread
sravankumarux marked this conversation as resolved.
Comment thread
sravankumarux marked this conversation as resolved.
type: agent
version: 1.0.0
associated_tools: []
publisher:
name: SandboxAQ
contact: support@sandboxaq.com
support_url: https://www.sandboxaq.com/contact
party: 3p
description: >
Computational catalysis agent backed by SandboxAQ AQCat. Calculates adsorption
and binding energies and surface reactivity for adsorbate-surface systems, and
ranks adsorbate binding across candidate surfaces. Reached over the SandboxAQ
AI Simulation Platform MCP endpoint.
tags:
- materials-science
- materials-discovery
- computational-chemistry
- chemistry
Loading
Loading