# Execution Rules and Traffic Guide

The project's “Execution rules” screen is the same as in the SaaS edition. **In the Marketplace edition, though, it takes effect differently from the SaaS edition.** A registered agent is a container the purchaser built, and the platform does not stop the operations inside it one by one.

|                                           | Workflow                                                                                                                                                                                  | Cycle                                                                                                                                                                                     |
| ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Basic rules (Open / Guarded / Strict)     | **Before starting**, checks whether the agent supports them                                                                                                                               | No effect                                                                                                                                                                                 |
| Forbidden operations added by the project | No effect (not passed to the agent)                                                                                                                                                       | No effect                                                                                                                                                                                 |
| Outbound traffic                          | HTTP(S) to public destinations goes through the egress gateway; register destinations to stop under “Banned URL” in the admin console. Other destinations are narrowed with NetworkPolicy | HTTP(S) to public destinations goes through the egress gateway; register destinations to stop under “Banned URL” in the admin console. Other destinations are narrowed with NetworkPolicy |

**The SaaS edition's explanation that “writing it as a forbidden operation stops it” ([Execution Rules Guide](https://developers.fd.agenticstar.tm.softbank.jp/en/docs/saas/project/guide/control-guide.md)) does not apply to the Marketplace edition.** Prevent operations you do not want the agent to perform through how the agent is built, and through the traffic restrictions below.

## How the basic rules are checked (workflows)

Before starting a registered agent on a workflow step, the runtime checks the following.

1. It combines the tenant-wide execution rules with the project's execution rules, and takes **the stricter** as the basic rules for this run
2. It checks whether those basic rules are among the agent's certified “**Supported run rules**”
3. If they are not, it does not start, and that step ends as “**Not allowed by rules**”. The case stops with a review request (the record shows “The Agent is not certified for this project's execution rules”; [Trigger Guide](https://developers.fd.agenticstar.tm.softbank.jp/en/docs/marketplace/project/guide/trigger-guide.md#when-it-does-not-go-to-plan))

The “Supported run rules” are registered by an administrator in the agent's certification. They are the values for which the agent's developer confirmed by testing that it runs under those basic rules ([Settings Guide](https://developers.fd.agenticstar.tm.softbank.jp/en/docs/marketplace/build/guide/settings-guide.md#use-in-workflows)).

**Make the project's basic rules stricter and agents that do not support them stop running.** For example, an agent whose “Supported run rules” are only Open and Guarded does not start in a Strict project.

The basic rules applied are kept in the execution's record.

When the agent itself decides “I will not perform this operation”, the agent may also report “Not allowed by rules”. Which operations it treats that way is settled by how the agent is built.

**The project's forbidden operations are used in the check before starting.** If one that points to a connector that no longer exists remains, it cannot start and becomes a review request. Remove forbidden operations that point to connectors you no longer use.

## Restricting outbound traffic

How far a registered agent can communicate externally is settled by two layers. **Both are settings for the whole environment, not for a project.**

| Layer         | Who sets it, and where                                                         | What it can restrict                  |
| ------------- | ------------------------------------------------------------------------------ | ------------------------------------- |
| Banned URL    | Administrators. “Banned URL” in the admin console                              | URLs of destinations you want to stop |
| NetworkPolicy | Whoever builds and operates the environment. The Helm values of agent-executor | Destinations and ports                |

### Workflow agents

**HTTP(S) to public destinations goes through the egress gateway.** Register destinations you want to stop in the admin console under “AI Agent Restrictions” > “Banned URL”.

To run an agent that uses destinations that are not HTTP(S) (an external database, for example) or destinations inside the cluster, whoever operates the environment writes the destinations and ports to allow in agent-executor's `marketplaceDefaults.networkPolicy.workflowEgress.allowedEgress`.

```yaml
marketplaceDefaults:
  networkPolicy:
    workflowEgress:
      allowedEgress:
        - to:
            - ipBlock:
                cidr: 203.0.113.10/32
          ports:
            - protocol: TCP
              port: 5432
```

- URLs cannot be written in NetworkPolicy. To stop a particular URL, register it under “Banned URL” in the admin console
- With `mode: open`, destinations and ports are no longer narrowed (except for cloud metadata and the like). This is not recommended
- When destinations increase, add them to this value and update agent-executor. For how to change Helm values, see the [Version Upgrade Guide](https://developers.fd.agenticstar.tm.softbank.jp/en/docs/marketplace/build/guide/update-guide.md)

**An agent that uses a destination it cannot reach cannot connect to it. Depending on how the agent is built, its execution fails.** Before placing a new agent, check its destinations with the agent's developer.

### Cycle agents

A cycle agent's Pod has the same NetworkPolicy as agents used in chat. **HTTP(S) to public destinations, as for workflows, goes through the egress gateway.** Register destinations you want to stop in the admin console under “AI Agent Restrictions” > “Banned URL”. It can reach services inside the cluster (private IP address ranges), and it cannot reach cloud metadata (169.254.0.0/16). To run an agent that uses an external destination that is not HTTP(S) (an external database, for example), whoever operates the environment writes the destinations and ports to allow in agent-executor's `marketplaceDefaults.networkPolicy.chatEgress.allowedEgress`. The IP address ranges of destinations inside the cluster that you want to stop are added to `marketplaceDefaults.networkPolicy.additionalDeniedEgressCIDRs`.

### Banned URL

The agent's Pod is given HTTP(S) proxy settings that go through the traffic decision service. **Traffic that follows these proxy settings cannot reach destinations registered under “Banned URL” in the admin console.** How to set it is in the [Settings Guide](https://developers.fd.agenticstar.tm.softbank.jp/en/docs/marketplace/build/guide/settings-guide.md).

**Block destinations you want stopped reliably with NetworkPolicy as well as “Banned URL”** (for workflows, do not write them in `allowedEgress`; for cycles, add them to `additionalDeniedEgressCIDRs`).

“Widget Connection Restrictions” in the admin console is a setting that allows or blocks traffic from the widget. It does not restrict the agent's outbound traffic.

## Easy to get wrong

- **Thinking that writing it as a prohibited operation stops it.** Prohibited operations added in a project are not passed to the agent. Prevent operations you do not want through how the agent is built and through the traffic limits
- **Thinking a stricter basic rule makes the agent safe.** The basic rule is used to check, before launch, whether the agent supports it. The platform does not stop operations during a run
- **Thinking the basic rule also applies in a cycle.** It does not
- **Block destinations you must stop for certain with a NetworkPolicy as well as “Banned URL”.**
- **Thinking an agent that uses a destination it cannot reach will still work.** It cannot connect to that destination, and depending on how the agent is built, its execution fails

## What to read next

- [How Much to Delegate](https://developers.fd.agenticstar.tm.softbank.jp/en/docs/marketplace/project/concepts/delegation.md) — How run rules take effect, and the boundary of responsibility
- [Agent Guide](https://developers.fd.agenticstar.tm.softbank.jp/en/docs/marketplace/project/guide/agent-guide.md) — A registered agent's contract, and when you want to change its behavior
- [Record Guide](https://developers.fd.agenticstar.tm.softbank.jp/en/docs/marketplace/project/guide/record-guide.md#when-it-could-not-be-launched) — When it could not launch because of “Denied by rule”
