# FAQ

> Short answers to the questions people ask in their first month with Mindset, each with the page to read next.

Short answers to the questions people ask in their first month, each with a link to the full page. Terms are defined in the [glossary](https://docs4.mindset.ai/docs/ams/glossary).

## Building

### Can a function contain AI?

Yes. A function is a fixed list of steps, and a step can call a model as well as call an operation or work on data it already has. What makes it a function is that the steps are fixed. See [Build a function](https://docs4.mindset.ai/docs/ams/build-a-function).

### Do I have to write a script?

Usually not. Most agents are instructions plus the right operations. Write a script only for the stretch of work that must wait for a person or must happen in order. See [Write a script](https://docs4.mindset.ai/docs/ams/write-a-script).

### How do I make sure the agent actually uses a tool?

Put it in a script phase. A phase's gate says what must be collected before the run moves on, so the invoice agent can't leave its compare phase without a comparison result. An instruction in the prompt is a request. A gate is enforced. See [Write a script](https://docs4.mindset.ai/docs/ams/write-a-script).

### Where do I change an agent that already exists?

In the **Agent Builder**, docked on the left of every agent tab, or directly on the tab. Orca is for provisioning things you don't have yet. See [Diagnose and improve an agent](https://docs4.mindset.ai/docs/ams/diagnose-and-improve-an-agent).

### My agent is right most of the time and wrong sometimes. Why?

Something is left to the model that shouldn't be. Check, in order: the script does too little, the agent can't reach what it needs, an instruction can be read two ways, or nothing judges the output. See [Diagnose and improve an agent](https://docs4.mindset.ai/docs/ams/diagnose-and-improve-an-agent).

## Reaching other systems

### Do I have to write operations by hand?

Not always. For an MCP server or a knowledge base, choose **Discover tools** on the connection's **Overview** tab. For an HTTP API, a database, a Google Sheet or StackOne, you add operations on the connection's **Operations** tab. Nothing is enabled until someone enables it. See [Connect a system](https://docs4.mindset.ai/docs/ams/connect-a-system).

### What does an agent get: the connection or the operations?

The operations. The full list of what your agents can do to your finance system is the list of operations enabled on that connection. See [Connect a system](https://docs4.mindset.ai/docs/ams/connect-a-system).

### The connection test works and the agent still can't call the operation. Why?

Three things must be true: the operation is enabled on the connection, the agent holds it in its active version, and if it's a write, it has been approved. Check them in that order. See [Connect a system](https://docs4.mindset.ai/docs/ams/connect-a-system).

### Can an agent send an email on its own?

Yes, once the send operation is enabled. Approval is given once per operation, not per call. The org setting **Turn on connections that change other systems automatically** is on by default, so a new write operation is enabled as soon as it's added. Turn it off in **Settings → Systems** and a person approves each new write operation once. If each individual email needs a person, build a question into a script and the run waits for the answer. An agent can never approve an operation. See [Making it run, and approving what it does](https://docs4.mindset.ai/docs/ams/making-it-run-and-approving-what-it-does).

### How do I cut off access immediately?

On the connection's **Operations** tab, withdraw approval for the operation or disable it. That's checked on every call, including in conversations already running. See [Change something that's already live](https://docs4.mindset.ai/docs/ams/change-something-thats-already-live).

## Running

### Did it even run?

Look in **Govern → Log**, or ask the agent docked on **Govern → Monitor**. No run recorded means nothing started it, so look at the trigger, the schedule or the agent's availability. See [Check what happened](https://docs4.mindset.ai/docs/ams/check-what-happened).

### My run stopped part way. Can I resume it?

It depends why it stopped. A run that is waiting for a person resumes when the answer comes. A run that hit its time limit doesn't continue, and re-running starts from the beginning. Read the record first, because a re-run repeats anything that already happened. See [Limits and run behavior](https://docs4.mindset.ai/docs/ams/limits-and-run-behavior).

### Why did it stop at all?

Runs have limits on time, steps and tokens, because an agent with a bad instruction doesn't fail, it keeps going. See [Limits and run behavior](https://docs4.mindset.ai/docs/ams/limits-and-run-behavior) for the numbers.

### It sticks on the same phase every time.

Read the gate report in the run. It names the condition that didn't hold. Usually the condition is worded vaguely. See [Write a script](https://docs4.mindset.ai/docs/ams/write-a-script).

## Testing

### Does a passing test stop a bad version going live?

No. Activating a version doesn't run the acceptance tests, and a failing test doesn't block it. Run them yourself before you activate, and treat a failure as a reason not to. See [Test an agent's behavior](https://docs4.mindset.ai/docs/ams/test-an-agents-behavior).

### How much does a passing test prove?

That the test met its threshold over several runs. By default a model-judged check runs five times and a code check once. See [Test an agent's behavior](https://docs4.mindset.ai/docs/ams/test-an-agents-behavior).

### Will a test really call my finance system?

Yes. Tests use the agent's real operations. Point the connection at a sandbox copy if the side effects matter. See [Test an agent's behavior](https://docs4.mindset.ai/docs/ams/test-an-agents-behavior).

### Can I fix a test I worded badly?

Not in place. An accepted test can't be edited. Amend it, which retires it and accepts a replacement, or retire it with a reason. Dry-run new tests before you accept them. See [Test an agent's behavior](https://docs4.mindset.ai/docs/ams/test-an-agents-behavior).

### Can I test whole conversations?

Yes. A simulated user with a persona and a goal keeps the conversation going until it reaches the goal, loops, or hits a turn limit, and the whole conversation is scored. See [Test an agent's behavior](https://docs4.mindset.ai/docs/ams/test-an-agents-behavior).

## Sharing and access

### What am I giving people when I make an agent available?

Everything the agent holds, used through the agent. For the invoice agent, that's read access to the finance system through its read operations, plus the ability to register supplier queries. Nothing else on the finance system. See [Publish and share an agent](https://docs4.mindset.ai/docs/ams/publish-and-share-an-agent).

### Can I share an agent with just one person or team?

No. Ticking **The Hub** makes an agent visible to every member of the org, in that environment. If only some people should have it, change what the agent holds. See [Publish and share an agent](https://docs4.mindset.ai/docs/ams/publish-and-share-an-agent).

### I made it available and people can't see it.

Check that **Available** is on, **The Hub** is ticked, a version is active, and they're in the same environment. See [Publish and share an agent](https://docs4.mindset.ai/docs/ams/publish-and-share-an-agent).

### Do I need to be an admin to use agents from Claude?

No. Any member can connect their AI client from the Hub and call the agents available there. There's a separate server for admins. See [Use your agents from Claude](https://docs4.mindset.ai/docs/ams/use-your-agents-from-claude).

### My call from Claude timed out. Did the agent fail?

No. A call can't be canceled once it starts, so the agent carries on in Mindset. Don't call it again, because that starts a second run. See [Use your agents from Claude](https://docs4.mindset.ai/docs/ams/use-your-agents-from-claude).

### Can people build their own agents?

Yes, if an admin turns on personal agents in **Settings → Defaults**. A personal agent belongs to its member, is never shared, and holds no connections. It can only hand work to agents already available to its owner. See [Set up your workspace](https://docs4.mindset.ai/docs/ams/set-up-your-workspace).

## Cost and change

### What is this costing us?

**Govern → Monitor → Cost**: total spend, metered calls, average cost per call, average input tokens per call, tokens in (with the share from cache) and tokens out. Break it down by agent, function, model, provider, user or interaction. See [See and control what it costs](https://docs4.mindset.ai/docs/ams/see-and-control-what-it-costs).

### How do I make it cheaper without making it worse?

Run an experiment with the model swapped and compare the results. Take the cheapest model that still passes the tests. An experiment changes nothing on the live agent, so switching the model is a separate step. See [See and control what it costs](https://docs4.mindset.ai/docs/ams/see-and-control-what-it-costs).

### I saved and nothing happened.

Saving an agent change creates a version and activates nothing. Choose **Make it active**, or activate it on **Versions & Availability**. Functions and widgets need publishing. Availability changes and schedules apply on save. See [What saving actually does](https://docs4.mindset.ai/docs/ams/what-saving-actually-does).

### How do I undo something?

Activate an earlier version. Agents, functions and widgets keep versions. Connections don't: an operation is enabled or it isn't. See [Change something that's already live](https://docs4.mindset.ai/docs/ams/change-something-thats-already-live).

### Who owns this agent?

Whoever its description says. Org agents have no owner field, so put the owner and a backup in the description in the same format every time. See [Roll out Mindset in your company](https://docs4.mindset.ai/docs/ams/roll-out-mindset-in-your-company).
