@deftai/directive-content 0.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/deft/SKILL.md +6 -0
- package/.agents/skills/deft-directive-article-review/SKILL.md +11 -0
- package/.agents/skills/deft-directive-build/SKILL.md +10 -0
- package/.agents/skills/deft-directive-cost/SKILL.md +12 -0
- package/.agents/skills/deft-directive-debug/SKILL.md +13 -0
- package/.agents/skills/deft-directive-gh-arch/SKILL.md +11 -0
- package/.agents/skills/deft-directive-gh-slice/SKILL.md +10 -0
- package/.agents/skills/deft-directive-glossary/SKILL.md +10 -0
- package/.agents/skills/deft-directive-interview/SKILL.md +9 -0
- package/.agents/skills/deft-directive-pre-pr/SKILL.md +9 -0
- package/.agents/skills/deft-directive-refinement/SKILL.md +10 -0
- package/.agents/skills/deft-directive-release/SKILL.md +12 -0
- package/.agents/skills/deft-directive-review-cycle/SKILL.md +10 -0
- package/.agents/skills/deft-directive-setup/SKILL.md +10 -0
- package/.agents/skills/deft-directive-swarm/SKILL.md +10 -0
- package/.agents/skills/deft-directive-sync/SKILL.md +9 -0
- package/.agents/skills/deft-directive-triage/SKILL.md +9 -0
- package/.agents/skills/deft-directive-write-skill/SKILL.md +9 -0
- package/LICENSE.md +22 -0
- package/QUICK-START.md +167 -0
- package/UPGRADING.md +517 -0
- package/coding/build-output.md +28 -0
- package/coding/coding.md +235 -0
- package/coding/debugging.md +110 -0
- package/coding/holzmann.md +96 -0
- package/coding/hygiene.md +127 -0
- package/coding/security.md +158 -0
- package/coding/testing.md +162 -0
- package/coding/toolchain.md +44 -0
- package/commands.md +300 -0
- package/context/context.md +57 -0
- package/context/deterministic-split.md +67 -0
- package/context/examples.md +26 -0
- package/context/fractal-summaries.md +69 -0
- package/context/long-horizon.md +46 -0
- package/context/spec-deltas.md +177 -0
- package/context/tool-design.md +34 -0
- package/context/working-memory.md +62 -0
- package/contracts/boundary-maps.md +65 -0
- package/contracts/deterministic-questions.md +59 -0
- package/contracts/hierarchy.md +77 -0
- package/conventions/content-manifest.json +399 -0
- package/conventions/machine-generated-banner.md +130 -0
- package/conventions/references.md +120 -0
- package/conventions/rule-ownership.json +382 -0
- package/conventions/task-caching.md +43 -0
- package/conventions/vbrief-filenames.md +70 -0
- package/deployments/README.md +37 -0
- package/deployments/agentuity/README.md +138 -0
- package/deployments/agentuity/via-cli.md +380 -0
- package/deployments/agentuity/via-cloud.md +425 -0
- package/deployments/agentuity/via-github-actions.md +664 -0
- package/deployments/agentuity/via-gravity-network.md +606 -0
- package/deployments/agentuity/via-vpc.md +607 -0
- package/deployments/aws/README.md +38 -0
- package/deployments/aws/via-app-runner.md +612 -0
- package/deployments/aws/via-ecs-fargate.md +561 -0
- package/deployments/aws/via-elastic-beanstalk.md +628 -0
- package/deployments/aws/via-lambda.md +649 -0
- package/deployments/azure/README.md +37 -0
- package/deployments/azure/via-aks.md +390 -0
- package/deployments/azure/via-app-service.md +564 -0
- package/deployments/azure/via-container-apps.md +599 -0
- package/deployments/azure/via-functions.md +552 -0
- package/deployments/cloud-gov/README.md +63 -0
- package/deployments/cloud-gov/agents/compliance-docs.md +154 -0
- package/deployments/cloud-gov/agents.md +39 -0
- package/deployments/cloud-gov/cicd.md +64 -0
- package/deployments/cloud-gov/deployment.md +150 -0
- package/deployments/cloud-gov/logging.md +43 -0
- package/deployments/cloud-gov/manifest.md +121 -0
- package/deployments/cloud-gov/overview.md +58 -0
- package/deployments/cloud-gov/security.md +46 -0
- package/deployments/cloud-gov/services.md +72 -0
- package/deployments/cloud-gov/upstream/README.md +18 -0
- package/deployments/cloudflare/README.md +33 -0
- package/deployments/cloudflare/via-dashboard.md +83 -0
- package/deployments/cloudflare/via-git.md +90 -0
- package/deployments/cloudflare/via-github-actions.md +185 -0
- package/deployments/cloudflare/via-terraform.md +157 -0
- package/deployments/cloudflare/via-wrangler.md +165 -0
- package/deployments/fly-io/README.md +37 -0
- package/deployments/fly-io/via-dockerfile.md +648 -0
- package/deployments/fly-io/via-flyctl.md +653 -0
- package/deployments/fly-io/via-github-actions.md +695 -0
- package/deployments/fly-io/via-multi-region.md +598 -0
- package/deployments/google/README.md +34 -0
- package/deployments/google/via-app-engine.md +42 -0
- package/deployments/google/via-cloud-functions.md +23 -0
- package/deployments/google/via-cloud-run.md +330 -0
- package/deployments/google/via-gke.md +23 -0
- package/deployments/netlify/README.md +99 -0
- package/deployments/netlify/via-cli.md +17 -0
- package/deployments/netlify/via-functions.md +19 -0
- package/deployments/netlify/via-git.md +25 -0
- package/deployments/vercel/README.md +90 -0
- package/deployments/vercel/via-api.md +16 -0
- package/deployments/vercel/via-cli.md +17 -0
- package/deployments/vercel/via-git.md +24 -0
- package/docs/BROWNFIELD.md +179 -0
- package/docs/getting-started.md +137 -0
- package/docs/good-agents-md.md +137 -0
- package/events/README.md +89 -0
- package/events/event-record.schema.json +26 -0
- package/events/registry.json +166 -0
- package/events/registry.schema.json +71 -0
- package/glossary.md +145 -0
- package/incidents/README.md +81 -0
- package/incidents/_template.md +38 -0
- package/interfaces/cli.md +104 -0
- package/interfaces/rest.md +212 -0
- package/interfaces/tui.md +242 -0
- package/interfaces/web.md +123 -0
- package/languages/6502-DASM.md +132 -0
- package/languages/c.md +235 -0
- package/languages/commands.md +23 -0
- package/languages/cpp.md +132 -0
- package/languages/csharp.md +259 -0
- package/languages/dart.md +183 -0
- package/languages/delphi.md +218 -0
- package/languages/elixir.md +208 -0
- package/languages/go.md +78 -0
- package/languages/java.md +278 -0
- package/languages/javascript.md +163 -0
- package/languages/julia.md +175 -0
- package/languages/kotlin.md +193 -0
- package/languages/markdown.md +168 -0
- package/languages/mermaid.md +146 -0
- package/languages/officejs.md +392 -0
- package/languages/python.md +209 -0
- package/languages/r.md +163 -0
- package/languages/rust.md +216 -0
- package/languages/sql.md +216 -0
- package/languages/swift.md +153 -0
- package/languages/typescript.md +132 -0
- package/languages/vba.md +279 -0
- package/languages/vhdl.md +180 -0
- package/languages/visual-basic.md +151 -0
- package/languages/zig.md +196 -0
- package/meta/SOUL.md +27 -0
- package/meta/code-field.md +44 -0
- package/meta/morals.md +40 -0
- package/meta/philosophy.md +39 -0
- package/meta/project.md +49 -0
- package/meta/ralph.md +223 -0
- package/meta/security.md +80 -0
- package/meta/versioning.md +326 -0
- package/package.json +22 -0
- package/packs/lessons/lessons-pack-0.1.json +553 -0
- package/packs/patterns/patterns-pack-0.1.json +57 -0
- package/packs/rules/rules-pack-0.1.json +4767 -0
- package/packs/skills/skills-pack-0.1.json +262 -0
- package/packs/strategies/strategies-pack-0.1.json +167 -0
- package/packs/swarm-spec/swarm-spec-pack-0.1.json +17 -0
- package/patterns/executor-layer-credentials.md +227 -0
- package/patterns/llm-app.md +156 -0
- package/patterns/multi-agent.md +278 -0
- package/patterns/prompt-assembly-layer-ordering.md +154 -0
- package/patterns/role-as-overlay.md +179 -0
- package/platforms/2600.md +137 -0
- package/platforms/unity.md +329 -0
- package/references/composer-skill-porting.md +152 -0
- package/references/cost-models.md +163 -0
- package/references/ip-risk.md +246 -0
- package/references/plain-english-ux.md +275 -0
- package/resilience/context-pruning.md +67 -0
- package/resilience/continue-here.md +62 -0
- package/scm/changelog.md +276 -0
- package/scm/git.md +139 -0
- package/scm/github.md +265 -0
- package/secrets/.gitkeep +0 -0
- package/skills/deft-build/SKILL.md +20 -0
- package/skills/deft-directive-article-review/SKILL.md +156 -0
- package/skills/deft-directive-build/SKILL.md +302 -0
- package/skills/deft-directive-cost/SKILL.md +201 -0
- package/skills/deft-directive-debug/SKILL.md +140 -0
- package/skills/deft-directive-decompose/SKILL.md +96 -0
- package/skills/deft-directive-gh-arch/SKILL.md +160 -0
- package/skills/deft-directive-gh-slice/SKILL.md +199 -0
- package/skills/deft-directive-glossary/SKILL.md +118 -0
- package/skills/deft-directive-interview/SKILL.md +528 -0
- package/skills/deft-directive-pre-pr/SKILL.md +131 -0
- package/skills/deft-directive-probe/SKILL.md +127 -0
- package/skills/deft-directive-refinement/SKILL.md +403 -0
- package/skills/deft-directive-release/SKILL.md +266 -0
- package/skills/deft-directive-review-cycle/SKILL.md +401 -0
- package/skills/deft-directive-setup/SKILL.md +717 -0
- package/skills/deft-directive-swarm/SKILL.md +989 -0
- package/skills/deft-directive-sync/SKILL.md +288 -0
- package/skills/deft-directive-triage/SKILL.md +137 -0
- package/skills/deft-directive-write-skill/SKILL.md +169 -0
- package/skills/deft-interview/SKILL.md +16 -0
- package/skills/deft-pre-pr/SKILL.md +16 -0
- package/skills/deft-review-cycle/SKILL.md +16 -0
- package/skills/deft-roadmap-refresh/SKILL.md +16 -0
- package/skills/deft-setup/SKILL.md +20 -0
- package/skills/deft-swarm/SKILL.md +16 -0
- package/skills/deft-sync/SKILL.md +16 -0
- package/strategies/README.md +83 -0
- package/strategies/artifact-guards.md +85 -0
- package/strategies/bdd.md +115 -0
- package/strategies/brownfield.md +7 -0
- package/strategies/discuss.md +129 -0
- package/strategies/emit-hints.md +69 -0
- package/strategies/enterprise.md +193 -0
- package/strategies/interview.md +551 -0
- package/strategies/map.md +179 -0
- package/strategies/probe.md +151 -0
- package/strategies/rapid.md +155 -0
- package/strategies/research.md +155 -0
- package/strategies/roadmap.md +9 -0
- package/strategies/speckit.md +437 -0
- package/strategies/v0-20-contract.md +134 -0
- package/strategies/yolo.md +169 -0
- package/swarm/swarm.md +300 -0
- package/templates/COST-ESTIMATE.md +114 -0
- package/templates/PULL_REQUEST_TEMPLATE.md +35 -0
- package/templates/agent-prompt-preamble.md +409 -0
- package/templates/agents-entry.md +211 -0
- package/templates/agents-entry.placeholders.md +75 -0
- package/templates/embed.go +20 -0
- package/templates/embed_test.go +36 -0
- package/templates/make-spec-example.md +9 -0
- package/templates/make-spec.md +246 -0
- package/templates/project.md.template +52 -0
- package/templates/specification.md +1 -0
- package/templates/swarm-greptile-poller-prompt.md +556 -0
- package/templates/user.md.template +31 -0
- package/tools/RWLDL.md +80 -0
- package/tools/greptile.md +141 -0
- package/tools/installer.md +23 -0
- package/tools/taskfile-migration.md +32 -0
- package/tools/taskfile.md +185 -0
- package/tools/telemetry.md +285 -0
- package/vbrief/schemas/cache-meta.schema.json +137 -0
- package/vbrief/schemas/candidates.schema.json +130 -0
- package/vbrief/schemas/codebase-map.schema.json +213 -0
- package/vbrief/schemas/lessons-pack.schema.json +134 -0
- package/vbrief/schemas/patterns-pack.schema.json +84 -0
- package/vbrief/schemas/rules-pack.schema.json +105 -0
- package/vbrief/schemas/skills-pack.schema.json +94 -0
- package/vbrief/schemas/slices.schema.json +87 -0
- package/vbrief/schemas/strategies-pack.schema.json +89 -0
- package/vbrief/schemas/swarm-spec-pack.schema.json +84 -0
- package/vbrief/schemas/vbrief-core.schema.json +1022 -0
- package/vbrief/vbrief.md +684 -0
- package/verification/integration.md +76 -0
- package/verification/plan-checking.md +85 -0
- package/verification/uat.md +60 -0
- package/verification/verification.md +117 -0
|
@@ -0,0 +1,606 @@
|
|
|
1
|
+
# Deploy via Gravity Network
|
|
2
|
+
|
|
3
|
+
The Gravity Network enables deployment to public cloud, private VPC, on-premises, multi-cloud, or edge — one platform, one SDK, one consistent developer experience across all environments.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The Gravity Network is Agentuity's distributed deployment infrastructure that allows you to:
|
|
8
|
+
- **Deploy Anywhere**: Cloud, VPC, on-prem, edge, or multi-cloud
|
|
9
|
+
- **Unified SDK**: Same code runs everywhere
|
|
10
|
+
- **Consistent Experience**: Same CLI, same APIs, same services
|
|
11
|
+
- **Global Distribution**: Run agents close to users and data
|
|
12
|
+
- **Hybrid Architecture**: Seamlessly mix deployment targets
|
|
13
|
+
|
|
14
|
+
## Key Concepts
|
|
15
|
+
|
|
16
|
+
### What is the Gravity Network?
|
|
17
|
+
|
|
18
|
+
The Gravity Network is Agentuity's answer to the question: "How do we run the same agent code across radically different infrastructure without changing a single line?"
|
|
19
|
+
|
|
20
|
+
It provides:
|
|
21
|
+
- **Location Abstraction**: Deploy to any infrastructure
|
|
22
|
+
- **Service Portability**: Built-in services work everywhere
|
|
23
|
+
- **Agent Mobility**: Move agents between environments
|
|
24
|
+
- **Cross-Environment Communication**: Agents can call each other across clouds
|
|
25
|
+
|
|
26
|
+
### Architecture
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
┌──────────────────────────────────────────────────────┐
|
|
30
|
+
│ Gravity Network Control Plane │
|
|
31
|
+
│ (Agent Registry, Routing, Discovery, Monitoring) │
|
|
32
|
+
└───────────────┬──────────────────────────────────────┘
|
|
33
|
+
│
|
|
34
|
+
┌───────┴────────┬────────────┬──────────────┐
|
|
35
|
+
│ │ │ │
|
|
36
|
+
┌────▼────┐ ┌─────▼─────┐ ┌──▼───┐ ┌─────▼──────┐
|
|
37
|
+
│ AWS │ │ Azure │ │ GCP │ │ On-Prem │
|
|
38
|
+
│ Region │ │ Region │ │ Zone │ │ Data Center│
|
|
39
|
+
└────┬────┘ └─────┬─────┘ └──┬───┘ └─────┬──────┘
|
|
40
|
+
│ │ │ │
|
|
41
|
+
[Agents] [Agents] [Agents] [Agents]
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Deployment Targets
|
|
45
|
+
|
|
46
|
+
### 1. Multi-Cloud Deployment
|
|
47
|
+
|
|
48
|
+
Deploy the same agent across multiple cloud providers:
|
|
49
|
+
|
|
50
|
+
```yaml
|
|
51
|
+
# agentuity.yaml
|
|
52
|
+
name: global-agent
|
|
53
|
+
runtime: nodejs
|
|
54
|
+
|
|
55
|
+
deployment:
|
|
56
|
+
type: multi-cloud
|
|
57
|
+
targets:
|
|
58
|
+
- cloud: aws
|
|
59
|
+
regions:
|
|
60
|
+
- us-east-1
|
|
61
|
+
- eu-west-1
|
|
62
|
+
- cloud: azure
|
|
63
|
+
regions:
|
|
64
|
+
- eastus
|
|
65
|
+
- westeurope
|
|
66
|
+
- cloud: gcp
|
|
67
|
+
regions:
|
|
68
|
+
- us-central1
|
|
69
|
+
- europe-west1
|
|
70
|
+
|
|
71
|
+
routing:
|
|
72
|
+
strategy: geo-latency # Route to nearest region
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Deploy to all targets
|
|
77
|
+
agentuity deploy --multi-cloud
|
|
78
|
+
|
|
79
|
+
# Verify deployment
|
|
80
|
+
agentuity status --all-targets
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### 2. Edge Deployment
|
|
84
|
+
|
|
85
|
+
Run agents at the edge, close to users:
|
|
86
|
+
|
|
87
|
+
```yaml
|
|
88
|
+
# agentuity.yaml
|
|
89
|
+
deployment:
|
|
90
|
+
type: edge
|
|
91
|
+
edge-locations:
|
|
92
|
+
- americas: 12 # Deploy to 12 edge locations in Americas
|
|
93
|
+
- europe: 8
|
|
94
|
+
- asia: 15
|
|
95
|
+
- oceania: 3
|
|
96
|
+
|
|
97
|
+
edge-config:
|
|
98
|
+
cold-start-optimization: true
|
|
99
|
+
local-caching: true
|
|
100
|
+
data-residency: enforce
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
# Deploy to edge network
|
|
105
|
+
agentuity deploy --edge
|
|
106
|
+
|
|
107
|
+
# Global edge deployment with < 50ms latency to 95% of users
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### 3. Hybrid Cloud
|
|
111
|
+
|
|
112
|
+
Mix cloud and on-premises:
|
|
113
|
+
|
|
114
|
+
```yaml
|
|
115
|
+
# agentuity.yaml
|
|
116
|
+
deployment:
|
|
117
|
+
type: hybrid
|
|
118
|
+
|
|
119
|
+
# Public workloads in cloud
|
|
120
|
+
cloud:
|
|
121
|
+
provider: aws
|
|
122
|
+
regions: [us-east-1]
|
|
123
|
+
agents:
|
|
124
|
+
- frontend-agent
|
|
125
|
+
- api-gateway-agent
|
|
126
|
+
|
|
127
|
+
# Sensitive workloads on-prem
|
|
128
|
+
on-premises:
|
|
129
|
+
clusters:
|
|
130
|
+
- datacenter-1
|
|
131
|
+
agents:
|
|
132
|
+
- data-processing-agent
|
|
133
|
+
- compliance-agent
|
|
134
|
+
|
|
135
|
+
# Secure tunnel for communication
|
|
136
|
+
interconnect:
|
|
137
|
+
type: wireguard
|
|
138
|
+
endpoints:
|
|
139
|
+
- cloud: vpn.aws.example.com
|
|
140
|
+
- on-prem: vpn.datacenter.example.com
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### 4. Multi-Region Single Cloud
|
|
144
|
+
|
|
145
|
+
Maximize availability within one cloud:
|
|
146
|
+
|
|
147
|
+
```yaml
|
|
148
|
+
# agentuity.yaml
|
|
149
|
+
deployment:
|
|
150
|
+
type: multi-region
|
|
151
|
+
cloud: aws
|
|
152
|
+
|
|
153
|
+
regions:
|
|
154
|
+
primary: us-east-1
|
|
155
|
+
secondary:
|
|
156
|
+
- us-west-2
|
|
157
|
+
- eu-west-1
|
|
158
|
+
- ap-southeast-1
|
|
159
|
+
|
|
160
|
+
failover:
|
|
161
|
+
automatic: true
|
|
162
|
+
health-check-interval: 30s
|
|
163
|
+
failover-threshold: 3
|
|
164
|
+
|
|
165
|
+
data-replication:
|
|
166
|
+
strategy: active-active
|
|
167
|
+
conflict-resolution: last-write-wins
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## Configuration
|
|
171
|
+
|
|
172
|
+
### Basic Multi-Cloud Setup
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
# Configure multiple cloud providers
|
|
176
|
+
agentuity config set-cloud aws \
|
|
177
|
+
--access-key-id $AWS_ACCESS_KEY \
|
|
178
|
+
--secret-access-key $AWS_SECRET_KEY \
|
|
179
|
+
--region us-east-1
|
|
180
|
+
|
|
181
|
+
agentuity config set-cloud azure \
|
|
182
|
+
--subscription-id $AZURE_SUBSCRIPTION \
|
|
183
|
+
--tenant-id $AZURE_TENANT \
|
|
184
|
+
--region eastus
|
|
185
|
+
|
|
186
|
+
agentuity config set-cloud gcp \
|
|
187
|
+
--project-id $GCP_PROJECT \
|
|
188
|
+
--key-file $GCP_KEY_FILE \
|
|
189
|
+
--region us-central1
|
|
190
|
+
|
|
191
|
+
# Deploy across all configured clouds
|
|
192
|
+
agentuity deploy --gravity
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### Gravity Network Features
|
|
196
|
+
|
|
197
|
+
```yaml
|
|
198
|
+
# agentuity.yaml
|
|
199
|
+
gravity:
|
|
200
|
+
# Enable Gravity Network features
|
|
201
|
+
enabled: true
|
|
202
|
+
|
|
203
|
+
# Agent discovery across environments
|
|
204
|
+
discovery:
|
|
205
|
+
enabled: true
|
|
206
|
+
protocol: mDNS # or consul, etcd
|
|
207
|
+
|
|
208
|
+
# Cross-environment communication
|
|
209
|
+
mesh:
|
|
210
|
+
enabled: true
|
|
211
|
+
encryption: wireguard
|
|
212
|
+
load-balancing: round-robin
|
|
213
|
+
|
|
214
|
+
# Data synchronization
|
|
215
|
+
sync:
|
|
216
|
+
enabled: true
|
|
217
|
+
services:
|
|
218
|
+
- kv-store
|
|
219
|
+
- vector-db
|
|
220
|
+
strategy: eventual-consistency
|
|
221
|
+
|
|
222
|
+
# Global routing
|
|
223
|
+
routing:
|
|
224
|
+
strategy: geo-latency
|
|
225
|
+
fallback: nearest-available
|
|
226
|
+
health-check: true
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
## Deployment Strategies
|
|
230
|
+
|
|
231
|
+
### Geographic Routing
|
|
232
|
+
|
|
233
|
+
Route requests based on user location:
|
|
234
|
+
|
|
235
|
+
```yaml
|
|
236
|
+
routing:
|
|
237
|
+
strategy: geographic
|
|
238
|
+
rules:
|
|
239
|
+
- region: americas
|
|
240
|
+
target: aws:us-east-1
|
|
241
|
+
- region: europe
|
|
242
|
+
target: azure:westeurope
|
|
243
|
+
- region: asia
|
|
244
|
+
target: gcp:asia-southeast1
|
|
245
|
+
- default: aws:us-east-1
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Weighted Distribution
|
|
249
|
+
|
|
250
|
+
Gradual rollout across environments:
|
|
251
|
+
|
|
252
|
+
```yaml
|
|
253
|
+
routing:
|
|
254
|
+
strategy: weighted
|
|
255
|
+
weights:
|
|
256
|
+
aws:us-east-1: 70
|
|
257
|
+
azure:eastus: 20
|
|
258
|
+
gcp:us-central1: 10
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Canary with Gravity
|
|
262
|
+
|
|
263
|
+
Test new versions in one environment:
|
|
264
|
+
|
|
265
|
+
```yaml
|
|
266
|
+
deployment:
|
|
267
|
+
canary:
|
|
268
|
+
enabled: true
|
|
269
|
+
initial-environment: aws:us-west-2
|
|
270
|
+
traffic: 5%
|
|
271
|
+
duration: 1h
|
|
272
|
+
success-criteria:
|
|
273
|
+
error-rate: < 0.01
|
|
274
|
+
latency-p99: < 500ms
|
|
275
|
+
on-success: promote-all-environments
|
|
276
|
+
on-failure: rollback
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
## Cross-Environment Features
|
|
280
|
+
|
|
281
|
+
### Agent-to-Agent Communication
|
|
282
|
+
|
|
283
|
+
Agents can call each other across any environment:
|
|
284
|
+
|
|
285
|
+
```typescript
|
|
286
|
+
import { createAgent } from '@agentuity/runtime';
|
|
287
|
+
|
|
288
|
+
const agentA = createAgent('agent-a', {
|
|
289
|
+
handler: async (ctx) => {
|
|
290
|
+
// Call agent-b regardless of where it's deployed
|
|
291
|
+
const result = await ctx.callAgent('agent-b', {
|
|
292
|
+
data: 'Hello from agent-a'
|
|
293
|
+
});
|
|
294
|
+
return result;
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
// Gravity Network handles:
|
|
299
|
+
// - Service discovery
|
|
300
|
+
// - Load balancing
|
|
301
|
+
// - Encryption
|
|
302
|
+
// - Retries and timeouts
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
### Global State Synchronization
|
|
306
|
+
|
|
307
|
+
```typescript
|
|
308
|
+
import { kv } from '@agentuity/runtime';
|
|
309
|
+
|
|
310
|
+
// Writes are replicated across all deployments
|
|
311
|
+
await kv.set('user:123', { name: 'Alice' }, {
|
|
312
|
+
replication: 'all-regions',
|
|
313
|
+
consistency: 'eventual'
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
// Reads are local-first for performance
|
|
317
|
+
const user = await kv.get('user:123');
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
### Distributed Tracing
|
|
321
|
+
|
|
322
|
+
```typescript
|
|
323
|
+
import { trace } from '@agentuity/runtime';
|
|
324
|
+
|
|
325
|
+
// Traces follow requests across environments
|
|
326
|
+
const span = trace.startSpan('process-request');
|
|
327
|
+
span.setAttribute('environment', process.env.DEPLOYMENT_ENV);
|
|
328
|
+
|
|
329
|
+
// Automatically propagates across agent calls
|
|
330
|
+
await ctx.callAgent('downstream-agent', data);
|
|
331
|
+
|
|
332
|
+
span.end();
|
|
333
|
+
|
|
334
|
+
// View traces in Agentuity Console:
|
|
335
|
+
// Request flows through AWS -> Azure -> On-Prem
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
## Data Residency & Compliance
|
|
339
|
+
|
|
340
|
+
### Regional Data Isolation
|
|
341
|
+
|
|
342
|
+
```yaml
|
|
343
|
+
compliance:
|
|
344
|
+
data-residency:
|
|
345
|
+
enabled: true
|
|
346
|
+
rules:
|
|
347
|
+
# EU data stays in EU
|
|
348
|
+
- data-class: eu-customer-data
|
|
349
|
+
allowed-regions:
|
|
350
|
+
- azure:westeurope
|
|
351
|
+
- aws:eu-west-1
|
|
352
|
+
deny-all-others: true
|
|
353
|
+
|
|
354
|
+
# US data can use any US region
|
|
355
|
+
- data-class: us-data
|
|
356
|
+
allowed-regions:
|
|
357
|
+
- aws:us-*
|
|
358
|
+
- azure:*us*
|
|
359
|
+
- gcp:us-*
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
### Cross-Border Data Transfer
|
|
363
|
+
|
|
364
|
+
```yaml
|
|
365
|
+
compliance:
|
|
366
|
+
cross-border-transfer:
|
|
367
|
+
enabled: false # Block by default
|
|
368
|
+
allowed-pairs:
|
|
369
|
+
# Only specific paths allowed
|
|
370
|
+
- source: aws:us-east-1
|
|
371
|
+
destination: aws:eu-west-1
|
|
372
|
+
justification: "GDPR compliant transfer"
|
|
373
|
+
approval: "GDPR-2024-001"
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
## Edge Computing Use Cases
|
|
377
|
+
|
|
378
|
+
### IoT Agent Deployment
|
|
379
|
+
|
|
380
|
+
```yaml
|
|
381
|
+
# Deploy agents to edge locations near IoT devices
|
|
382
|
+
deployment:
|
|
383
|
+
type: edge
|
|
384
|
+
edge-tier: industrial
|
|
385
|
+
|
|
386
|
+
# Deploy to specific edge locations
|
|
387
|
+
locations:
|
|
388
|
+
- factory-floor-1 # On-premises edge
|
|
389
|
+
- warehouse-2 # On-premises edge
|
|
390
|
+
- aws-wavelength:us-east-1 # Telecom edge
|
|
391
|
+
|
|
392
|
+
# Minimal latency requirements
|
|
393
|
+
latency:
|
|
394
|
+
device-to-agent: < 10ms
|
|
395
|
+
agent-to-cloud: < 100ms
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
### Real-Time Processing
|
|
399
|
+
|
|
400
|
+
```yaml
|
|
401
|
+
# Edge agents with cloud backup
|
|
402
|
+
deployment:
|
|
403
|
+
type: edge-cloud
|
|
404
|
+
|
|
405
|
+
edge:
|
|
406
|
+
# Process at edge for speed
|
|
407
|
+
agents:
|
|
408
|
+
- video-analytics
|
|
409
|
+
- anomaly-detection
|
|
410
|
+
storage: local-ssd
|
|
411
|
+
|
|
412
|
+
cloud:
|
|
413
|
+
# Long-term storage and training in cloud
|
|
414
|
+
agents:
|
|
415
|
+
- model-training
|
|
416
|
+
- data-warehouse
|
|
417
|
+
storage: s3
|
|
418
|
+
|
|
419
|
+
sync:
|
|
420
|
+
# Sync processed data to cloud
|
|
421
|
+
edge-to-cloud: batch
|
|
422
|
+
interval: 5m
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
## Monitoring & Operations
|
|
426
|
+
|
|
427
|
+
### Global Dashboard
|
|
428
|
+
|
|
429
|
+
```bash
|
|
430
|
+
# View all deployments
|
|
431
|
+
agentuity status --gravity
|
|
432
|
+
|
|
433
|
+
# Output:
|
|
434
|
+
# ┌─────────────┬────────────────┬──────────┬──────────┐
|
|
435
|
+
# │ Environment │ Agents Running │ Requests │ Latency │
|
|
436
|
+
# ├─────────────┼────────────────┼──────────┼──────────┤
|
|
437
|
+
# │ AWS US-East │ 5 │ 1.2M/day │ 45ms p50 │
|
|
438
|
+
# │ Azure EU │ 3 │ 800K/day │ 38ms p50 │
|
|
439
|
+
# │ GCP Asia │ 4 │ 950K/day │ 52ms p50 │
|
|
440
|
+
# │ On-Prem DC │ 2 │ 150K/day │ 12ms p50 │
|
|
441
|
+
# └─────────────┴────────────────┴──────────┴──────────┘
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
### Global Metrics
|
|
445
|
+
|
|
446
|
+
```bash
|
|
447
|
+
# Aggregate metrics across all environments
|
|
448
|
+
agentuity metrics aggregate \
|
|
449
|
+
--metric request-rate \
|
|
450
|
+
--metric error-rate \
|
|
451
|
+
--metric latency-p99 \
|
|
452
|
+
--all-environments
|
|
453
|
+
|
|
454
|
+
# Compare environments
|
|
455
|
+
agentuity metrics compare \
|
|
456
|
+
--environments aws:us-east-1,azure:westeurope \
|
|
457
|
+
--period 24h
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
### Health Checks
|
|
461
|
+
|
|
462
|
+
```yaml
|
|
463
|
+
health-checks:
|
|
464
|
+
global:
|
|
465
|
+
enabled: true
|
|
466
|
+
interval: 30s
|
|
467
|
+
endpoints:
|
|
468
|
+
- /health
|
|
469
|
+
- /ready
|
|
470
|
+
|
|
471
|
+
failure-action: failover
|
|
472
|
+
failover-target: nearest-healthy
|
|
473
|
+
|
|
474
|
+
alerts:
|
|
475
|
+
- trigger: environment-down
|
|
476
|
+
action: page-oncall
|
|
477
|
+
- trigger: high-latency
|
|
478
|
+
threshold: 500ms
|
|
479
|
+
action: auto-scale
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
## Disaster Recovery
|
|
483
|
+
|
|
484
|
+
### Automatic Failover
|
|
485
|
+
|
|
486
|
+
```yaml
|
|
487
|
+
disaster-recovery:
|
|
488
|
+
automatic-failover:
|
|
489
|
+
enabled: true
|
|
490
|
+
detection-time: 60s # Detect failure in 60s
|
|
491
|
+
failover-time: 30s # Failover in 30s
|
|
492
|
+
|
|
493
|
+
backup-environments:
|
|
494
|
+
primary: aws:us-east-1
|
|
495
|
+
secondary: azure:eastus
|
|
496
|
+
tertiary: gcp:us-central1
|
|
497
|
+
|
|
498
|
+
data-replication:
|
|
499
|
+
mode: synchronous # Zero data loss
|
|
500
|
+
lag-threshold: 1s
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
### Multi-Cloud Backup
|
|
504
|
+
|
|
505
|
+
```bash
|
|
506
|
+
# Backup to multiple clouds simultaneously
|
|
507
|
+
agentuity backup create \
|
|
508
|
+
--targets aws:s3,azure:blob,gcp:storage \
|
|
509
|
+
--encryption enabled \
|
|
510
|
+
--retention 30d
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
## Cost Optimization
|
|
514
|
+
|
|
515
|
+
### Cost-Aware Routing
|
|
516
|
+
|
|
517
|
+
```yaml
|
|
518
|
+
routing:
|
|
519
|
+
strategy: cost-optimized
|
|
520
|
+
preferences:
|
|
521
|
+
- minimize-cost
|
|
522
|
+
- maintain-latency: < 200ms
|
|
523
|
+
|
|
524
|
+
cost-rules:
|
|
525
|
+
# Use cheaper regions when possible
|
|
526
|
+
- condition: non-peak-hours
|
|
527
|
+
target: spot-instances
|
|
528
|
+
- condition: high-load
|
|
529
|
+
target: reserved-instances
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
### Environment-Specific Scaling
|
|
533
|
+
|
|
534
|
+
```yaml
|
|
535
|
+
scaling:
|
|
536
|
+
per-environment:
|
|
537
|
+
aws:us-east-1:
|
|
538
|
+
min: 3
|
|
539
|
+
max: 50
|
|
540
|
+
strategy: aggressive
|
|
541
|
+
|
|
542
|
+
azure:westeurope:
|
|
543
|
+
min: 1
|
|
544
|
+
max: 20
|
|
545
|
+
strategy: conservative
|
|
546
|
+
|
|
547
|
+
on-prem:
|
|
548
|
+
fixed: 5 # Fixed capacity on-prem
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
## Best Practices
|
|
552
|
+
|
|
553
|
+
1. **Start Regional**: Begin with single-region, expand as needed
|
|
554
|
+
2. **Test Failover**: Regularly test cross-environment failover
|
|
555
|
+
3. **Monitor Costs**: Track per-environment costs
|
|
556
|
+
4. **Data Residency**: Plan data residency requirements early
|
|
557
|
+
5. **Network Security**: Use encrypted tunnels for hybrid
|
|
558
|
+
6. **Health Checks**: Implement comprehensive health monitoring
|
|
559
|
+
7. **Incremental Rollout**: Use canary deployments across environments
|
|
560
|
+
|
|
561
|
+
## Troubleshooting
|
|
562
|
+
|
|
563
|
+
### Cross-Environment Communication Issues
|
|
564
|
+
|
|
565
|
+
```bash
|
|
566
|
+
# Test connectivity between environments
|
|
567
|
+
agentuity network test \
|
|
568
|
+
--source aws:us-east-1 \
|
|
569
|
+
--target azure:westeurope
|
|
570
|
+
|
|
571
|
+
# Check Gravity mesh status
|
|
572
|
+
agentuity gravity status
|
|
573
|
+
|
|
574
|
+
# View routing table
|
|
575
|
+
agentuity gravity routes
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
### Latency Issues
|
|
579
|
+
|
|
580
|
+
```bash
|
|
581
|
+
# Measure latency between all environments
|
|
582
|
+
agentuity network latency-matrix
|
|
583
|
+
|
|
584
|
+
# Optimize routing
|
|
585
|
+
agentuity routing optimize --target latency
|
|
586
|
+
```
|
|
587
|
+
|
|
588
|
+
### Data Sync Issues
|
|
589
|
+
|
|
590
|
+
```bash
|
|
591
|
+
# Check synchronization status
|
|
592
|
+
agentuity sync status
|
|
593
|
+
|
|
594
|
+
# Force sync
|
|
595
|
+
agentuity sync trigger --service kv-store
|
|
596
|
+
|
|
597
|
+
# View sync conflicts
|
|
598
|
+
agentuity sync conflicts --resolve manual
|
|
599
|
+
```
|
|
600
|
+
|
|
601
|
+
## References
|
|
602
|
+
|
|
603
|
+
- [Gravity Network Documentation](https://agentuity.dev/gravity)
|
|
604
|
+
- [Multi-Cloud Best Practices](https://agentuity.dev/multi-cloud)
|
|
605
|
+
- [Edge Computing Guide](https://agentuity.dev/edge)
|
|
606
|
+
- [Data Residency](https://agentuity.dev/compliance/data-residency)
|