@bluefly/openstandardagents 0.2.8 → 0.2.9
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/.env.example +1 -1
- package/.github/AGENTS.md +245 -0
- package/.github/agents/github-issue-triage.ossa.yaml +99 -0
- package/.github/agents/github-pr-triage.ossa.yaml +137 -0
- package/.github/workflows/issue-sync-to-gitlab.yml +138 -0
- package/.github/workflows/pr-triage-to-gitlab.yml +164 -0
- package/.version.json +1 -1
- package/.wiki-config.json +1 -1
- package/CHANGELOG.md +33 -0
- package/CONTRIBUTING.md +102 -3
- package/README.md +17 -10
- package/dist/services/release-automation/schemas/release.schema.js +1 -1
- package/dist/services/release-automation/webhook.service.js +3 -3
- package/dist/services/release-automation/webhook.service.js.map +1 -1
- package/dist/services/runtime/claude/claude-adapter.d.ts +1 -1
- package/dist/services/runtime/claude/claude-adapter.d.ts.map +1 -1
- package/dist/services/runtime/claude/claude-adapter.js +1 -1
- package/dist/services/runtime/claude/claude-adapter.js.map +1 -1
- package/dist/spec/v0.2.9/a2a-protocol.md +1337 -0
- package/dist/spec/v0.2.9/agent.md +1946 -0
- package/dist/spec/v0.2.9/capabilities/index.yaml +25 -0
- package/dist/spec/v0.2.9/capabilities/memory.yaml +251 -0
- package/dist/spec/v0.2.9/capability-schema.md +576 -0
- package/dist/spec/v0.2.9/compliance-profiles.md +533 -0
- package/dist/spec/v0.2.9/conformance-testing.md +1527 -0
- package/dist/spec/v0.2.9/gitlab-duo-integration.md +621 -0
- package/dist/spec/v0.2.9/ossa-0.2.9.schema.json +3699 -0
- package/dist/spec/v0.2.9/runtime-semantics.md +464 -0
- package/dist/spec/v0.2.9/security-model.md +1245 -0
- package/dist/spec/v0.2.9/semantic-conventions.md +347 -0
- package/dist/spec/v0.2.9/types.ts +522 -0
- package/dist/types/policy.d.ts +377 -0
- package/dist/types/policy.d.ts.map +1 -0
- package/dist/types/policy.js +84 -0
- package/dist/types/policy.js.map +1 -0
- package/dist/utils/version.js +1 -1
- package/docs/specs/policy-dsl.md +925 -0
- package/examples/adk-integration/code-review-workflow.yml +1 -1
- package/examples/adk-integration/customer-support.yml +1 -1
- package/examples/adk-integration/data-pipeline.yml +1 -1
- package/examples/advanced/reasoning-agent.yaml +136 -0
- package/examples/advanced/workflows/hybrid-model-strategy.yaml +1 -1
- package/examples/agent-manifests/critics/critic-agent.yaml +1 -1
- package/examples/agent-manifests/governors/governor-agent.yaml +1 -1
- package/examples/agent-manifests/integrators/integrator-agent.yaml +1 -1
- package/examples/agent-manifests/judges/judge-agent.yaml +1 -1
- package/examples/agent-manifests/monitors/monitor-agent.yaml +1 -1
- package/examples/agent-manifests/orchestrators/orchestrator-agent.yaml +1 -1
- package/examples/agent-manifests/sample-compliant-agent.yaml +1 -1
- package/examples/agent-manifests/workers/worker-agent.yaml +1 -1
- package/examples/agents-md/code-agent.ossa.json +100 -0
- package/examples/agents-md/monorepo-agent.ossa.yaml +180 -0
- package/examples/anthropic/claude-assistant.ossa.json +1 -1
- package/examples/autogen/multi-agent.ossa.json +1 -1
- package/examples/claude-code/code-reviewer.ossa.yaml +1 -1
- package/examples/claude-code/ossa-validator.ossa.yaml +2 -2
- package/examples/common_npm/agent-router.ossa.yaml +1 -1
- package/examples/common_npm/agent-router.v0.2.2.ossa.yaml +1 -1
- package/examples/crewai/research-team.ossa.json +1 -1
- package/examples/cursor/code-review-agent.ossa.json +1 -1
- package/examples/drupal/gitlab-ml-recommender.ossa.yaml +1 -1
- package/examples/drupal/gitlab-ml-recommender.v0.2.2.ossa.yaml +1 -1
- package/examples/extensions/agents-md-v1.yml +175 -0
- package/examples/extensions/drupal-v1.yml +1 -1
- package/examples/extensions/kagent-v1.yml +1 -1
- package/examples/getting-started/hello-world-complete.ossa.yaml +1 -1
- package/examples/integration-patterns/agent-to-agent-orchestration.ossa.yaml +4 -4
- package/examples/kagent/compliance-validator.ossa.yaml +1 -1
- package/examples/kagent/cost-optimizer.ossa.yaml +1 -1
- package/examples/kagent/documentation-agent.ossa.yaml +1 -1
- package/examples/kagent/k8s-troubleshooter-v1.ossa.yaml +1 -1
- package/examples/kagent/k8s-troubleshooter-v1.v0.2.2.ossa.yaml +1 -1
- package/examples/kagent/k8s-troubleshooter.ossa.yaml +1 -1
- package/examples/kagent/security-scanner.ossa.yaml +1 -1
- package/examples/langchain/chain-agent.ossa.json +1 -1
- package/examples/langflow/workflow-agent.ossa.json +1 -1
- package/examples/langgraph/state-machine-agent.ossa.json +1 -1
- package/examples/llamaindex/rag-agent.ossa.json +1 -1
- package/examples/migration-guides/from-langchain-to-ossa.yaml +4 -4
- package/examples/multi-agent/conditional-router.ossa.yaml +1 -1
- package/examples/multi-agent/parallel-execution.ossa.yaml +1 -1
- package/examples/multi-agent/sequential-pipeline.ossa.yaml +1 -1
- package/examples/openai/basic-agent.ossa.yaml +1 -1
- package/examples/openai/multi-tool-agent.ossa.json +1 -1
- package/examples/openai/swarm-agent.ossa.json +1 -1
- package/examples/production/document-analyzer-openai.yml +1 -1
- package/examples/quickstart/support-agent.ossa.yaml +1 -1
- package/examples/templates/ossa-compliance.yaml +1 -1
- package/examples/vercel/edge-agent.ossa.json +1 -1
- package/llms.txt +1 -1
- package/package.json +5 -3
- package/scripts/README.md +25 -0
- package/scripts/compliance-audit.ts +796 -0
- package/scripts/generate-agents-catalog.ts +2 -1
- package/scripts/generate-api-docs.ts +2 -1
- package/scripts/generate-examples-docs.ts +2 -1
- package/scripts/generate-llms-ctx.sh +2 -2
- package/spec/v0.2.9/a2a-protocol.md +1337 -0
- package/spec/v0.2.9/agent.md +1946 -0
- package/spec/v0.2.9/capabilities/index.yaml +25 -0
- package/spec/v0.2.9/capabilities/memory.yaml +251 -0
- package/spec/v0.2.9/capability-schema.md +576 -0
- package/spec/v0.2.9/compliance-profiles.md +533 -0
- package/spec/v0.2.9/conformance-testing.md +1527 -0
- package/spec/v0.2.9/gitlab-duo-integration.md +621 -0
- package/spec/v0.2.9/ossa-0.2.9.schema.json +3699 -0
- package/spec/v0.2.9/runtime-semantics.md +464 -0
- package/spec/v0.2.9/security-model.md +1245 -0
- package/spec/v0.2.9/semantic-conventions.md +347 -0
- package/spec/v0.2.9/types.ts +522 -0
- package/test-results/junit.xml +184 -146
- package/.github/workflows/pr-comment.yml +0 -33
|
@@ -0,0 +1,1946 @@
|
|
|
1
|
+
# OSSA Agent Manifest Specification
|
|
2
|
+
|
|
3
|
+
**Version**: 0.2.9
|
|
4
|
+
**Status**: Draft
|
|
5
|
+
**Last Updated**: 2025-12-04
|
|
6
|
+
|
|
7
|
+
This document is the authoritative reference for OSSA agent manifests. All OSSA-compliant agents MUST conform to this specification.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Table of Contents
|
|
12
|
+
|
|
13
|
+
1. [Overview](#overview)
|
|
14
|
+
2. [Manifest Structure](#manifest-structure)
|
|
15
|
+
3. [Metadata Section](#metadata-section)
|
|
16
|
+
4. [Spec Section](#spec-section)
|
|
17
|
+
5. [Agent Types](#agent-types)
|
|
18
|
+
6. [Capabilities](#capabilities)
|
|
19
|
+
7. [Runtime Configuration](#runtime-configuration)
|
|
20
|
+
8. [Triggers](#triggers)
|
|
21
|
+
9. [Policies](#policies)
|
|
22
|
+
10. [Examples](#examples)
|
|
23
|
+
11. [Best Practices](#best-practices)
|
|
24
|
+
12. [Anti-Patterns](#anti-patterns)
|
|
25
|
+
13. [Migration Guide](#migration-guide)
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Overview
|
|
30
|
+
|
|
31
|
+
### What is an OSSA Agent?
|
|
32
|
+
|
|
33
|
+
An OSSA agent is a declarative, framework-agnostic specification for AI agents. It defines:
|
|
34
|
+
|
|
35
|
+
- **Identity**: Who the agent is (name, version, labels)
|
|
36
|
+
- **Behavior**: What the agent does (role, reasoning strategy)
|
|
37
|
+
- **Capabilities**: What tools and integrations the agent can use
|
|
38
|
+
- **Runtime**: How the agent executes (LLM, state, observability)
|
|
39
|
+
- **Policies**: Guardrails for safety, security, and reliability
|
|
40
|
+
|
|
41
|
+
### Manifest Purpose and Lifecycle
|
|
42
|
+
|
|
43
|
+
The agent manifest serves as:
|
|
44
|
+
|
|
45
|
+
1. **Contract**: Defines agent behavior for runtime execution
|
|
46
|
+
2. **Documentation**: Human-readable specification of agent purpose
|
|
47
|
+
3. **Portability**: Enables migration between frameworks (LangChain, CrewAI, AutoGen, etc.)
|
|
48
|
+
4. **Compliance**: Enforces regulatory requirements (FedRAMP, HIPAA, SOC2)
|
|
49
|
+
5. **Version Control**: Tracks agent evolution with semver
|
|
50
|
+
|
|
51
|
+
**Lifecycle**:
|
|
52
|
+
```
|
|
53
|
+
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
|
|
54
|
+
│ Author │──▶│ Validate │──▶│ Deploy │──▶│ Execute │
|
|
55
|
+
│ manifest │ │ schema │ │ runtime │ │ agent │
|
|
56
|
+
└──────────┘ └──────────┘ └──────────┘ └──────────┘
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Relationship to JSON Schema
|
|
60
|
+
|
|
61
|
+
Every OSSA manifest MUST validate against the canonical JSON Schema:
|
|
62
|
+
- **Schema URL**: `https://openstandardagents.org/schemas/v0.2.9/agent.json`
|
|
63
|
+
- **Validation**: Required before deployment
|
|
64
|
+
- **Extensions**: Framework-specific extensions are schema-validated
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Manifest Structure
|
|
69
|
+
|
|
70
|
+
All OSSA manifests follow Kubernetes-style resource format:
|
|
71
|
+
|
|
72
|
+
```yaml
|
|
73
|
+
apiVersion: ossa/v0.2.9
|
|
74
|
+
kind: Agent
|
|
75
|
+
metadata:
|
|
76
|
+
name: agent-identifier
|
|
77
|
+
version: 1.0.0
|
|
78
|
+
spec:
|
|
79
|
+
# Agent specification
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Required Fields
|
|
83
|
+
|
|
84
|
+
| Field | Type | Description | Example |
|
|
85
|
+
|-------|------|-------------|---------|
|
|
86
|
+
| `apiVersion` | string | OSSA API version | `ossa/v0.2.9` |
|
|
87
|
+
| `kind` | string | Resource type | `Agent` |
|
|
88
|
+
| `metadata` | object | Agent metadata | See [Metadata](#metadata-section) |
|
|
89
|
+
| `spec` | object | Agent specification | See [Spec](#spec-section) |
|
|
90
|
+
|
|
91
|
+
### Optional Fields
|
|
92
|
+
|
|
93
|
+
| Field | Type | Description |
|
|
94
|
+
|-------|------|-------------|
|
|
95
|
+
| `extensions` | object | Framework-specific extensions |
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Metadata Section
|
|
100
|
+
|
|
101
|
+
The `metadata` section provides agent identity and classification.
|
|
102
|
+
|
|
103
|
+
### Required Metadata
|
|
104
|
+
|
|
105
|
+
#### `name`
|
|
106
|
+
|
|
107
|
+
**Type**: `string`
|
|
108
|
+
**Pattern**: `^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
|
|
109
|
+
**Max Length**: 253 characters
|
|
110
|
+
|
|
111
|
+
**Rules**:
|
|
112
|
+
- Lowercase alphanumeric characters only
|
|
113
|
+
- Hyphens allowed (not at start/end)
|
|
114
|
+
- Kubernetes DNS-1123 subdomain format
|
|
115
|
+
- Must be globally unique within namespace
|
|
116
|
+
|
|
117
|
+
**Examples**:
|
|
118
|
+
```yaml
|
|
119
|
+
# Valid
|
|
120
|
+
metadata:
|
|
121
|
+
name: security-scanner
|
|
122
|
+
name: code-reviewer-v2
|
|
123
|
+
name: doc-generator-123
|
|
124
|
+
|
|
125
|
+
# Invalid
|
|
126
|
+
metadata:
|
|
127
|
+
name: Security_Scanner # No uppercase or underscores
|
|
128
|
+
name: -agent-name # Cannot start with hyphen
|
|
129
|
+
name: agent.name # No dots allowed
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Optional Metadata
|
|
133
|
+
|
|
134
|
+
#### `version`
|
|
135
|
+
|
|
136
|
+
**Type**: `string`
|
|
137
|
+
**Pattern**: Semantic Versioning 2.0.0
|
|
138
|
+
**Format**: `MAJOR.MINOR.PATCH[-PRERELEASE][+BUILD]`
|
|
139
|
+
|
|
140
|
+
**Rules**:
|
|
141
|
+
- MUST follow semver 2.0.0 specification
|
|
142
|
+
- Breaking changes MUST increment MAJOR
|
|
143
|
+
- New features MUST increment MINOR
|
|
144
|
+
- Bug fixes MUST increment PATCH
|
|
145
|
+
|
|
146
|
+
**Examples**:
|
|
147
|
+
```yaml
|
|
148
|
+
metadata:
|
|
149
|
+
version: 1.0.0
|
|
150
|
+
version: 2.1.3-beta.1
|
|
151
|
+
version: 1.0.0+build.2024.12.04
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
#### `description`
|
|
155
|
+
|
|
156
|
+
**Type**: `string`
|
|
157
|
+
**Max Length**: 2000 characters
|
|
158
|
+
|
|
159
|
+
Human-readable description of agent purpose and capabilities.
|
|
160
|
+
|
|
161
|
+
**Example**:
|
|
162
|
+
```yaml
|
|
163
|
+
metadata:
|
|
164
|
+
description: |
|
|
165
|
+
Security vulnerability scanner for Kubernetes clusters.
|
|
166
|
+
Analyzes pod configurations, network policies, and RBAC
|
|
167
|
+
to identify security risks and compliance violations.
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
#### `labels`
|
|
171
|
+
|
|
172
|
+
**Type**: `object<string, string>`
|
|
173
|
+
**Value Max Length**: 63 characters
|
|
174
|
+
|
|
175
|
+
Key-value pairs for organization and filtering. Used by runtime selectors.
|
|
176
|
+
|
|
177
|
+
**Example**:
|
|
178
|
+
```yaml
|
|
179
|
+
metadata:
|
|
180
|
+
labels:
|
|
181
|
+
domain: security
|
|
182
|
+
team: platform
|
|
183
|
+
environment: production
|
|
184
|
+
compliance: fedramp
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
#### `annotations`
|
|
188
|
+
|
|
189
|
+
**Type**: `object<string, string>`
|
|
190
|
+
|
|
191
|
+
Arbitrary metadata for tooling. NOT used for filtering.
|
|
192
|
+
|
|
193
|
+
**Example**:
|
|
194
|
+
```yaml
|
|
195
|
+
metadata:
|
|
196
|
+
annotations:
|
|
197
|
+
ossa.io/author: platform-team@example.com
|
|
198
|
+
ossa.io/docs: https://docs.example.com/agents/security-scanner
|
|
199
|
+
ossa.io/issue-tracker: https://github.com/org/repo/issues
|
|
200
|
+
buildkit.io/cost-center: security-ops
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Spec Section
|
|
206
|
+
|
|
207
|
+
The `spec` section defines agent behavior, capabilities, and runtime configuration.
|
|
208
|
+
|
|
209
|
+
### Required Spec Fields
|
|
210
|
+
|
|
211
|
+
#### `role`
|
|
212
|
+
|
|
213
|
+
**Type**: `string`
|
|
214
|
+
**Min Length**: 1
|
|
215
|
+
|
|
216
|
+
The agent's system prompt describing behavior and capabilities.
|
|
217
|
+
|
|
218
|
+
**Example**:
|
|
219
|
+
```yaml
|
|
220
|
+
spec:
|
|
221
|
+
role: |
|
|
222
|
+
You are a security expert specializing in Kubernetes security.
|
|
223
|
+
Your role is to analyze cluster configurations and identify
|
|
224
|
+
security vulnerabilities based on CIS Kubernetes Benchmarks.
|
|
225
|
+
|
|
226
|
+
Provide actionable recommendations with remediation steps.
|
|
227
|
+
Prioritize findings by severity (Critical, High, Medium, Low).
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
**Best Practices**:
|
|
231
|
+
- Be specific about domain expertise
|
|
232
|
+
- Define output format expectations
|
|
233
|
+
- Specify tone and communication style
|
|
234
|
+
- Include constraints and limitations
|
|
235
|
+
|
|
236
|
+
### Optional Spec Fields
|
|
237
|
+
|
|
238
|
+
#### `taxonomy`
|
|
239
|
+
|
|
240
|
+
**Type**: `object`
|
|
241
|
+
|
|
242
|
+
Hierarchical classification for agent discovery.
|
|
243
|
+
|
|
244
|
+
```yaml
|
|
245
|
+
spec:
|
|
246
|
+
taxonomy:
|
|
247
|
+
domain: infrastructure # Primary domain
|
|
248
|
+
subdomain: kubernetes # Secondary classification
|
|
249
|
+
capability: troubleshooting # Specific function
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
**Common Domains**:
|
|
253
|
+
- `infrastructure`: Cloud, Kubernetes, networking
|
|
254
|
+
- `security`: Vulnerability scanning, compliance
|
|
255
|
+
- `development`: Code review, testing
|
|
256
|
+
- `documentation`: Generation, maintenance
|
|
257
|
+
- `compliance`: Auditing, reporting
|
|
258
|
+
|
|
259
|
+
#### `llm`
|
|
260
|
+
|
|
261
|
+
**Type**: `object`
|
|
262
|
+
|
|
263
|
+
LLM provider and configuration. See [Runtime Configuration](#runtime-configuration).
|
|
264
|
+
|
|
265
|
+
#### `tools`
|
|
266
|
+
|
|
267
|
+
**Type**: `array<Tool>`
|
|
268
|
+
|
|
269
|
+
Available tools and integrations. See [Capabilities](#capabilities).
|
|
270
|
+
|
|
271
|
+
#### `autonomy`
|
|
272
|
+
|
|
273
|
+
**Type**: `object`
|
|
274
|
+
|
|
275
|
+
Autonomous execution behavior (requires approval, escalation, etc.).
|
|
276
|
+
|
|
277
|
+
#### `constraints`
|
|
278
|
+
|
|
279
|
+
**Type**: `object`
|
|
280
|
+
|
|
281
|
+
Resource limits and execution constraints.
|
|
282
|
+
|
|
283
|
+
#### `observability`
|
|
284
|
+
|
|
285
|
+
**Type**: `object`
|
|
286
|
+
|
|
287
|
+
Logging, tracing, and metrics configuration.
|
|
288
|
+
|
|
289
|
+
#### `state`
|
|
290
|
+
|
|
291
|
+
**Type**: `object`
|
|
292
|
+
|
|
293
|
+
State management (persistent, ephemeral, versioning).
|
|
294
|
+
|
|
295
|
+
#### `security`
|
|
296
|
+
|
|
297
|
+
**Type**: `object`
|
|
298
|
+
|
|
299
|
+
Security policies (authentication, authorization, secrets).
|
|
300
|
+
|
|
301
|
+
#### `reliability`
|
|
302
|
+
|
|
303
|
+
**Type**: `object`
|
|
304
|
+
|
|
305
|
+
Retry policies, circuit breakers, timeouts.
|
|
306
|
+
|
|
307
|
+
#### `collaboration`
|
|
308
|
+
|
|
309
|
+
**Type**: `object`
|
|
310
|
+
|
|
311
|
+
Multi-agent communication and delegation.
|
|
312
|
+
|
|
313
|
+
#### `safety`
|
|
314
|
+
|
|
315
|
+
**Type**: `object`
|
|
316
|
+
|
|
317
|
+
Content filtering, PII redaction, guardrails.
|
|
318
|
+
|
|
319
|
+
#### `deployment`
|
|
320
|
+
|
|
321
|
+
**Type**: `object`
|
|
322
|
+
|
|
323
|
+
Runtime environment requirements.
|
|
324
|
+
|
|
325
|
+
#### `reasoning`
|
|
326
|
+
|
|
327
|
+
**Type**: `object`
|
|
328
|
+
|
|
329
|
+
Reasoning strategy (ReAct, Chain-of-Thought, Tree-of-Thought).
|
|
330
|
+
|
|
331
|
+
#### `prompts`
|
|
332
|
+
|
|
333
|
+
**Type**: `object`
|
|
334
|
+
|
|
335
|
+
Versioned prompt templates.
|
|
336
|
+
|
|
337
|
+
#### `knowledge_graph`
|
|
338
|
+
|
|
339
|
+
**Type**: `object`
|
|
340
|
+
|
|
341
|
+
Knowledge graph integration.
|
|
342
|
+
|
|
343
|
+
#### `identity`
|
|
344
|
+
|
|
345
|
+
**Type**: `object`
|
|
346
|
+
|
|
347
|
+
Identity management (session IDs, instance IDs, trace context).
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
## Agent Types
|
|
352
|
+
|
|
353
|
+
OSSA supports three agent types based on autonomy and collaboration patterns.
|
|
354
|
+
|
|
355
|
+
### Worker Agent
|
|
356
|
+
|
|
357
|
+
**Purpose**: Executes specific tasks with minimal autonomy.
|
|
358
|
+
|
|
359
|
+
**Characteristics**:
|
|
360
|
+
- Single-purpose, focused capability
|
|
361
|
+
- Requires human approval for actions
|
|
362
|
+
- Stateless or minimal state
|
|
363
|
+
- Low complexity
|
|
364
|
+
|
|
365
|
+
**Use Cases**:
|
|
366
|
+
- Code formatting
|
|
367
|
+
- Data validation
|
|
368
|
+
- Simple transformations
|
|
369
|
+
- Query execution
|
|
370
|
+
|
|
371
|
+
**Example**:
|
|
372
|
+
```yaml
|
|
373
|
+
apiVersion: ossa/v0.2.9
|
|
374
|
+
kind: Agent
|
|
375
|
+
metadata:
|
|
376
|
+
name: code-formatter
|
|
377
|
+
labels:
|
|
378
|
+
type: worker
|
|
379
|
+
spec:
|
|
380
|
+
taxonomy:
|
|
381
|
+
domain: development
|
|
382
|
+
subdomain: code-quality
|
|
383
|
+
capability: formatting
|
|
384
|
+
role: Format code according to project style guides
|
|
385
|
+
autonomy:
|
|
386
|
+
approval_required: false # Safe, deterministic operation
|
|
387
|
+
max_turns: 1
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
### Orchestrator Agent
|
|
391
|
+
|
|
392
|
+
**Purpose**: Coordinates multiple agents and complex workflows.
|
|
393
|
+
|
|
394
|
+
**Characteristics**:
|
|
395
|
+
- Multi-agent delegation
|
|
396
|
+
- Workflow orchestration
|
|
397
|
+
- State management across agents
|
|
398
|
+
- Higher autonomy
|
|
399
|
+
|
|
400
|
+
**Use Cases**:
|
|
401
|
+
- Build pipelines
|
|
402
|
+
- Security audits
|
|
403
|
+
- Complex troubleshooting
|
|
404
|
+
- Multi-step deployments
|
|
405
|
+
|
|
406
|
+
**Example**:
|
|
407
|
+
```yaml
|
|
408
|
+
apiVersion: ossa/v0.2.9
|
|
409
|
+
kind: Agent
|
|
410
|
+
metadata:
|
|
411
|
+
name: security-orchestrator
|
|
412
|
+
labels:
|
|
413
|
+
type: orchestrator
|
|
414
|
+
spec:
|
|
415
|
+
taxonomy:
|
|
416
|
+
domain: security
|
|
417
|
+
subdomain: orchestration
|
|
418
|
+
capability: audit
|
|
419
|
+
role: Orchestrate comprehensive security audits
|
|
420
|
+
collaboration:
|
|
421
|
+
delegation:
|
|
422
|
+
enabled: true
|
|
423
|
+
max_depth: 3
|
|
424
|
+
agents:
|
|
425
|
+
- vulnerability-scanner
|
|
426
|
+
- compliance-checker
|
|
427
|
+
- remediation-planner
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
### Hybrid Agent
|
|
431
|
+
|
|
432
|
+
**Purpose**: Balances autonomy with human oversight.
|
|
433
|
+
|
|
434
|
+
**Characteristics**:
|
|
435
|
+
- Conditional autonomy
|
|
436
|
+
- Escalation workflows
|
|
437
|
+
- Approval gates for critical actions
|
|
438
|
+
- Context-aware decision making
|
|
439
|
+
|
|
440
|
+
**Use Cases**:
|
|
441
|
+
- Interactive troubleshooting
|
|
442
|
+
- Assisted deployments
|
|
443
|
+
- Code review with recommendations
|
|
444
|
+
- Compliance remediation
|
|
445
|
+
|
|
446
|
+
**Example**:
|
|
447
|
+
```yaml
|
|
448
|
+
apiVersion: ossa/v0.2.9
|
|
449
|
+
kind: Agent
|
|
450
|
+
metadata:
|
|
451
|
+
name: deployment-assistant
|
|
452
|
+
labels:
|
|
453
|
+
type: hybrid
|
|
454
|
+
spec:
|
|
455
|
+
taxonomy:
|
|
456
|
+
domain: infrastructure
|
|
457
|
+
subdomain: deployment
|
|
458
|
+
capability: assisted-deployment
|
|
459
|
+
role: Assist with production deployments
|
|
460
|
+
autonomy:
|
|
461
|
+
approval_required: true # Require approval for prod changes
|
|
462
|
+
approval_gates:
|
|
463
|
+
- action: deploy
|
|
464
|
+
approvers:
|
|
465
|
+
- role:platform-admin
|
|
466
|
+
- action: database_migration
|
|
467
|
+
approvers:
|
|
468
|
+
- role:dba
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
---
|
|
472
|
+
|
|
473
|
+
## Capabilities
|
|
474
|
+
|
|
475
|
+
Capabilities define tools and integrations available to the agent.
|
|
476
|
+
|
|
477
|
+
### Tool Types
|
|
478
|
+
|
|
479
|
+
#### MCP (Model Context Protocol)
|
|
480
|
+
|
|
481
|
+
Connect to MCP servers for tool discovery and execution.
|
|
482
|
+
|
|
483
|
+
```yaml
|
|
484
|
+
spec:
|
|
485
|
+
tools:
|
|
486
|
+
- type: mcp
|
|
487
|
+
server: filesystem
|
|
488
|
+
namespace: default
|
|
489
|
+
capabilities:
|
|
490
|
+
- name: read_file
|
|
491
|
+
version: "1.0"
|
|
492
|
+
- name: write_file
|
|
493
|
+
version: "1.0"
|
|
494
|
+
auth:
|
|
495
|
+
type: none
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
#### Kubernetes
|
|
499
|
+
|
|
500
|
+
Interact with Kubernetes API.
|
|
501
|
+
|
|
502
|
+
```yaml
|
|
503
|
+
spec:
|
|
504
|
+
tools:
|
|
505
|
+
- type: kubernetes
|
|
506
|
+
namespace: production
|
|
507
|
+
capabilities:
|
|
508
|
+
- name: get_pods
|
|
509
|
+
- name: describe_pod
|
|
510
|
+
- name: get_logs
|
|
511
|
+
auth:
|
|
512
|
+
type: bearer
|
|
513
|
+
credentials: ${KUBE_TOKEN} # Reference, not actual secret
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
#### HTTP
|
|
517
|
+
|
|
518
|
+
Call HTTP APIs.
|
|
519
|
+
|
|
520
|
+
```yaml
|
|
521
|
+
spec:
|
|
522
|
+
tools:
|
|
523
|
+
- type: http
|
|
524
|
+
name: github-api
|
|
525
|
+
endpoint: https://api.github.com
|
|
526
|
+
capabilities:
|
|
527
|
+
- name: create_issue
|
|
528
|
+
version: "2022-11-28"
|
|
529
|
+
auth:
|
|
530
|
+
type: bearer
|
|
531
|
+
credentials: ${GITHUB_TOKEN}
|
|
532
|
+
circuit_breaker:
|
|
533
|
+
enabled: true
|
|
534
|
+
failure_threshold: 5
|
|
535
|
+
timeout_seconds: 60
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
#### gRPC
|
|
539
|
+
|
|
540
|
+
Call gRPC services.
|
|
541
|
+
|
|
542
|
+
```yaml
|
|
543
|
+
spec:
|
|
544
|
+
tools:
|
|
545
|
+
- type: grpc
|
|
546
|
+
name: audit-service
|
|
547
|
+
endpoint: audit.example.com:443
|
|
548
|
+
capabilities:
|
|
549
|
+
- name: log_event
|
|
550
|
+
auth:
|
|
551
|
+
type: mtls
|
|
552
|
+
credentials: ${MTLS_CERT}
|
|
553
|
+
transport:
|
|
554
|
+
protocol: grpc
|
|
555
|
+
tls:
|
|
556
|
+
enabled: true
|
|
557
|
+
```
|
|
558
|
+
|
|
559
|
+
#### Function
|
|
560
|
+
|
|
561
|
+
Invoke serverless functions.
|
|
562
|
+
|
|
563
|
+
```yaml
|
|
564
|
+
spec:
|
|
565
|
+
tools:
|
|
566
|
+
- type: function
|
|
567
|
+
name: image-processor
|
|
568
|
+
capabilities:
|
|
569
|
+
- name: resize_image
|
|
570
|
+
- name: convert_format
|
|
571
|
+
config:
|
|
572
|
+
runtime: nodejs20
|
|
573
|
+
memory_mb: 512
|
|
574
|
+
timeout_seconds: 30
|
|
575
|
+
```
|
|
576
|
+
|
|
577
|
+
#### A2A (Agent-to-Agent)
|
|
578
|
+
|
|
579
|
+
Communicate with other OSSA agents.
|
|
580
|
+
|
|
581
|
+
```yaml
|
|
582
|
+
spec:
|
|
583
|
+
tools:
|
|
584
|
+
- type: a2a
|
|
585
|
+
name: specialist-agent
|
|
586
|
+
capabilities:
|
|
587
|
+
- name: analyze_security
|
|
588
|
+
transport:
|
|
589
|
+
protocol: http
|
|
590
|
+
endpoint: http://specialist-agent.default.svc.cluster.local:8080
|
|
591
|
+
```
|
|
592
|
+
|
|
593
|
+
### Capability Configuration
|
|
594
|
+
|
|
595
|
+
Each capability can define:
|
|
596
|
+
|
|
597
|
+
#### Input/Output Schemas
|
|
598
|
+
|
|
599
|
+
```yaml
|
|
600
|
+
capabilities:
|
|
601
|
+
- name: create_ticket
|
|
602
|
+
version: "1.0"
|
|
603
|
+
input_schema:
|
|
604
|
+
type: object
|
|
605
|
+
required: [title, description]
|
|
606
|
+
properties:
|
|
607
|
+
title:
|
|
608
|
+
type: string
|
|
609
|
+
description:
|
|
610
|
+
type: string
|
|
611
|
+
priority:
|
|
612
|
+
type: string
|
|
613
|
+
enum: [low, medium, high, critical]
|
|
614
|
+
output_schema:
|
|
615
|
+
type: object
|
|
616
|
+
properties:
|
|
617
|
+
ticket_id:
|
|
618
|
+
type: string
|
|
619
|
+
url:
|
|
620
|
+
type: string
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
#### Retry Policy
|
|
624
|
+
|
|
625
|
+
```yaml
|
|
626
|
+
capabilities:
|
|
627
|
+
- name: external_api_call
|
|
628
|
+
retry_policy:
|
|
629
|
+
max_attempts: 3
|
|
630
|
+
backoff_strategy: exponential
|
|
631
|
+
initial_delay_ms: 1000
|
|
632
|
+
max_delay_ms: 30000
|
|
633
|
+
retryable_errors:
|
|
634
|
+
- RATE_LIMIT_EXCEEDED
|
|
635
|
+
- SERVICE_UNAVAILABLE
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
#### Error Handling
|
|
639
|
+
|
|
640
|
+
```yaml
|
|
641
|
+
capabilities:
|
|
642
|
+
- name: primary_service
|
|
643
|
+
error_handling:
|
|
644
|
+
fallback_capability: backup_service
|
|
645
|
+
on_error: fallback
|
|
646
|
+
error_mapping:
|
|
647
|
+
CONNECTION_REFUSED: SERVICE_UNAVAILABLE
|
|
648
|
+
TIMEOUT: DEADLINE_EXCEEDED
|
|
649
|
+
```
|
|
650
|
+
|
|
651
|
+
#### Caching
|
|
652
|
+
|
|
653
|
+
```yaml
|
|
654
|
+
capabilities:
|
|
655
|
+
- name: expensive_query
|
|
656
|
+
caching:
|
|
657
|
+
enabled: true
|
|
658
|
+
ttl_seconds: 3600
|
|
659
|
+
cache_key_fields:
|
|
660
|
+
- query_id
|
|
661
|
+
- parameters
|
|
662
|
+
invalidation_strategy: ttl
|
|
663
|
+
```
|
|
664
|
+
|
|
665
|
+
#### Timeouts
|
|
666
|
+
|
|
667
|
+
```yaml
|
|
668
|
+
capabilities:
|
|
669
|
+
- name: long_running_task
|
|
670
|
+
timeout:
|
|
671
|
+
execution_seconds: 300
|
|
672
|
+
connection_seconds: 10
|
|
673
|
+
```
|
|
674
|
+
|
|
675
|
+
#### Compliance Tagging
|
|
676
|
+
|
|
677
|
+
```yaml
|
|
678
|
+
capabilities:
|
|
679
|
+
- name: process_health_data
|
|
680
|
+
compliance_tags:
|
|
681
|
+
- pii
|
|
682
|
+
- phi
|
|
683
|
+
- hipaa
|
|
684
|
+
- gdpr
|
|
685
|
+
```
|
|
686
|
+
|
|
687
|
+
---
|
|
688
|
+
|
|
689
|
+
## Runtime Configuration
|
|
690
|
+
|
|
691
|
+
### LLM Configuration
|
|
692
|
+
|
|
693
|
+
```yaml
|
|
694
|
+
spec:
|
|
695
|
+
llm:
|
|
696
|
+
provider: anthropic
|
|
697
|
+
model: claude-3-sonnet-20240229
|
|
698
|
+
temperature: 0.7
|
|
699
|
+
maxTokens: 4096
|
|
700
|
+
topP: 0.9
|
|
701
|
+
|
|
702
|
+
# Fallback models
|
|
703
|
+
fallback_models:
|
|
704
|
+
- provider: openai
|
|
705
|
+
model: gpt-4-turbo-preview
|
|
706
|
+
- provider: google
|
|
707
|
+
model: gemini-pro
|
|
708
|
+
|
|
709
|
+
# Retry configuration
|
|
710
|
+
retry_config:
|
|
711
|
+
max_attempts: 3
|
|
712
|
+
backoff_strategy: exponential
|
|
713
|
+
|
|
714
|
+
# Cost tracking
|
|
715
|
+
cost_tracking:
|
|
716
|
+
enabled: true
|
|
717
|
+
budget_alert_threshold: 100.00
|
|
718
|
+
cost_allocation_tags:
|
|
719
|
+
team: security
|
|
720
|
+
project: cluster-audit
|
|
721
|
+
```
|
|
722
|
+
|
|
723
|
+
### State Management
|
|
724
|
+
|
|
725
|
+
```yaml
|
|
726
|
+
spec:
|
|
727
|
+
state:
|
|
728
|
+
persistence:
|
|
729
|
+
enabled: true
|
|
730
|
+
backend: redis
|
|
731
|
+
encryption:
|
|
732
|
+
enabled: true
|
|
733
|
+
algorithm: AES-256-GCM
|
|
734
|
+
|
|
735
|
+
versioning:
|
|
736
|
+
enabled: true
|
|
737
|
+
max_versions: 10
|
|
738
|
+
|
|
739
|
+
ttl_seconds: 86400 # 24 hours
|
|
740
|
+
|
|
741
|
+
cleanup:
|
|
742
|
+
strategy: age_based
|
|
743
|
+
max_age_days: 30
|
|
744
|
+
```
|
|
745
|
+
|
|
746
|
+
### Observability
|
|
747
|
+
|
|
748
|
+
```yaml
|
|
749
|
+
spec:
|
|
750
|
+
observability:
|
|
751
|
+
logging:
|
|
752
|
+
level: info
|
|
753
|
+
format: json
|
|
754
|
+
destinations:
|
|
755
|
+
- type: stdout
|
|
756
|
+
- type: loki
|
|
757
|
+
endpoint: http://loki:3100
|
|
758
|
+
|
|
759
|
+
tracing:
|
|
760
|
+
enabled: true
|
|
761
|
+
exporter: otlp
|
|
762
|
+
endpoint: http://tempo:4317
|
|
763
|
+
sampling_rate: 1.0
|
|
764
|
+
pii_redaction: true
|
|
765
|
+
|
|
766
|
+
metrics:
|
|
767
|
+
enabled: true
|
|
768
|
+
exporter: prometheus
|
|
769
|
+
port: 9090
|
|
770
|
+
custom_metrics:
|
|
771
|
+
- name: agent_task_duration_seconds
|
|
772
|
+
type: histogram
|
|
773
|
+
- name: agent_errors_total
|
|
774
|
+
type: counter
|
|
775
|
+
```
|
|
776
|
+
|
|
777
|
+
---
|
|
778
|
+
|
|
779
|
+
## Triggers
|
|
780
|
+
|
|
781
|
+
Define when the agent should execute.
|
|
782
|
+
|
|
783
|
+
### Event Trigger
|
|
784
|
+
|
|
785
|
+
```yaml
|
|
786
|
+
spec:
|
|
787
|
+
triggers:
|
|
788
|
+
- type: event
|
|
789
|
+
source: kubernetes
|
|
790
|
+
filters:
|
|
791
|
+
namespace: production
|
|
792
|
+
resource: pod
|
|
793
|
+
event_type: created
|
|
794
|
+
conditions:
|
|
795
|
+
- field: metadata.labels.app
|
|
796
|
+
operator: equals
|
|
797
|
+
value: web-server
|
|
798
|
+
```
|
|
799
|
+
|
|
800
|
+
### Schedule Trigger
|
|
801
|
+
|
|
802
|
+
```yaml
|
|
803
|
+
spec:
|
|
804
|
+
triggers:
|
|
805
|
+
- type: schedule
|
|
806
|
+
cron: "0 */6 * * *" # Every 6 hours
|
|
807
|
+
timezone: America/New_York
|
|
808
|
+
jitter_seconds: 300 # Random delay up to 5 minutes
|
|
809
|
+
```
|
|
810
|
+
|
|
811
|
+
### Manual Trigger
|
|
812
|
+
|
|
813
|
+
```yaml
|
|
814
|
+
spec:
|
|
815
|
+
triggers:
|
|
816
|
+
- type: manual
|
|
817
|
+
approval_required: true
|
|
818
|
+
approvers:
|
|
819
|
+
- user:admin@example.com
|
|
820
|
+
- role:platform-lead
|
|
821
|
+
```
|
|
822
|
+
|
|
823
|
+
### Webhook Trigger
|
|
824
|
+
|
|
825
|
+
```yaml
|
|
826
|
+
spec:
|
|
827
|
+
triggers:
|
|
828
|
+
- type: webhook
|
|
829
|
+
endpoint: /api/v1/agents/security-scanner/trigger
|
|
830
|
+
auth:
|
|
831
|
+
type: bearer
|
|
832
|
+
credentials: ${WEBHOOK_SECRET}
|
|
833
|
+
payload_schema:
|
|
834
|
+
type: object
|
|
835
|
+
required: [target_cluster]
|
|
836
|
+
properties:
|
|
837
|
+
target_cluster:
|
|
838
|
+
type: string
|
|
839
|
+
```
|
|
840
|
+
|
|
841
|
+
---
|
|
842
|
+
|
|
843
|
+
## Policies
|
|
844
|
+
|
|
845
|
+
Policies define guardrails for agent execution.
|
|
846
|
+
|
|
847
|
+
### Rate Limiting
|
|
848
|
+
|
|
849
|
+
```yaml
|
|
850
|
+
spec:
|
|
851
|
+
reliability:
|
|
852
|
+
rate_limit:
|
|
853
|
+
enabled: true
|
|
854
|
+
max_requests_per_minute: 60
|
|
855
|
+
max_concurrent_executions: 5
|
|
856
|
+
burst_size: 10
|
|
857
|
+
```
|
|
858
|
+
|
|
859
|
+
### Circuit Breaker
|
|
860
|
+
|
|
861
|
+
```yaml
|
|
862
|
+
spec:
|
|
863
|
+
reliability:
|
|
864
|
+
circuit_breaker:
|
|
865
|
+
enabled: true
|
|
866
|
+
failure_threshold: 5
|
|
867
|
+
success_threshold: 2
|
|
868
|
+
timeout_seconds: 60
|
|
869
|
+
half_open_max_requests: 3
|
|
870
|
+
```
|
|
871
|
+
|
|
872
|
+
### Retry Policy
|
|
873
|
+
|
|
874
|
+
```yaml
|
|
875
|
+
spec:
|
|
876
|
+
reliability:
|
|
877
|
+
retry:
|
|
878
|
+
max_attempts: 3
|
|
879
|
+
backoff_strategy: exponential
|
|
880
|
+
initial_delay_ms: 1000
|
|
881
|
+
max_delay_ms: 30000
|
|
882
|
+
jitter: true
|
|
883
|
+
```
|
|
884
|
+
|
|
885
|
+
### Escalation
|
|
886
|
+
|
|
887
|
+
```yaml
|
|
888
|
+
spec:
|
|
889
|
+
autonomy:
|
|
890
|
+
escalation:
|
|
891
|
+
enabled: true
|
|
892
|
+
triggers:
|
|
893
|
+
- condition: error_rate > 0.1
|
|
894
|
+
action: notify
|
|
895
|
+
recipients:
|
|
896
|
+
- pagerduty:on-call
|
|
897
|
+
- condition: consecutive_failures > 3
|
|
898
|
+
action: disable
|
|
899
|
+
notification:
|
|
900
|
+
- email:ops-team@example.com
|
|
901
|
+
```
|
|
902
|
+
|
|
903
|
+
### Resource Limits
|
|
904
|
+
|
|
905
|
+
```yaml
|
|
906
|
+
spec:
|
|
907
|
+
constraints:
|
|
908
|
+
execution:
|
|
909
|
+
max_duration_seconds: 600
|
|
910
|
+
max_memory_mb: 2048
|
|
911
|
+
max_cpu_millicores: 1000
|
|
912
|
+
|
|
913
|
+
output:
|
|
914
|
+
max_tokens: 4096
|
|
915
|
+
max_tool_calls_per_turn: 10
|
|
916
|
+
max_turns: 20
|
|
917
|
+
```
|
|
918
|
+
|
|
919
|
+
---
|
|
920
|
+
|
|
921
|
+
## Examples
|
|
922
|
+
|
|
923
|
+
### Example 1: Minimal Worker Agent
|
|
924
|
+
|
|
925
|
+
Simplest possible OSSA agent for code formatting.
|
|
926
|
+
|
|
927
|
+
```yaml
|
|
928
|
+
apiVersion: ossa/v0.2.9
|
|
929
|
+
kind: Agent
|
|
930
|
+
metadata:
|
|
931
|
+
name: code-formatter
|
|
932
|
+
version: 1.0.0
|
|
933
|
+
description: Formats Python code using Black
|
|
934
|
+
spec:
|
|
935
|
+
role: Format Python code according to PEP 8 using Black formatter
|
|
936
|
+
llm:
|
|
937
|
+
provider: openai
|
|
938
|
+
model: gpt-4-turbo-preview
|
|
939
|
+
temperature: 0
|
|
940
|
+
tools:
|
|
941
|
+
- type: function
|
|
942
|
+
name: black-formatter
|
|
943
|
+
capabilities:
|
|
944
|
+
- name: format_code
|
|
945
|
+
autonomy:
|
|
946
|
+
approval_required: false
|
|
947
|
+
max_turns: 1
|
|
948
|
+
```
|
|
949
|
+
|
|
950
|
+
### Example 2: Production Orchestrator
|
|
951
|
+
|
|
952
|
+
Enterprise-grade security orchestrator with full observability.
|
|
953
|
+
|
|
954
|
+
```yaml
|
|
955
|
+
apiVersion: ossa/v0.2.9
|
|
956
|
+
kind: Agent
|
|
957
|
+
metadata:
|
|
958
|
+
name: security-orchestrator
|
|
959
|
+
version: 2.1.0
|
|
960
|
+
description: |
|
|
961
|
+
Comprehensive security audit orchestrator for Kubernetes clusters.
|
|
962
|
+
Coordinates vulnerability scanning, compliance checking, and remediation.
|
|
963
|
+
labels:
|
|
964
|
+
domain: security
|
|
965
|
+
team: platform-security
|
|
966
|
+
environment: production
|
|
967
|
+
compliance: fedramp
|
|
968
|
+
annotations:
|
|
969
|
+
ossa.io/author: security-team@example.com
|
|
970
|
+
ossa.io/docs: https://docs.example.com/agents/security-orchestrator
|
|
971
|
+
cost-center: security-ops
|
|
972
|
+
|
|
973
|
+
spec:
|
|
974
|
+
taxonomy:
|
|
975
|
+
domain: security
|
|
976
|
+
subdomain: orchestration
|
|
977
|
+
capability: comprehensive-audit
|
|
978
|
+
|
|
979
|
+
role: |
|
|
980
|
+
You are a security orchestration expert for Kubernetes environments.
|
|
981
|
+
|
|
982
|
+
Your responsibilities:
|
|
983
|
+
1. Coordinate vulnerability scanning across all namespaces
|
|
984
|
+
2. Verify compliance with CIS Kubernetes Benchmarks
|
|
985
|
+
3. Identify misconfigurations and security risks
|
|
986
|
+
4. Generate prioritized remediation plans
|
|
987
|
+
|
|
988
|
+
Output Format:
|
|
989
|
+
- Executive summary (max 3 paragraphs)
|
|
990
|
+
- Critical findings with immediate action items
|
|
991
|
+
- Detailed findings by severity
|
|
992
|
+
- Remediation roadmap with timeline
|
|
993
|
+
|
|
994
|
+
Escalate immediately if:
|
|
995
|
+
- Critical vulnerabilities with public exploits
|
|
996
|
+
- Compliance violations affecting certifications
|
|
997
|
+
- Active security incidents detected
|
|
998
|
+
|
|
999
|
+
llm:
|
|
1000
|
+
provider: anthropic
|
|
1001
|
+
model: claude-3-opus-20240229
|
|
1002
|
+
temperature: 0.3
|
|
1003
|
+
maxTokens: 8192
|
|
1004
|
+
fallback_models:
|
|
1005
|
+
- provider: openai
|
|
1006
|
+
model: gpt-4-turbo-preview
|
|
1007
|
+
retry_config:
|
|
1008
|
+
max_attempts: 3
|
|
1009
|
+
backoff_strategy: exponential
|
|
1010
|
+
cost_tracking:
|
|
1011
|
+
enabled: true
|
|
1012
|
+
budget_alert_threshold: 500.00
|
|
1013
|
+
cost_allocation_tags:
|
|
1014
|
+
team: security
|
|
1015
|
+
project: k8s-audit
|
|
1016
|
+
|
|
1017
|
+
tools:
|
|
1018
|
+
- type: kubernetes
|
|
1019
|
+
namespace: "*"
|
|
1020
|
+
capabilities:
|
|
1021
|
+
- name: list_pods
|
|
1022
|
+
- name: get_pod_security_policies
|
|
1023
|
+
- name: list_network_policies
|
|
1024
|
+
- name: get_rbac_roles
|
|
1025
|
+
auth:
|
|
1026
|
+
type: bearer
|
|
1027
|
+
credentials: ${KUBE_SA_TOKEN}
|
|
1028
|
+
circuit_breaker:
|
|
1029
|
+
enabled: true
|
|
1030
|
+
failure_threshold: 5
|
|
1031
|
+
timeout_seconds: 60
|
|
1032
|
+
|
|
1033
|
+
- type: a2a
|
|
1034
|
+
name: vulnerability-scanner
|
|
1035
|
+
capabilities:
|
|
1036
|
+
- name: scan_cluster
|
|
1037
|
+
transport:
|
|
1038
|
+
protocol: grpc
|
|
1039
|
+
endpoint: vuln-scanner.security.svc.cluster.local:8080
|
|
1040
|
+
|
|
1041
|
+
- type: a2a
|
|
1042
|
+
name: compliance-checker
|
|
1043
|
+
capabilities:
|
|
1044
|
+
- name: check_cis_benchmark
|
|
1045
|
+
transport:
|
|
1046
|
+
protocol: grpc
|
|
1047
|
+
endpoint: compliance.security.svc.cluster.local:8080
|
|
1048
|
+
|
|
1049
|
+
- type: http
|
|
1050
|
+
name: remediation-tracker
|
|
1051
|
+
endpoint: https://api.remediation.example.com
|
|
1052
|
+
capabilities:
|
|
1053
|
+
- name: create_ticket
|
|
1054
|
+
- name: assign_owner
|
|
1055
|
+
auth:
|
|
1056
|
+
type: bearer
|
|
1057
|
+
credentials: ${REMEDIATION_API_KEY}
|
|
1058
|
+
|
|
1059
|
+
collaboration:
|
|
1060
|
+
delegation:
|
|
1061
|
+
enabled: true
|
|
1062
|
+
max_depth: 3
|
|
1063
|
+
agents:
|
|
1064
|
+
- vulnerability-scanner
|
|
1065
|
+
- compliance-checker
|
|
1066
|
+
- remediation-planner
|
|
1067
|
+
|
|
1068
|
+
autonomy:
|
|
1069
|
+
approval_required: false # Audit is read-only
|
|
1070
|
+
escalation:
|
|
1071
|
+
enabled: true
|
|
1072
|
+
triggers:
|
|
1073
|
+
- condition: critical_findings > 0
|
|
1074
|
+
action: notify
|
|
1075
|
+
recipients:
|
|
1076
|
+
- pagerduty:security-on-call
|
|
1077
|
+
- condition: compliance_violations > 10
|
|
1078
|
+
action: notify
|
|
1079
|
+
recipients:
|
|
1080
|
+
- email:security-team@example.com
|
|
1081
|
+
|
|
1082
|
+
observability:
|
|
1083
|
+
logging:
|
|
1084
|
+
level: info
|
|
1085
|
+
format: json
|
|
1086
|
+
destinations:
|
|
1087
|
+
- type: loki
|
|
1088
|
+
endpoint: http://loki.monitoring:3100
|
|
1089
|
+
tracing:
|
|
1090
|
+
enabled: true
|
|
1091
|
+
exporter: otlp
|
|
1092
|
+
endpoint: http://tempo.monitoring:4317
|
|
1093
|
+
sampling_rate: 1.0
|
|
1094
|
+
pii_redaction: true
|
|
1095
|
+
metrics:
|
|
1096
|
+
enabled: true
|
|
1097
|
+
exporter: prometheus
|
|
1098
|
+
port: 9090
|
|
1099
|
+
|
|
1100
|
+
state:
|
|
1101
|
+
persistence:
|
|
1102
|
+
enabled: true
|
|
1103
|
+
backend: redis
|
|
1104
|
+
encryption:
|
|
1105
|
+
enabled: true
|
|
1106
|
+
algorithm: AES-256-GCM
|
|
1107
|
+
versioning:
|
|
1108
|
+
enabled: true
|
|
1109
|
+
max_versions: 30
|
|
1110
|
+
ttl_seconds: 604800 # 7 days
|
|
1111
|
+
|
|
1112
|
+
security:
|
|
1113
|
+
authentication:
|
|
1114
|
+
required: true
|
|
1115
|
+
methods:
|
|
1116
|
+
- mtls
|
|
1117
|
+
- oauth2
|
|
1118
|
+
authorization:
|
|
1119
|
+
rbac:
|
|
1120
|
+
enabled: true
|
|
1121
|
+
roles:
|
|
1122
|
+
- security-auditor
|
|
1123
|
+
secrets:
|
|
1124
|
+
provider: vault
|
|
1125
|
+
path: /secret/agents/security-orchestrator
|
|
1126
|
+
|
|
1127
|
+
reliability:
|
|
1128
|
+
retry:
|
|
1129
|
+
max_attempts: 3
|
|
1130
|
+
backoff_strategy: exponential
|
|
1131
|
+
initial_delay_ms: 1000
|
|
1132
|
+
max_delay_ms: 30000
|
|
1133
|
+
circuit_breaker:
|
|
1134
|
+
enabled: true
|
|
1135
|
+
failure_threshold: 5
|
|
1136
|
+
timeout_seconds: 120
|
|
1137
|
+
rate_limit:
|
|
1138
|
+
max_requests_per_minute: 30
|
|
1139
|
+
max_concurrent_executions: 3
|
|
1140
|
+
|
|
1141
|
+
constraints:
|
|
1142
|
+
execution:
|
|
1143
|
+
max_duration_seconds: 1800 # 30 minutes
|
|
1144
|
+
max_memory_mb: 4096
|
|
1145
|
+
max_cpu_millicores: 2000
|
|
1146
|
+
output:
|
|
1147
|
+
max_tokens: 8192
|
|
1148
|
+
max_tool_calls_per_turn: 50
|
|
1149
|
+
max_turns: 30
|
|
1150
|
+
|
|
1151
|
+
triggers:
|
|
1152
|
+
- type: schedule
|
|
1153
|
+
cron: "0 2 * * *" # Daily at 2 AM
|
|
1154
|
+
timezone: UTC
|
|
1155
|
+
- type: webhook
|
|
1156
|
+
endpoint: /api/v1/agents/security-orchestrator/trigger
|
|
1157
|
+
auth:
|
|
1158
|
+
type: bearer
|
|
1159
|
+
credentials: ${WEBHOOK_SECRET}
|
|
1160
|
+
|
|
1161
|
+
reasoning:
|
|
1162
|
+
strategy: react
|
|
1163
|
+
options:
|
|
1164
|
+
max_iterations: 10
|
|
1165
|
+
reflection_enabled: true
|
|
1166
|
+
|
|
1167
|
+
safety:
|
|
1168
|
+
content_filtering:
|
|
1169
|
+
enabled: true
|
|
1170
|
+
blocklist:
|
|
1171
|
+
- credentials
|
|
1172
|
+
- api_keys
|
|
1173
|
+
pii_detection:
|
|
1174
|
+
enabled: true
|
|
1175
|
+
redact: true
|
|
1176
|
+
```
|
|
1177
|
+
|
|
1178
|
+
### Example 3: Security-Hardened Agent
|
|
1179
|
+
|
|
1180
|
+
Agent with comprehensive security controls for regulated environments.
|
|
1181
|
+
|
|
1182
|
+
```yaml
|
|
1183
|
+
apiVersion: ossa/v0.2.9
|
|
1184
|
+
kind: Agent
|
|
1185
|
+
metadata:
|
|
1186
|
+
name: hipaa-compliant-agent
|
|
1187
|
+
version: 1.0.0
|
|
1188
|
+
labels:
|
|
1189
|
+
compliance: hipaa
|
|
1190
|
+
environment: production
|
|
1191
|
+
spec:
|
|
1192
|
+
role: Process healthcare data in HIPAA-compliant manner
|
|
1193
|
+
|
|
1194
|
+
llm:
|
|
1195
|
+
provider: anthropic
|
|
1196
|
+
model: claude-3-sonnet-20240229
|
|
1197
|
+
|
|
1198
|
+
tools:
|
|
1199
|
+
- type: http
|
|
1200
|
+
name: fhir-api
|
|
1201
|
+
endpoint: https://fhir.example.com
|
|
1202
|
+
capabilities:
|
|
1203
|
+
- name: read_patient
|
|
1204
|
+
compliance_tags:
|
|
1205
|
+
- phi
|
|
1206
|
+
- hipaa
|
|
1207
|
+
auth:
|
|
1208
|
+
type: oauth2
|
|
1209
|
+
credentials: ${FHIR_OAUTH_TOKEN}
|
|
1210
|
+
scopes:
|
|
1211
|
+
- patient.read
|
|
1212
|
+
transport:
|
|
1213
|
+
tls:
|
|
1214
|
+
enabled: true
|
|
1215
|
+
min_version: "1.3"
|
|
1216
|
+
verify_cert: true
|
|
1217
|
+
|
|
1218
|
+
security:
|
|
1219
|
+
authentication:
|
|
1220
|
+
required: true
|
|
1221
|
+
methods:
|
|
1222
|
+
- mtls
|
|
1223
|
+
authorization:
|
|
1224
|
+
rbac:
|
|
1225
|
+
enabled: true
|
|
1226
|
+
roles:
|
|
1227
|
+
- healthcare-provider
|
|
1228
|
+
secrets:
|
|
1229
|
+
provider: vault
|
|
1230
|
+
path: /secret/hipaa/agents
|
|
1231
|
+
audit:
|
|
1232
|
+
enabled: true
|
|
1233
|
+
log_all_requests: true
|
|
1234
|
+
retention_days: 2555 # 7 years
|
|
1235
|
+
|
|
1236
|
+
state:
|
|
1237
|
+
persistence:
|
|
1238
|
+
enabled: true
|
|
1239
|
+
backend: postgres
|
|
1240
|
+
encryption:
|
|
1241
|
+
enabled: true
|
|
1242
|
+
algorithm: AES-256-GCM
|
|
1243
|
+
key_management: aws-kms
|
|
1244
|
+
|
|
1245
|
+
observability:
|
|
1246
|
+
logging:
|
|
1247
|
+
level: info
|
|
1248
|
+
pii_redaction: true
|
|
1249
|
+
tracing:
|
|
1250
|
+
enabled: true
|
|
1251
|
+
pii_redaction: true
|
|
1252
|
+
|
|
1253
|
+
safety:
|
|
1254
|
+
content_filtering:
|
|
1255
|
+
enabled: true
|
|
1256
|
+
pii_detection:
|
|
1257
|
+
enabled: true
|
|
1258
|
+
redact: true
|
|
1259
|
+
types:
|
|
1260
|
+
- ssn
|
|
1261
|
+
- credit_card
|
|
1262
|
+
- phone_number
|
|
1263
|
+
|
|
1264
|
+
compliance:
|
|
1265
|
+
profiles:
|
|
1266
|
+
- hipaa
|
|
1267
|
+
audit:
|
|
1268
|
+
enabled: true
|
|
1269
|
+
retention_days: 2555
|
|
1270
|
+
```
|
|
1271
|
+
|
|
1272
|
+
### Example 4: Multi-Model Agent with Fallbacks
|
|
1273
|
+
|
|
1274
|
+
Agent using multiple LLMs with intelligent fallback.
|
|
1275
|
+
|
|
1276
|
+
```yaml
|
|
1277
|
+
apiVersion: ossa/v0.2.9
|
|
1278
|
+
kind: Agent
|
|
1279
|
+
metadata:
|
|
1280
|
+
name: resilient-agent
|
|
1281
|
+
version: 1.0.0
|
|
1282
|
+
spec:
|
|
1283
|
+
role: High-availability agent with multi-model fallback
|
|
1284
|
+
|
|
1285
|
+
llm:
|
|
1286
|
+
# Primary model
|
|
1287
|
+
provider: anthropic
|
|
1288
|
+
model: claude-3-opus-20240229
|
|
1289
|
+
temperature: 0.7
|
|
1290
|
+
maxTokens: 4096
|
|
1291
|
+
|
|
1292
|
+
# Fallback chain
|
|
1293
|
+
fallback_models:
|
|
1294
|
+
- provider: openai
|
|
1295
|
+
model: gpt-4-turbo-preview
|
|
1296
|
+
- provider: google
|
|
1297
|
+
model: gemini-pro
|
|
1298
|
+
- provider: anthropic
|
|
1299
|
+
model: claude-3-sonnet-20240229
|
|
1300
|
+
|
|
1301
|
+
# Aggressive retry
|
|
1302
|
+
retry_config:
|
|
1303
|
+
max_attempts: 5
|
|
1304
|
+
backoff_strategy: exponential
|
|
1305
|
+
|
|
1306
|
+
reliability:
|
|
1307
|
+
circuit_breaker:
|
|
1308
|
+
enabled: true
|
|
1309
|
+
failure_threshold: 3
|
|
1310
|
+
success_threshold: 2
|
|
1311
|
+
timeout_seconds: 60
|
|
1312
|
+
retry:
|
|
1313
|
+
max_attempts: 3
|
|
1314
|
+
backoff_strategy: exponential
|
|
1315
|
+
jitter: true
|
|
1316
|
+
|
|
1317
|
+
observability:
|
|
1318
|
+
metrics:
|
|
1319
|
+
enabled: true
|
|
1320
|
+
custom_metrics:
|
|
1321
|
+
- name: model_fallback_total
|
|
1322
|
+
type: counter
|
|
1323
|
+
labels:
|
|
1324
|
+
- from_model
|
|
1325
|
+
- to_model
|
|
1326
|
+
- name: model_latency_seconds
|
|
1327
|
+
type: histogram
|
|
1328
|
+
labels:
|
|
1329
|
+
- model
|
|
1330
|
+
```
|
|
1331
|
+
|
|
1332
|
+
### Example 5: Agent with Compliance Profile
|
|
1333
|
+
|
|
1334
|
+
Agent configured for FedRAMP Moderate compliance.
|
|
1335
|
+
|
|
1336
|
+
```yaml
|
|
1337
|
+
apiVersion: ossa/v0.2.9
|
|
1338
|
+
kind: Agent
|
|
1339
|
+
metadata:
|
|
1340
|
+
name: fedramp-agent
|
|
1341
|
+
version: 1.0.0
|
|
1342
|
+
labels:
|
|
1343
|
+
compliance: fedramp-moderate
|
|
1344
|
+
environment: gov-cloud
|
|
1345
|
+
annotations:
|
|
1346
|
+
fedramp.io/authorization-date: "2024-12-01"
|
|
1347
|
+
fedramp.io/package-id: F24xxxxx
|
|
1348
|
+
|
|
1349
|
+
spec:
|
|
1350
|
+
role: FedRAMP Moderate compliant agent for federal agencies
|
|
1351
|
+
|
|
1352
|
+
llm:
|
|
1353
|
+
provider: azure
|
|
1354
|
+
model: gpt-4-turbo-usgov
|
|
1355
|
+
cost_tracking:
|
|
1356
|
+
enabled: true
|
|
1357
|
+
cost_allocation_tags:
|
|
1358
|
+
agency: dod
|
|
1359
|
+
program: modernization
|
|
1360
|
+
|
|
1361
|
+
state:
|
|
1362
|
+
persistence:
|
|
1363
|
+
enabled: true
|
|
1364
|
+
backend: postgres
|
|
1365
|
+
encryption:
|
|
1366
|
+
enabled: true
|
|
1367
|
+
algorithm: AES-256-GCM
|
|
1368
|
+
key_management: FIPS-140-2
|
|
1369
|
+
storage:
|
|
1370
|
+
allowed_regions:
|
|
1371
|
+
- us-gov-west-1
|
|
1372
|
+
- us-gov-east-1
|
|
1373
|
+
data_residency: US
|
|
1374
|
+
|
|
1375
|
+
security:
|
|
1376
|
+
authentication:
|
|
1377
|
+
required: true
|
|
1378
|
+
methods:
|
|
1379
|
+
- mtls
|
|
1380
|
+
- piv # PIV/CAC cards
|
|
1381
|
+
authorization:
|
|
1382
|
+
rbac:
|
|
1383
|
+
enabled: true
|
|
1384
|
+
secrets:
|
|
1385
|
+
provider: aws-secrets-manager
|
|
1386
|
+
encryption: FIPS-140-2
|
|
1387
|
+
|
|
1388
|
+
observability:
|
|
1389
|
+
logging:
|
|
1390
|
+
retention_days: 2555 # 7 years
|
|
1391
|
+
immutable: true
|
|
1392
|
+
pii_redaction: true
|
|
1393
|
+
tracing:
|
|
1394
|
+
enabled: true
|
|
1395
|
+
pii_redaction: true
|
|
1396
|
+
audit:
|
|
1397
|
+
enabled: true
|
|
1398
|
+
log_all_requests: true
|
|
1399
|
+
retention_days: 2555
|
|
1400
|
+
|
|
1401
|
+
compliance:
|
|
1402
|
+
profiles:
|
|
1403
|
+
- fedramp-moderate
|
|
1404
|
+
controls:
|
|
1405
|
+
- id: AC-2
|
|
1406
|
+
description: Account Management
|
|
1407
|
+
status: compliant
|
|
1408
|
+
- id: AU-2
|
|
1409
|
+
description: Audit Events
|
|
1410
|
+
status: compliant
|
|
1411
|
+
- id: SC-13
|
|
1412
|
+
description: Cryptographic Protection
|
|
1413
|
+
status: compliant
|
|
1414
|
+
|
|
1415
|
+
tools:
|
|
1416
|
+
- type: http
|
|
1417
|
+
name: government-api
|
|
1418
|
+
endpoint: https://api.example.gov
|
|
1419
|
+
auth:
|
|
1420
|
+
type: mtls
|
|
1421
|
+
credentials: ${MTLS_CERT}
|
|
1422
|
+
transport:
|
|
1423
|
+
tls:
|
|
1424
|
+
enabled: true
|
|
1425
|
+
min_version: "1.2"
|
|
1426
|
+
cipher_suites:
|
|
1427
|
+
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
|
|
1428
|
+
compliance_tags:
|
|
1429
|
+
- fedramp
|
|
1430
|
+
- fips-140-2
|
|
1431
|
+
```
|
|
1432
|
+
|
|
1433
|
+
---
|
|
1434
|
+
|
|
1435
|
+
## Best Practices
|
|
1436
|
+
|
|
1437
|
+
### Naming Conventions
|
|
1438
|
+
|
|
1439
|
+
**DO**:
|
|
1440
|
+
- Use descriptive, purpose-driven names: `security-scanner`, `doc-generator`
|
|
1441
|
+
- Follow Kubernetes naming (lowercase, hyphens)
|
|
1442
|
+
- Include version suffix for major versions: `agent-v2`, `scanner-v3`
|
|
1443
|
+
- Use domain prefixes: `sec-scanner`, `dev-reviewer`
|
|
1444
|
+
|
|
1445
|
+
**DON'T**:
|
|
1446
|
+
- Use generic names: `agent1`, `my-agent`
|
|
1447
|
+
- Use uppercase or underscores: `Security_Agent`
|
|
1448
|
+
- Include framework names: `langchain-agent`
|
|
1449
|
+
- Use dots or special characters: `agent.production`
|
|
1450
|
+
|
|
1451
|
+
### Version Management
|
|
1452
|
+
|
|
1453
|
+
**DO**:
|
|
1454
|
+
- Start at `1.0.0` for production releases
|
|
1455
|
+
- Use `0.x.y` for pre-production
|
|
1456
|
+
- Increment MAJOR for breaking changes
|
|
1457
|
+
- Increment MINOR for new features
|
|
1458
|
+
- Increment PATCH for bug fixes
|
|
1459
|
+
- Use pre-release tags: `1.0.0-beta.1`, `2.0.0-rc.2`
|
|
1460
|
+
|
|
1461
|
+
**DON'T**:
|
|
1462
|
+
- Skip versions
|
|
1463
|
+
- Reuse version numbers
|
|
1464
|
+
- Use arbitrary versioning schemes
|
|
1465
|
+
|
|
1466
|
+
### Capability Selection
|
|
1467
|
+
|
|
1468
|
+
**DO**:
|
|
1469
|
+
- Grant minimum required capabilities (principle of least privilege)
|
|
1470
|
+
- Use capability versioning: `read_file:1.0`
|
|
1471
|
+
- Document why each capability is needed (in annotations)
|
|
1472
|
+
- Group related capabilities under single tool
|
|
1473
|
+
- Use compliance tags for sensitive capabilities
|
|
1474
|
+
|
|
1475
|
+
**DON'T**:
|
|
1476
|
+
- Grant wildcard/admin capabilities unless absolutely required
|
|
1477
|
+
- Use deprecated capabilities
|
|
1478
|
+
- Mix unrelated capabilities in one tool
|
|
1479
|
+
|
|
1480
|
+
### Error Handling Patterns
|
|
1481
|
+
|
|
1482
|
+
**DO**:
|
|
1483
|
+
- Define retry policies for transient failures
|
|
1484
|
+
- Use circuit breakers for external dependencies
|
|
1485
|
+
- Implement fallback capabilities
|
|
1486
|
+
- Log errors with structured metadata
|
|
1487
|
+
- Escalate critical errors to humans
|
|
1488
|
+
|
|
1489
|
+
**DON'T**:
|
|
1490
|
+
- Retry indefinitely
|
|
1491
|
+
- Ignore errors silently
|
|
1492
|
+
- Retry non-idempotent operations without safeguards
|
|
1493
|
+
- Expose error details to end users
|
|
1494
|
+
|
|
1495
|
+
### Observability
|
|
1496
|
+
|
|
1497
|
+
**DO**:
|
|
1498
|
+
- Enable tracing for all production agents
|
|
1499
|
+
- Redact PII in logs and traces
|
|
1500
|
+
- Use structured logging (JSON)
|
|
1501
|
+
- Define custom metrics for business KPIs
|
|
1502
|
+
- Set retention policies based on compliance requirements
|
|
1503
|
+
|
|
1504
|
+
**DON'T**:
|
|
1505
|
+
- Log secrets or credentials
|
|
1506
|
+
- Disable observability in production
|
|
1507
|
+
- Use plain text logging for sensitive data
|
|
1508
|
+
|
|
1509
|
+
### State Management
|
|
1510
|
+
|
|
1511
|
+
**DO**:
|
|
1512
|
+
- Enable encryption for persistent state
|
|
1513
|
+
- Version state schemas
|
|
1514
|
+
- Set TTL for ephemeral state
|
|
1515
|
+
- Use cleanup policies to prevent unbounded growth
|
|
1516
|
+
- Back up critical state
|
|
1517
|
+
|
|
1518
|
+
**DON'T**:
|
|
1519
|
+
- Store secrets in state
|
|
1520
|
+
- Use unencrypted state for sensitive data
|
|
1521
|
+
- Keep state indefinitely without TTL
|
|
1522
|
+
|
|
1523
|
+
### Security
|
|
1524
|
+
|
|
1525
|
+
**DO**:
|
|
1526
|
+
- Require authentication for all production agents
|
|
1527
|
+
- Use RBAC for authorization
|
|
1528
|
+
- Store secrets in dedicated secret managers (Vault, AWS Secrets Manager)
|
|
1529
|
+
- Enable audit logging
|
|
1530
|
+
- Use mTLS for inter-agent communication
|
|
1531
|
+
|
|
1532
|
+
**DON'T**:
|
|
1533
|
+
- Embed secrets in manifests
|
|
1534
|
+
- Use API keys in plain text
|
|
1535
|
+
- Disable authentication for "internal" agents
|
|
1536
|
+
- Store credentials in state or logs
|
|
1537
|
+
|
|
1538
|
+
---
|
|
1539
|
+
|
|
1540
|
+
## Anti-Patterns
|
|
1541
|
+
|
|
1542
|
+
### ❌ Embedding Secrets
|
|
1543
|
+
|
|
1544
|
+
**NEVER** embed actual secrets in manifests:
|
|
1545
|
+
|
|
1546
|
+
```yaml
|
|
1547
|
+
# ❌ NEVER DO THIS
|
|
1548
|
+
spec:
|
|
1549
|
+
tools:
|
|
1550
|
+
- type: http
|
|
1551
|
+
auth:
|
|
1552
|
+
credentials: sk-1234567890abcdef # Actual secret!
|
|
1553
|
+
```
|
|
1554
|
+
|
|
1555
|
+
**✅ Use secret references instead**:
|
|
1556
|
+
|
|
1557
|
+
```yaml
|
|
1558
|
+
spec:
|
|
1559
|
+
tools:
|
|
1560
|
+
- type: http
|
|
1561
|
+
auth:
|
|
1562
|
+
credentials: ${GITHUB_TOKEN} # Reference to secret manager
|
|
1563
|
+
security:
|
|
1564
|
+
secrets:
|
|
1565
|
+
provider: vault
|
|
1566
|
+
path: /secret/agents/my-agent
|
|
1567
|
+
```
|
|
1568
|
+
|
|
1569
|
+
### ❌ Overly Broad Capabilities
|
|
1570
|
+
|
|
1571
|
+
**NEVER** grant more capabilities than needed:
|
|
1572
|
+
|
|
1573
|
+
```yaml
|
|
1574
|
+
# ❌ NEVER DO THIS
|
|
1575
|
+
spec:
|
|
1576
|
+
tools:
|
|
1577
|
+
- type: kubernetes
|
|
1578
|
+
namespace: "*" # All namespaces!
|
|
1579
|
+
capabilities:
|
|
1580
|
+
- name: "*" # All operations!
|
|
1581
|
+
```
|
|
1582
|
+
|
|
1583
|
+
**✅ Grant minimum required**:
|
|
1584
|
+
|
|
1585
|
+
```yaml
|
|
1586
|
+
spec:
|
|
1587
|
+
tools:
|
|
1588
|
+
- type: kubernetes
|
|
1589
|
+
namespace: production # Specific namespace
|
|
1590
|
+
capabilities:
|
|
1591
|
+
- name: get_pods # Specific operations
|
|
1592
|
+
- name: describe_pod
|
|
1593
|
+
```
|
|
1594
|
+
|
|
1595
|
+
### ❌ Missing Observability
|
|
1596
|
+
|
|
1597
|
+
**NEVER** deploy without observability:
|
|
1598
|
+
|
|
1599
|
+
```yaml
|
|
1600
|
+
# ❌ NEVER DO THIS
|
|
1601
|
+
spec:
|
|
1602
|
+
observability:
|
|
1603
|
+
logging:
|
|
1604
|
+
enabled: false
|
|
1605
|
+
tracing:
|
|
1606
|
+
enabled: false
|
|
1607
|
+
metrics:
|
|
1608
|
+
enabled: false
|
|
1609
|
+
```
|
|
1610
|
+
|
|
1611
|
+
**✅ Enable full observability**:
|
|
1612
|
+
|
|
1613
|
+
```yaml
|
|
1614
|
+
spec:
|
|
1615
|
+
observability:
|
|
1616
|
+
logging:
|
|
1617
|
+
level: info
|
|
1618
|
+
format: json
|
|
1619
|
+
tracing:
|
|
1620
|
+
enabled: true
|
|
1621
|
+
sampling_rate: 1.0
|
|
1622
|
+
metrics:
|
|
1623
|
+
enabled: true
|
|
1624
|
+
```
|
|
1625
|
+
|
|
1626
|
+
### ❌ No Error Handling
|
|
1627
|
+
|
|
1628
|
+
**NEVER** omit error handling:
|
|
1629
|
+
|
|
1630
|
+
```yaml
|
|
1631
|
+
# ❌ NEVER DO THIS
|
|
1632
|
+
spec:
|
|
1633
|
+
tools:
|
|
1634
|
+
- type: http
|
|
1635
|
+
name: flaky-api
|
|
1636
|
+
# No retry policy, no circuit breaker, no timeout!
|
|
1637
|
+
```
|
|
1638
|
+
|
|
1639
|
+
**✅ Implement comprehensive error handling**:
|
|
1640
|
+
|
|
1641
|
+
```yaml
|
|
1642
|
+
spec:
|
|
1643
|
+
tools:
|
|
1644
|
+
- type: http
|
|
1645
|
+
name: flaky-api
|
|
1646
|
+
capabilities:
|
|
1647
|
+
- name: call_api
|
|
1648
|
+
retry_policy:
|
|
1649
|
+
max_attempts: 3
|
|
1650
|
+
backoff_strategy: exponential
|
|
1651
|
+
timeout:
|
|
1652
|
+
execution_seconds: 30
|
|
1653
|
+
circuit_breaker:
|
|
1654
|
+
enabled: true
|
|
1655
|
+
failure_threshold: 5
|
|
1656
|
+
```
|
|
1657
|
+
|
|
1658
|
+
### ❌ Ignoring Compliance
|
|
1659
|
+
|
|
1660
|
+
**NEVER** handle regulated data without compliance controls:
|
|
1661
|
+
|
|
1662
|
+
```yaml
|
|
1663
|
+
# ❌ NEVER DO THIS for HIPAA/PII data
|
|
1664
|
+
spec:
|
|
1665
|
+
tools:
|
|
1666
|
+
- type: http
|
|
1667
|
+
name: patient-api
|
|
1668
|
+
# No compliance tags, no PII redaction, no audit logging!
|
|
1669
|
+
```
|
|
1670
|
+
|
|
1671
|
+
**✅ Enable compliance controls**:
|
|
1672
|
+
|
|
1673
|
+
```yaml
|
|
1674
|
+
spec:
|
|
1675
|
+
tools:
|
|
1676
|
+
- type: http
|
|
1677
|
+
name: patient-api
|
|
1678
|
+
capabilities:
|
|
1679
|
+
- name: read_patient
|
|
1680
|
+
compliance_tags:
|
|
1681
|
+
- phi
|
|
1682
|
+
- hipaa
|
|
1683
|
+
safety:
|
|
1684
|
+
pii_detection:
|
|
1685
|
+
enabled: true
|
|
1686
|
+
redact: true
|
|
1687
|
+
security:
|
|
1688
|
+
audit:
|
|
1689
|
+
enabled: true
|
|
1690
|
+
retention_days: 2555
|
|
1691
|
+
compliance:
|
|
1692
|
+
profiles:
|
|
1693
|
+
- hipaa
|
|
1694
|
+
```
|
|
1695
|
+
|
|
1696
|
+
### ❌ Unbounded Resource Usage
|
|
1697
|
+
|
|
1698
|
+
**NEVER** allow unlimited execution:
|
|
1699
|
+
|
|
1700
|
+
```yaml
|
|
1701
|
+
# ❌ NEVER DO THIS
|
|
1702
|
+
spec:
|
|
1703
|
+
constraints:
|
|
1704
|
+
execution:
|
|
1705
|
+
max_duration_seconds: 0 # No limit!
|
|
1706
|
+
max_turns: 0 # Infinite loops!
|
|
1707
|
+
```
|
|
1708
|
+
|
|
1709
|
+
**✅ Set reasonable limits**:
|
|
1710
|
+
|
|
1711
|
+
```yaml
|
|
1712
|
+
spec:
|
|
1713
|
+
constraints:
|
|
1714
|
+
execution:
|
|
1715
|
+
max_duration_seconds: 600
|
|
1716
|
+
max_turns: 20
|
|
1717
|
+
max_memory_mb: 2048
|
|
1718
|
+
```
|
|
1719
|
+
|
|
1720
|
+
### ❌ Hardcoded Configuration
|
|
1721
|
+
|
|
1722
|
+
**NEVER** hardcode environment-specific values:
|
|
1723
|
+
|
|
1724
|
+
```yaml
|
|
1725
|
+
# ❌ NEVER DO THIS
|
|
1726
|
+
spec:
|
|
1727
|
+
tools:
|
|
1728
|
+
- type: http
|
|
1729
|
+
endpoint: https://api.production.example.com # Hardcoded!
|
|
1730
|
+
```
|
|
1731
|
+
|
|
1732
|
+
**✅ Use environment variables or config maps**:
|
|
1733
|
+
|
|
1734
|
+
```yaml
|
|
1735
|
+
spec:
|
|
1736
|
+
tools:
|
|
1737
|
+
- type: http
|
|
1738
|
+
endpoint: ${API_ENDPOINT}
|
|
1739
|
+
deployment:
|
|
1740
|
+
environment:
|
|
1741
|
+
- name: API_ENDPOINT
|
|
1742
|
+
valueFrom:
|
|
1743
|
+
configMapKeyRef:
|
|
1744
|
+
name: agent-config
|
|
1745
|
+
key: api_endpoint
|
|
1746
|
+
```
|
|
1747
|
+
|
|
1748
|
+
---
|
|
1749
|
+
|
|
1750
|
+
## Migration Guide
|
|
1751
|
+
|
|
1752
|
+
### From v0.2.8 to v0.2.9
|
|
1753
|
+
|
|
1754
|
+
**Breaking Changes**: None
|
|
1755
|
+
|
|
1756
|
+
**New Features**:
|
|
1757
|
+
1. **Reasoning Strategies**: ReAct, Chain-of-Thought, Tree-of-Thought
|
|
1758
|
+
2. **Prompt Templates**: Versioned prompt management
|
|
1759
|
+
3. **Knowledge Graph Integration**: First-class knowledge graph support
|
|
1760
|
+
4. **agents.md Extension**: OpenAI repository-level agent guidance
|
|
1761
|
+
|
|
1762
|
+
**Deprecated Features**:
|
|
1763
|
+
- None
|
|
1764
|
+
|
|
1765
|
+
**Migration Steps**:
|
|
1766
|
+
|
|
1767
|
+
#### 1. Update API Version
|
|
1768
|
+
|
|
1769
|
+
```yaml
|
|
1770
|
+
# Before (v0.2.8)
|
|
1771
|
+
apiVersion: ossa/v0.2.8
|
|
1772
|
+
|
|
1773
|
+
# After (v0.2.9)
|
|
1774
|
+
apiVersion: ossa/v0.2.9
|
|
1775
|
+
```
|
|
1776
|
+
|
|
1777
|
+
#### 2. Add Reasoning Strategy (Optional)
|
|
1778
|
+
|
|
1779
|
+
If your agent uses explicit reasoning, define it:
|
|
1780
|
+
|
|
1781
|
+
```yaml
|
|
1782
|
+
spec:
|
|
1783
|
+
reasoning:
|
|
1784
|
+
strategy: react # or chain_of_thought, tree_of_thought
|
|
1785
|
+
options:
|
|
1786
|
+
max_iterations: 10
|
|
1787
|
+
reflection_enabled: true
|
|
1788
|
+
```
|
|
1789
|
+
|
|
1790
|
+
#### 3. Migrate to Prompt Templates (Optional)
|
|
1791
|
+
|
|
1792
|
+
If you have multiple prompt variants:
|
|
1793
|
+
|
|
1794
|
+
```yaml
|
|
1795
|
+
# Before
|
|
1796
|
+
spec:
|
|
1797
|
+
role: |
|
|
1798
|
+
You are a helpful assistant.
|
|
1799
|
+
# Embedded prompt
|
|
1800
|
+
|
|
1801
|
+
# After
|
|
1802
|
+
spec:
|
|
1803
|
+
role: |
|
|
1804
|
+
{{prompt.system}}
|
|
1805
|
+
prompts:
|
|
1806
|
+
templates:
|
|
1807
|
+
- name: system
|
|
1808
|
+
version: "1.0"
|
|
1809
|
+
content: |
|
|
1810
|
+
You are a helpful assistant.
|
|
1811
|
+
- name: task
|
|
1812
|
+
version: "1.0"
|
|
1813
|
+
content: |
|
|
1814
|
+
Analyze the following: {{input}}
|
|
1815
|
+
```
|
|
1816
|
+
|
|
1817
|
+
#### 4. Add Knowledge Graph (Optional)
|
|
1818
|
+
|
|
1819
|
+
If using knowledge graphs:
|
|
1820
|
+
|
|
1821
|
+
```yaml
|
|
1822
|
+
spec:
|
|
1823
|
+
knowledge_graph:
|
|
1824
|
+
provider: neo4j
|
|
1825
|
+
connection:
|
|
1826
|
+
uri: ${NEO4J_URI}
|
|
1827
|
+
queries:
|
|
1828
|
+
- name: get_related_entities
|
|
1829
|
+
cypher: |
|
|
1830
|
+
MATCH (e:Entity {id: $entity_id})-[:RELATED_TO]->(r)
|
|
1831
|
+
RETURN r
|
|
1832
|
+
```
|
|
1833
|
+
|
|
1834
|
+
#### 5. Add Identity Configuration (Optional)
|
|
1835
|
+
|
|
1836
|
+
For multi-agent tracing:
|
|
1837
|
+
|
|
1838
|
+
```yaml
|
|
1839
|
+
spec:
|
|
1840
|
+
identity:
|
|
1841
|
+
session_id_generation:
|
|
1842
|
+
strategy: uuid
|
|
1843
|
+
instance_id_generation:
|
|
1844
|
+
strategy: hostname
|
|
1845
|
+
trace_context:
|
|
1846
|
+
propagation: w3c
|
|
1847
|
+
```
|
|
1848
|
+
|
|
1849
|
+
#### 6. Validate Against New Schema
|
|
1850
|
+
|
|
1851
|
+
```bash
|
|
1852
|
+
ossa validate agent.yaml --schema v0.2.9
|
|
1853
|
+
```
|
|
1854
|
+
|
|
1855
|
+
### From v0.2.7 to v0.2.9
|
|
1856
|
+
|
|
1857
|
+
Follow v0.2.8 → v0.2.9 migration, then:
|
|
1858
|
+
|
|
1859
|
+
**Additional Changes**:
|
|
1860
|
+
1. Compliance profiles now use `compliance.profiles` instead of `spec.compliance`
|
|
1861
|
+
2. State encryption now requires explicit algorithm
|
|
1862
|
+
|
|
1863
|
+
```yaml
|
|
1864
|
+
# Before (v0.2.7)
|
|
1865
|
+
spec:
|
|
1866
|
+
compliance: fedramp
|
|
1867
|
+
state:
|
|
1868
|
+
encryption: true
|
|
1869
|
+
|
|
1870
|
+
# After (v0.2.9)
|
|
1871
|
+
spec:
|
|
1872
|
+
compliance:
|
|
1873
|
+
profiles:
|
|
1874
|
+
- fedramp-moderate
|
|
1875
|
+
state:
|
|
1876
|
+
persistence:
|
|
1877
|
+
encryption:
|
|
1878
|
+
enabled: true
|
|
1879
|
+
algorithm: AES-256-GCM
|
|
1880
|
+
```
|
|
1881
|
+
|
|
1882
|
+
---
|
|
1883
|
+
|
|
1884
|
+
## Validation
|
|
1885
|
+
|
|
1886
|
+
To validate an agent manifest:
|
|
1887
|
+
|
|
1888
|
+
```bash
|
|
1889
|
+
# Using OSSA CLI
|
|
1890
|
+
ossa validate agent.yaml
|
|
1891
|
+
|
|
1892
|
+
# Using JSON Schema validator
|
|
1893
|
+
jsonschema -i agent.yaml \
|
|
1894
|
+
https://openstandardagents.org/schemas/v0.2.9/agent.json
|
|
1895
|
+
|
|
1896
|
+
# Using kubectl (if deployed to Kubernetes)
|
|
1897
|
+
kubectl apply --dry-run=client -f agent.yaml
|
|
1898
|
+
```
|
|
1899
|
+
|
|
1900
|
+
**Common Validation Errors**:
|
|
1901
|
+
|
|
1902
|
+
1. **Invalid name format**:
|
|
1903
|
+
```
|
|
1904
|
+
Error: metadata.name must match pattern ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
|
|
1905
|
+
Fix: Use lowercase, hyphens only
|
|
1906
|
+
```
|
|
1907
|
+
|
|
1908
|
+
2. **Invalid semver**:
|
|
1909
|
+
```
|
|
1910
|
+
Error: metadata.version must be valid semver
|
|
1911
|
+
Fix: Use format MAJOR.MINOR.PATCH (e.g., 1.0.0)
|
|
1912
|
+
```
|
|
1913
|
+
|
|
1914
|
+
3. **Missing required fields**:
|
|
1915
|
+
```
|
|
1916
|
+
Error: spec.role is required
|
|
1917
|
+
Fix: Add role field with agent's system prompt
|
|
1918
|
+
```
|
|
1919
|
+
|
|
1920
|
+
---
|
|
1921
|
+
|
|
1922
|
+
## Schema References
|
|
1923
|
+
|
|
1924
|
+
- **JSON Schema**: `https://openstandardagents.org/schemas/v0.2.9/agent.json`
|
|
1925
|
+
- **TypeScript Types**: See `types.ts` in this directory
|
|
1926
|
+
- **Validation CLI**: `npm install -g @bluefly/openstandardagents`
|
|
1927
|
+
|
|
1928
|
+
---
|
|
1929
|
+
|
|
1930
|
+
## Contributing
|
|
1931
|
+
|
|
1932
|
+
To propose changes to this specification:
|
|
1933
|
+
|
|
1934
|
+
1. Open an issue: https://gitlab.com/blueflyio/openstandardagents/-/issues
|
|
1935
|
+
2. Discuss with community
|
|
1936
|
+
3. Submit merge request with changes to:
|
|
1937
|
+
- `spec/v0.2.9/agent.md` (this file)
|
|
1938
|
+
- `spec/v0.2.9/ossa-0.2.9.schema.json` (JSON Schema)
|
|
1939
|
+
- `spec/v0.2.9/types.ts` (TypeScript definitions)
|
|
1940
|
+
|
|
1941
|
+
---
|
|
1942
|
+
|
|
1943
|
+
**Document Version**: 1.0.0
|
|
1944
|
+
**Last Updated**: 2025-12-04
|
|
1945
|
+
**Status**: Draft
|
|
1946
|
+
**Authors**: OSSA Technical Committee
|