|
| 1 | +# Equinix Agent Factory Contributors |
| 2 | + |
| 3 | +Thanks for your interest! We're so glad you're here. |
| 4 | + |
| 5 | +The Equinix Agent Factory Repo is a self-service contribution model that allows cross functional teams to manage their own |
| 6 | +Agent Factory Schemas related to the md files and categories that will be published from their team. |
| 7 | + |
| 8 | +Every Agent Factory Json Schema and MD Files are published to Github Pages through this repo on merges to the `main` branch. Contribution guidelines |
| 9 | +for registration and promotion are provided in this document. Please read it thoroughly. |
| 10 | + |
| 11 | +## Code of Conduct |
| 12 | + |
| 13 | +Available via [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md) |
| 14 | + |
| 15 | +## MD Files Gating |
| 16 | + |
| 17 | +Each Markdown (.md) file is created to support Agent Factory workflows. |
| 18 | +The team responsible for the Agent Factory will add their Markdown files under the directory of their domain and one of the supported categories: `event_driven`, `run_once`, or `scheduled`. |
| 19 | + |
| 20 | +Each Markdown file(.md) must contain the following sections: |
| 21 | +* `# <High Level Title>` - The title of the Agent Factory. |
| 22 | +* `## Overview` - A breif description of the Agent Factory Workflow |
| 23 | +* `## Prerequisites` - A description of the prerequisite scenarios and requirements needed for the workflow to execute. |
| 24 | +* `## Capabilities` - A high-level description of the capabilities of the Agent Factory. |
| 25 | +* `## Follow the action step by step below:` - The step-by-step workflow actions the Agent must perform. |
| 26 | +* `## Available Tools` - The required Equinix MCP tools that the Agent Factory uses to execute the workflow to help with consistency of workflow. |
| 27 | +* `## Guidelines` - Additional guidance for the Agent Factory, such as clarifications, error handling, appropriate context, and other workflow-specific attributes. |
| 28 | + |
| 29 | +These sections in Markdown file (.md) make up the structure of Agent Factory, which will be retrieved automatically via Github Actions to generate the README and provide the Agent Factory APIs a way to retrieve its associated Agent Factory. |
| 30 | +**Contributing teams are fully responsible for managing their Markdown (.md) files to ensure the proper gating and consistent workflow results are occuring for their Agent Factory.** |
| 31 | + |
| 32 | +Example of complete use case for the Agent Factory Markdown(.md) Files: |
| 33 | + |
| 34 | +``` |
| 35 | +# Network connection packets drop monitoring and upgrade agent |
| 36 | +
|
| 37 | +## Overview |
| 38 | +This skill sets up and activate an Equinix agent that automatically upgrades the bandwidth of a connection when there are packets drop due to traffic over bw threshold. |
| 39 | +
|
| 40 | +## Prerequisites |
| 41 | +To receive alerts from your connections, you must first set up alert rules in a stream. |
| 42 | +If you don't have one yet, start by creating a stream, attach your connection resources to it, and then configure alert rules for those resources. |
| 43 | +
|
| 44 | +## Capabilities |
| 45 | +- Monitor real-time network event streams |
| 46 | +- Detect packet drop alerts |
| 47 | +- Analyze connection utilization patterns |
| 48 | +- Automatically upgrade connection bandwidth |
| 49 | +- Log all actions and decisions |
| 50 | +- Send notifications for critical events |
| 51 | +
|
| 52 | +## Follow the action step by step below: |
| 53 | +1. Once the cloud event is received, look at the packet drop alert rule from the cloud event message. |
| 54 | +2. Search for an existing alert rule given the alertRule uuid extracted from the cloud event message to find out if the alert rule exist. |
| 55 | +3. Search for the existing connection given the subject connection uuid from the cloud event message. |
| 56 | +4. Extract the bandwidth from the connection details, and then fetch the next available tier given the bandwidth extracted from the connection details. |
| 57 | +5. Upgrade the bandwidth of the connection given the new bandwidth. |
| 58 | +
|
| 59 | +
|
| 60 | +## Available Tools |
| 61 | +This skill can use the following tools: |
| 62 | +
|
| 63 | +* **`search_connection`**: Searches for an existing connection `. |
| 64 | +* **`get_stream_alert_rule_details `**: Searches for an existing alert rule. |
| 65 | +* **`update_connection`**: Update connection. Used to upgrade bandwidth. |
| 66 | +* **`get_next_available_bandwidth_tier `**: Fetches the next available billing tier based on a bandwidth input. |
| 67 | +
|
| 68 | +## Guidelines |
| 69 | +* **Prioritize Clarity**: Ensure all parameters for the MCP tools are clearly identified from the user's request before making the tool call. |
| 70 | +* **Error Handling**: If parameters are invalid or operations fail, log errors and stop the process. |
| 71 | +* **Token Efficiency**: Only call the tools when all necessary information is present, avoiding unnecessary context loading. |
| 72 | +* **User can specify alert rule uuid |
| 73 | +* **User can specify connection uuid |
| 74 | +``` |
| 75 | + |
| 76 | +## Agent Factory Schema Registration and Gating |
| 77 | + |
| 78 | +Each team will add Agent Factory schemas in JSON format to their domain or add Agent Factories under the supported category JSON files: `EventDriven.json`, `RunOnce.json`, or `Scheduled.json`. The data schema is used to organize Agent Factory workflows and indicate their production readiness. |
| 79 | + |
| 80 | +Domains are added under `agent_factory_schema/equinix` in the repository, following this directory pattern: `agent_factory_schema/equinix/<domain>/<major_version>/<agent_factory_category>`. |
| 81 | +A complete example is:`agent_factory_schema/equinix/fabric/v1/EventDriven.json`. |
| 82 | + |
| 83 | +Each Agent Factory schema is created to support Agent Factory category types. Please ensure the |
| 84 | +[MD Gating](#md-files-gating) and [Agent Factory Scehma Registration and Gating](#agent-factory-schema-registration-and-gating) and section are read and properly understood to abide by those |
| 85 | +rules. |
| 86 | + |
| 87 | +**Even if the Agent Factory schema is not using `agentFactories`, each attribute and sub attributes ares required in the data |
| 88 | +schema. The Github Action gating will fail if they are not present and the Pull Request will not be merged. Additionally, catalog.json and the README will fail to update.** |
| 89 | + |
| 90 | +Each contributed agent factory schema requires the following attributes: |
| 91 | +* "$id" - The fully resolved URL to the agent factory schema json for linking from Agent Factory envelope and for generating Github Pages |
| 92 | + Site |
| 93 | +* "name" - The name of the Agent Factory schema and category being registered. Should match the file name. |
| 94 | +* "examples" - Provided examples of what the Agent Factory schema could contain in an Agent Factory Workflow. Can be an empty list `[]` to |
| 95 | +start. |
| 96 | +* "package" - The name of the package containing the data schema. Example: `equinix.fabric.v1` |
| 97 | +* "datatype" - The full name of the datatype within the package. Example: `equinix.fabric.v1.EventDriven` |
| 98 | +* "domain" - The description of the domain within the package. Example: `Equinix Fabric Agent Factory Event Driven` |
| 99 | +* "$schema" - The JSON Schema Specification used to draft the data schema. Use `"http://json-schema.org/draft-04/schema#"` for all |
| 100 | +* "$ref" - The reference to the definition provided for the data schema. Example: `#/definitions/Data` |
| 101 | +* "definitions" - The JSON Schema definition that describes the contents of the Agent Factory schema for what will be contained |
| 102 | + in the event, metric, or alert that is supported by this data schema |
| 103 | +* "agentFactories" - List of object with attribute `releaseStatus` that mark which environment the Agent Factory schema is ready |
| 104 | + to suppport the given event type in. Mark `releaseStatus` as `released` if it is fully tested and ready for production. |
| 105 | + Mark `releaseStatus` as `preview` if it is under development and should only be available in DEV enviornment. Additionally, |
| 106 | + the list of object with attribute `uri` will directly link to the raw md file of Agent Factory. |
| 107 | + |
| 108 | + |
| 109 | +## Process for Upgrading Agent Factories from Development to Production |
| 110 | + |
| 111 | +When adding a new Agent Factory to a Agent Factory schema always start by marking `releaseStatus` as `preview`. This |
| 112 | +identifies *in development* items and is the starting point for new Agent Factory being added into the repo. |
| 113 | + |
| 114 | +Once an Agent Factory Markdown(.md) has been thoroughly tested in lower environments you will mark `releaseStatus` as `released`. |
| 115 | +This indicates that your item is ready to be consumed in production and the production Equinix MCP Tools will pass |
| 116 | +these items through to the consumers. |
| 117 | + |
| 118 | +It is imperative that you understand the responsibility involved for managing your team's domain with regards to the |
| 119 | +`releaseStatus` attribute in your data schema files. The [CODEOWNERS](#codeowners) section describes how responsibility |
| 120 | +is managed within the repo. Please review it thoroughly. |
| 121 | + |
| 122 | + |
| 123 | +## CODEOWNERS |
| 124 | + |
| 125 | +CODEOWNERS file will be in place to establish a Github team responsible for the files along |
| 126 | +the domain path they are contributing to. This ensures that 1 member from each domain team and 1 architect will always |
| 127 | +be necessary to approve a Pull Request before it can be merged. |
| 128 | + |
| 129 | +This is critical because the responsibility of maintaining the `releaseStatus` attributes outlined |
| 130 | +in the [Agent Factory Schema Registration and Gating](#agent-factory-schema-registration-and-gating) section lies with the Domain owners and not the |
| 131 | +architects. Should any production defect be found the Domain owner is responsible for resolution |
| 132 | + |
| 133 | +When adding a new domain to the `agent_factory_schema/equinix` directory, add an entry to the CODEOWNERS file signifying which |
| 134 | +Github Team is responsible for reviewing/approving PRs that modify the domain directory being added |
| 135 | + |
| 136 | +## Data Schema Versioning |
| 137 | + |
| 138 | +Versioning for data schemas is only based on major versions; there are no minor or patch versions. The major versions |
| 139 | +are determined by the directory structure containing the data schema. |
| 140 | + |
| 141 | +If no breaking changes (only additions, no modifications or deletions) are made to the data_schema when it is updated it |
| 142 | +can stay under the same major version; i.e. v1. |
| 143 | + |
| 144 | +If a breaking change is made to the data_schema (deletion or modification) then it needs to be put into the next major |
| 145 | +version in a new version directory; i.e. v2. |
| 146 | + |
| 147 | +Not all data_schemas need to be moved to v2. Just the ones that have breaking changes. |
| 148 | + |
| 149 | +## Repository Versioning |
| 150 | + |
| 151 | +The self service contribution model is setup to ensure the repo is always in a stable state that can be released to |
| 152 | +either DEV or production enviornment. Each time a Pull Request is merged into main a new version tag will be created |
| 153 | +based on SemVar for the commit names present in the change. This tag will always be available to the Equinix Event |
| 154 | +Manager for releases. This setup is possible because of our CODEOWNERSHIP model. |
| 155 | + |
| 156 | + |
| 157 | + |
0 commit comments