@bluefly/openstandardagents 0.3.5 → 0.3.6
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/.version.json +7 -0
- package/CHANGELOG.md +60 -1
- package/README.md +41 -31
- package/bin/ossa +2 -23
- package/bin/postinstall +3 -2
- package/dist/adapters/crewai/converter.d.ts +17 -0
- package/dist/adapters/crewai/converter.d.ts.map +1 -0
- package/dist/adapters/crewai/converter.js +110 -0
- package/dist/adapters/crewai/converter.js.map +1 -0
- package/dist/adapters/crewai/index.d.ts +7 -0
- package/dist/adapters/crewai/index.d.ts.map +1 -0
- package/dist/adapters/crewai/index.js +6 -0
- package/dist/adapters/crewai/index.js.map +1 -0
- package/dist/adapters/crewai/types.d.ts +29 -0
- package/dist/adapters/crewai/types.d.ts.map +1 -0
- package/dist/adapters/crewai/types.js +5 -0
- package/dist/adapters/crewai/types.js.map +1 -0
- package/dist/adapters/docker/generators.d.ts +19 -0
- package/dist/adapters/docker/generators.d.ts.map +1 -0
- package/dist/adapters/docker/generators.js +93 -0
- package/dist/adapters/docker/generators.js.map +1 -0
- package/dist/adapters/docker/index.d.ts +7 -0
- package/dist/adapters/docker/index.d.ts.map +1 -0
- package/dist/adapters/docker/index.js +6 -0
- package/dist/adapters/docker/index.js.map +1 -0
- package/dist/adapters/docker/types.d.ts +17 -0
- package/dist/adapters/docker/types.d.ts.map +1 -0
- package/dist/adapters/docker/types.js +5 -0
- package/dist/adapters/docker/types.js.map +1 -0
- package/dist/adapters/gitlab/converter.d.ts +25 -0
- package/dist/adapters/gitlab/converter.d.ts.map +1 -0
- package/dist/adapters/gitlab/converter.js +96 -0
- package/dist/adapters/gitlab/converter.js.map +1 -0
- package/dist/adapters/gitlab/index.d.ts +7 -0
- package/dist/adapters/gitlab/index.d.ts.map +1 -0
- package/dist/adapters/gitlab/index.js +6 -0
- package/dist/adapters/gitlab/index.js.map +1 -0
- package/dist/adapters/gitlab/types.d.ts +22 -0
- package/dist/adapters/gitlab/types.d.ts.map +1 -0
- package/dist/adapters/gitlab/types.js +5 -0
- package/dist/adapters/gitlab/types.js.map +1 -0
- package/dist/adapters/kubernetes/generator.d.ts +29 -0
- package/dist/adapters/kubernetes/generator.d.ts.map +1 -0
- package/dist/adapters/kubernetes/generator.js +133 -0
- package/dist/adapters/kubernetes/generator.js.map +1 -0
- package/dist/adapters/kubernetes/index.d.ts +7 -0
- package/dist/adapters/kubernetes/index.d.ts.map +1 -0
- package/dist/adapters/kubernetes/index.js +6 -0
- package/dist/adapters/kubernetes/index.js.map +1 -0
- package/dist/adapters/kubernetes/types.d.ts +17 -0
- package/dist/adapters/kubernetes/types.d.ts.map +1 -0
- package/dist/adapters/kubernetes/types.js +5 -0
- package/dist/adapters/kubernetes/types.js.map +1 -0
- package/dist/adapters/langchain/converter.d.ts +21 -0
- package/dist/adapters/langchain/converter.d.ts.map +1 -0
- package/dist/adapters/langchain/converter.js +143 -0
- package/dist/adapters/langchain/converter.js.map +1 -0
- package/dist/adapters/langchain/index.d.ts +7 -0
- package/dist/adapters/langchain/index.d.ts.map +1 -0
- package/dist/adapters/langchain/index.js +6 -0
- package/dist/adapters/langchain/index.js.map +1 -0
- package/dist/adapters/langchain/types.d.ts +27 -0
- package/dist/adapters/langchain/types.d.ts.map +1 -0
- package/dist/adapters/langchain/types.js +5 -0
- package/dist/adapters/langchain/types.js.map +1 -0
- package/dist/adapters/n8n/converter.d.ts +17 -0
- package/dist/adapters/n8n/converter.d.ts.map +1 -0
- package/dist/adapters/n8n/converter.js +77 -0
- package/dist/adapters/n8n/converter.js.map +1 -0
- package/dist/adapters/n8n/index.d.ts +7 -0
- package/dist/adapters/n8n/index.d.ts.map +1 -0
- package/dist/adapters/n8n/index.js +6 -0
- package/dist/adapters/n8n/index.js.map +1 -0
- package/dist/adapters/n8n/types.d.ts +23 -0
- package/dist/adapters/n8n/types.d.ts.map +1 -0
- package/dist/adapters/n8n/types.js +5 -0
- package/dist/adapters/n8n/types.js.map +1 -0
- package/dist/adapters/opentelemetry.adapter.d.ts +1 -1
- package/dist/adapters/temporal/converter.d.ts +17 -0
- package/dist/adapters/temporal/converter.d.ts.map +1 -0
- package/dist/adapters/temporal/converter.js +96 -0
- package/dist/adapters/temporal/converter.js.map +1 -0
- package/dist/adapters/temporal/index.d.ts +7 -0
- package/dist/adapters/temporal/index.d.ts.map +1 -0
- package/dist/adapters/temporal/index.js +6 -0
- package/dist/adapters/temporal/index.js.map +1 -0
- package/dist/adapters/temporal/types.d.ts +23 -0
- package/dist/adapters/temporal/types.d.ts.map +1 -0
- package/dist/adapters/temporal/types.js +5 -0
- package/dist/adapters/temporal/types.js.map +1 -0
- package/dist/bot/agent-compliance.js +1 -1
- package/dist/bot/agent-compliance.js.map +1 -1
- package/dist/bot/agent-security_scanner.d.ts +1 -1
- package/dist/bot/agent-security_scanner.d.ts.map +1 -1
- package/dist/bot/agent-security_scanner.js.map +1 -1
- package/dist/cli/commands/agent-create.command.d.ts +18 -0
- package/dist/cli/commands/agent-create.command.d.ts.map +1 -0
- package/dist/cli/commands/agent-create.command.js +437 -0
- package/dist/cli/commands/agent-create.command.js.map +1 -0
- package/dist/cli/commands/agent-wizard.command.d.ts +21 -0
- package/dist/cli/commands/agent-wizard.command.d.ts.map +1 -0
- package/dist/cli/commands/agent-wizard.command.js +1136 -0
- package/dist/cli/commands/agent-wizard.command.js.map +1 -0
- package/dist/cli/commands/agents-md/batch.command.d.ts +3 -0
- package/dist/cli/commands/agents-md/batch.command.d.ts.map +1 -0
- package/dist/cli/commands/agents-md/batch.command.js +63 -0
- package/dist/cli/commands/agents-md/batch.command.js.map +1 -0
- package/dist/cli/commands/agents-md/generate.command.d.ts +3 -0
- package/dist/cli/commands/agents-md/generate.command.d.ts.map +1 -0
- package/dist/cli/commands/agents-md/generate.command.js +43 -0
- package/dist/cli/commands/agents-md/generate.command.js.map +1 -0
- package/dist/cli/commands/agents-md/list.command.d.ts +3 -0
- package/dist/cli/commands/agents-md/list.command.d.ts.map +1 -0
- package/dist/cli/commands/agents-md/list.command.js +59 -0
- package/dist/cli/commands/agents-md/list.command.js.map +1 -0
- package/dist/cli/commands/agents-md/validate.command.d.ts +3 -0
- package/dist/cli/commands/agents-md/validate.command.d.ts.map +1 -0
- package/dist/cli/commands/agents-md/validate.command.js +42 -0
- package/dist/cli/commands/agents-md/validate.command.js.map +1 -0
- package/dist/cli/commands/agents-md.command.d.ts +1 -1
- package/dist/cli/commands/agents-md.command.d.ts.map +1 -1
- package/dist/cli/commands/agents-md.command.js +40 -122
- package/dist/cli/commands/agents-md.command.js.map +1 -1
- package/dist/cli/commands/audit.d.ts +8 -0
- package/dist/cli/commands/audit.d.ts.map +1 -0
- package/dist/cli/commands/audit.js +238 -0
- package/dist/cli/commands/audit.js.map +1 -0
- package/dist/cli/commands/build.command.d.ts +7 -0
- package/dist/cli/commands/build.command.d.ts.map +1 -0
- package/dist/cli/commands/build.command.js +314 -0
- package/dist/cli/commands/build.command.js.map +1 -0
- package/dist/cli/commands/capability/validate.d.ts +3 -0
- package/dist/cli/commands/capability/validate.d.ts.map +1 -0
- package/dist/cli/commands/capability/validate.js +60 -0
- package/dist/cli/commands/capability/validate.js.map +1 -0
- package/dist/cli/commands/deploy.command.d.ts +5 -2
- package/dist/cli/commands/deploy.command.d.ts.map +1 -1
- package/dist/cli/commands/deploy.command.js +50 -154
- package/dist/cli/commands/deploy.command.js.map +1 -1
- package/dist/cli/commands/enhance.command.d.ts +10 -0
- package/dist/cli/commands/enhance.command.d.ts.map +1 -0
- package/dist/cli/commands/enhance.command.js +119 -0
- package/dist/cli/commands/enhance.command.js.map +1 -0
- package/dist/cli/commands/examples.command.d.ts +10 -0
- package/dist/cli/commands/examples.command.d.ts.map +1 -0
- package/dist/cli/commands/examples.command.js +73 -0
- package/dist/cli/commands/examples.command.js.map +1 -0
- package/dist/cli/commands/export.command.d.ts +2 -2
- package/dist/cli/commands/export.command.d.ts.map +1 -1
- package/dist/cli/commands/export.command.js +109 -37
- package/dist/cli/commands/export.command.js.map +1 -1
- package/dist/cli/commands/generate/conformance.d.ts +3 -0
- package/dist/cli/commands/generate/conformance.d.ts.map +1 -0
- package/dist/cli/commands/generate/conformance.js +106 -0
- package/dist/cli/commands/generate/conformance.js.map +1 -0
- package/dist/cli/commands/github-sync.command.js +1 -1
- package/dist/cli/commands/identity/plan.d.ts +3 -0
- package/dist/cli/commands/identity/plan.d.ts.map +1 -0
- package/dist/cli/commands/identity/plan.js +198 -0
- package/dist/cli/commands/identity/plan.js.map +1 -0
- package/dist/cli/commands/install.command.d.ts.map +1 -1
- package/dist/cli/commands/install.command.js +29 -32
- package/dist/cli/commands/install.command.js.map +1 -1
- package/dist/cli/commands/knowledge-index.command.d.ts +11 -0
- package/dist/cli/commands/knowledge-index.command.d.ts.map +1 -0
- package/dist/cli/commands/knowledge-index.command.js +111 -0
- package/dist/cli/commands/knowledge-index.command.js.map +1 -0
- package/dist/cli/commands/knowledge-query.command.d.ts +11 -0
- package/dist/cli/commands/knowledge-query.command.d.ts.map +1 -0
- package/dist/cli/commands/knowledge-query.command.js +118 -0
- package/dist/cli/commands/knowledge-query.command.js.map +1 -0
- package/dist/cli/commands/knowledge.command.d.ts +11 -0
- package/dist/cli/commands/knowledge.command.d.ts.map +1 -0
- package/dist/cli/commands/knowledge.command.js +16 -0
- package/dist/cli/commands/knowledge.command.js.map +1 -0
- package/dist/cli/commands/migrate.command.d.ts +2 -17
- package/dist/cli/commands/migrate.command.d.ts.map +1 -1
- package/dist/cli/commands/migrate.command.js +86 -144
- package/dist/cli/commands/migrate.command.js.map +1 -1
- package/dist/cli/commands/publish.command.d.ts.map +1 -1
- package/dist/cli/commands/publish.command.js +36 -106
- package/dist/cli/commands/publish.command.js.map +1 -1
- package/dist/cli/commands/release.command.d.ts +10 -0
- package/dist/cli/commands/release.command.d.ts.map +1 -0
- package/dist/cli/commands/release.command.js +73 -0
- package/dist/cli/commands/release.command.js.map +1 -0
- package/dist/cli/commands/scaffold.command.d.ts.map +1 -1
- package/dist/cli/commands/scaffold.command.js +14 -4
- package/dist/cli/commands/scaffold.command.js.map +1 -1
- package/dist/cli/commands/search.command.d.ts.map +1 -1
- package/dist/cli/commands/search.command.js +33 -33
- package/dist/cli/commands/search.command.js.map +1 -1
- package/dist/cli/commands/skills.command.d.ts +10 -0
- package/dist/cli/commands/skills.command.d.ts.map +1 -0
- package/dist/cli/commands/skills.command.js +135 -0
- package/dist/cli/commands/skills.command.js.map +1 -0
- package/dist/cli/commands/taxonomy.command.d.ts +10 -0
- package/dist/cli/commands/taxonomy.command.d.ts.map +1 -0
- package/dist/cli/commands/taxonomy.command.js +379 -0
- package/dist/cli/commands/taxonomy.command.js.map +1 -0
- package/dist/cli/commands/template.command.d.ts +7 -0
- package/dist/cli/commands/template.command.d.ts.map +1 -0
- package/dist/cli/commands/template.command.js +159 -0
- package/dist/cli/commands/template.command.js.map +1 -0
- package/dist/cli/commands/update.command.d.ts +3 -0
- package/dist/cli/commands/update.command.d.ts.map +1 -0
- package/dist/cli/commands/update.command.js +43 -0
- package/dist/cli/commands/update.command.js.map +1 -0
- package/dist/cli/commands/validate.command.d.ts.map +1 -1
- package/dist/cli/commands/validate.command.js +43 -0
- package/dist/cli/commands/validate.command.js.map +1 -1
- package/dist/cli/commands/wizard.command.d.ts.map +1 -1
- package/dist/cli/commands/wizard.command.js +29 -3
- package/dist/cli/commands/wizard.command.js.map +1 -1
- package/dist/cli/commands/workspace.command.js +3 -1
- package/dist/cli/commands/workspace.command.js.map +1 -1
- package/dist/cli/index.d.ts +2 -11
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +24 -229
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/utils/error-formatter.js.map +1 -1
- package/dist/cli/utils/output.d.ts +1 -0
- package/dist/cli/utils/output.d.ts.map +1 -1
- package/dist/cli/utils/output.js +2 -1
- package/dist/cli/utils/output.js.map +1 -1
- package/dist/cli/wizard/data/agent-types.d.ts +7 -0
- package/dist/cli/wizard/data/agent-types.d.ts.map +1 -0
- package/dist/cli/wizard/data/agent-types.js +192 -0
- package/dist/cli/wizard/data/agent-types.js.map +1 -0
- package/dist/cli/wizard/data/llm-providers.d.ts +10 -0
- package/dist/cli/wizard/data/llm-providers.d.ts.map +1 -0
- package/dist/cli/wizard/data/llm-providers.js +176 -0
- package/dist/cli/wizard/data/llm-providers.js.map +1 -0
- package/dist/cli/wizard/data/taxonomy.d.ts +39 -0
- package/dist/cli/wizard/data/taxonomy.d.ts.map +1 -0
- package/dist/cli/wizard/data/taxonomy.js +134 -0
- package/dist/cli/wizard/data/taxonomy.js.map +1 -0
- package/dist/cli/wizard/data/templates.d.ts +10 -0
- package/dist/cli/wizard/data/templates.d.ts.map +1 -0
- package/dist/cli/wizard/data/templates.js +228 -0
- package/dist/cli/wizard/data/templates.js.map +1 -0
- package/dist/cli/wizard/steps/01-agent-type.d.ts +7 -0
- package/dist/cli/wizard/steps/01-agent-type.d.ts.map +1 -0
- package/dist/cli/wizard/steps/01-agent-type.js +35 -0
- package/dist/cli/wizard/steps/01-agent-type.js.map +1 -0
- package/dist/cli/wizard/steps/02-basic-info.d.ts +7 -0
- package/dist/cli/wizard/steps/02-basic-info.d.ts.map +1 -0
- package/dist/cli/wizard/steps/02-basic-info.js +81 -0
- package/dist/cli/wizard/steps/02-basic-info.js.map +1 -0
- package/dist/cli/wizard/steps/03-domain-capability.d.ts +7 -0
- package/dist/cli/wizard/steps/03-domain-capability.d.ts.map +1 -0
- package/dist/cli/wizard/steps/03-domain-capability.js +98 -0
- package/dist/cli/wizard/steps/03-domain-capability.js.map +1 -0
- package/dist/cli/wizard/steps/04-llm-config.d.ts +7 -0
- package/dist/cli/wizard/steps/04-llm-config.d.ts.map +1 -0
- package/dist/cli/wizard/steps/04-llm-config.js +86 -0
- package/dist/cli/wizard/steps/04-llm-config.js.map +1 -0
- package/dist/cli/wizard/steps/05-tools.d.ts +7 -0
- package/dist/cli/wizard/steps/05-tools.d.ts.map +1 -0
- package/dist/cli/wizard/steps/05-tools.js +172 -0
- package/dist/cli/wizard/steps/05-tools.js.map +1 -0
- package/dist/cli/wizard/steps/06-autonomy.d.ts +7 -0
- package/dist/cli/wizard/steps/06-autonomy.d.ts.map +1 -0
- package/dist/cli/wizard/steps/06-autonomy.js +87 -0
- package/dist/cli/wizard/steps/06-autonomy.js.map +1 -0
- package/dist/cli/wizard/steps/07-observability.d.ts +7 -0
- package/dist/cli/wizard/steps/07-observability.d.ts.map +1 -0
- package/dist/cli/wizard/steps/07-observability.js +149 -0
- package/dist/cli/wizard/steps/07-observability.js.map +1 -0
- package/dist/cli/wizard/steps/08-deployment.d.ts +7 -0
- package/dist/cli/wizard/steps/08-deployment.d.ts.map +1 -0
- package/dist/cli/wizard/steps/08-deployment.js +120 -0
- package/dist/cli/wizard/steps/08-deployment.js.map +1 -0
- package/dist/cli/wizard/steps/09-advanced.d.ts +7 -0
- package/dist/cli/wizard/steps/09-advanced.d.ts.map +1 -0
- package/dist/cli/wizard/steps/09-advanced.js +160 -0
- package/dist/cli/wizard/steps/09-advanced.js.map +1 -0
- package/dist/cli/wizard/steps/10-review.d.ts +7 -0
- package/dist/cli/wizard/steps/10-review.d.ts.map +1 -0
- package/dist/cli/wizard/steps/10-review.js +109 -0
- package/dist/cli/wizard/steps/10-review.js.map +1 -0
- package/dist/cli/wizard/steps/12-agents-folder.d.ts +7 -0
- package/dist/cli/wizard/steps/12-agents-folder.d.ts.map +1 -0
- package/dist/cli/wizard/steps/12-agents-folder.js +101 -0
- package/dist/cli/wizard/steps/12-agents-folder.js.map +1 -0
- package/dist/cli/wizard/steps/13-openapi-generation.d.ts +7 -0
- package/dist/cli/wizard/steps/13-openapi-generation.d.ts.map +1 -0
- package/dist/cli/wizard/steps/13-openapi-generation.js +60 -0
- package/dist/cli/wizard/steps/13-openapi-generation.js.map +1 -0
- package/dist/cli/wizard/steps/14-workspace-registration.d.ts +7 -0
- package/dist/cli/wizard/steps/14-workspace-registration.d.ts.map +1 -0
- package/dist/cli/wizard/steps/14-workspace-registration.js +65 -0
- package/dist/cli/wizard/steps/14-workspace-registration.js.map +1 -0
- package/dist/cli/wizard/steps/15-cost-estimation.d.ts +7 -0
- package/dist/cli/wizard/steps/15-cost-estimation.d.ts.map +1 -0
- package/dist/cli/wizard/steps/15-cost-estimation.js +119 -0
- package/dist/cli/wizard/steps/15-cost-estimation.js.map +1 -0
- package/dist/cli/wizard/steps/16-best-practices.d.ts +7 -0
- package/dist/cli/wizard/steps/16-best-practices.d.ts.map +1 -0
- package/dist/cli/wizard/steps/16-best-practices.js +180 -0
- package/dist/cli/wizard/steps/16-best-practices.js.map +1 -0
- package/dist/cli/wizard/steps/index.d.ts +15 -0
- package/dist/cli/wizard/steps/index.d.ts.map +1 -0
- package/dist/cli/wizard/steps/index.js +15 -0
- package/dist/cli/wizard/steps/index.js.map +1 -0
- package/dist/cli/wizard/types.d.ts +94 -0
- package/dist/cli/wizard/types.d.ts.map +1 -0
- package/dist/cli/wizard/types.js +6 -0
- package/dist/cli/wizard/types.js.map +1 -0
- package/dist/cli/wizard/ui/console.d.ts +26 -0
- package/dist/cli/wizard/ui/console.d.ts.map +1 -0
- package/dist/cli/wizard/ui/console.js +104 -0
- package/dist/cli/wizard/ui/console.js.map +1 -0
- package/dist/cli/wizard/validators/index.d.ts +11 -0
- package/dist/cli/wizard/validators/index.d.ts.map +1 -0
- package/dist/cli/wizard/validators/index.js +35 -0
- package/dist/cli/wizard/validators/index.js.map +1 -0
- package/dist/di-container.d.ts.map +1 -1
- package/dist/di-container.js +16 -0
- package/dist/di-container.js.map +1 -1
- package/dist/index.d.ts +7 -24
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -31
- package/dist/index.js.map +1 -1
- package/dist/repositories/manifest.repository.js +1 -1
- package/dist/repositories/manifest.repository.js.map +1 -1
- package/dist/repositories/schema.repository.d.ts.map +1 -1
- package/dist/repositories/schema.repository.js +7 -4
- package/dist/repositories/schema.repository.js.map +1 -1
- package/dist/runtime/langflow.runtime.d.ts +2 -2
- package/dist/sdks/kagent/crd-generator.d.ts +21 -0
- package/dist/sdks/kagent/crd-generator.d.ts.map +1 -0
- package/dist/sdks/kagent/crd-generator.js +101 -0
- package/dist/sdks/kagent/crd-generator.js.map +1 -0
- package/dist/sdks/kagent/crd-parser.d.ts +13 -0
- package/dist/sdks/kagent/crd-parser.d.ts.map +1 -0
- package/dist/sdks/kagent/crd-parser.js +91 -0
- package/dist/sdks/kagent/crd-parser.js.map +1 -0
- package/dist/sdks/kagent/index.d.ts +10 -0
- package/dist/sdks/kagent/index.d.ts.map +1 -0
- package/dist/sdks/kagent/index.js +9 -0
- package/dist/sdks/kagent/index.js.map +1 -0
- package/dist/sdks/kagent/runtime-adapter.d.ts +45 -0
- package/dist/sdks/kagent/runtime-adapter.d.ts.map +1 -0
- package/dist/sdks/kagent/runtime-adapter.js +129 -0
- package/dist/sdks/kagent/runtime-adapter.js.map +1 -0
- package/dist/sdks/kagent/types.d.ts +91 -0
- package/dist/sdks/kagent/types.d.ts.map +1 -0
- package/dist/sdks/kagent/types.js +5 -0
- package/dist/sdks/kagent/types.js.map +1 -0
- package/dist/sdks/kagent/validator.d.ts +17 -0
- package/dist/sdks/kagent/validator.d.ts.map +1 -0
- package/dist/sdks/kagent/validator.js +73 -0
- package/dist/sdks/kagent/validator.js.map +1 -0
- package/dist/sdks/shared/types.d.ts +1 -1
- package/dist/sdks/typescript/types.d.ts +3 -3
- package/dist/sdks/typescript/types.js +3 -3
- package/dist/services/agents-md/agents-md.service.d.ts.map +1 -1
- package/dist/services/agents-md/agents-md.service.js +0 -6
- package/dist/services/agents-md/agents-md.service.js.map +1 -1
- package/dist/services/agents-md/repo-agents-md.service.d.ts +87 -0
- package/dist/services/agents-md/repo-agents-md.service.d.ts.map +1 -0
- package/dist/services/agents-md/repo-agents-md.service.js +202 -0
- package/dist/services/agents-md/repo-agents-md.service.js.map +1 -0
- package/dist/services/ai-architect.service.d.ts +48 -0
- package/dist/services/ai-architect.service.d.ts.map +1 -0
- package/dist/services/ai-architect.service.js +273 -0
- package/dist/services/ai-architect.service.js.map +1 -0
- package/dist/services/audit.d.ts +80 -0
- package/dist/services/audit.d.ts.map +1 -0
- package/dist/services/audit.js +245 -0
- package/dist/services/audit.js.map +1 -0
- package/dist/services/codegen/generators/openapi-zod.generator.js +1 -1
- package/dist/services/git.service.d.ts +10 -1
- package/dist/services/git.service.d.ts.map +1 -1
- package/dist/services/git.service.js +42 -2
- package/dist/services/git.service.js.map +1 -1
- package/dist/services/knowledge-generation.service.d.ts +46 -0
- package/dist/services/knowledge-generation.service.d.ts.map +1 -0
- package/dist/services/knowledge-generation.service.js +96 -0
- package/dist/services/knowledge-generation.service.js.map +1 -0
- package/dist/services/knowledge.service.d.ts +88 -0
- package/dist/services/knowledge.service.d.ts.map +1 -0
- package/dist/services/knowledge.service.js +214 -0
- package/dist/services/knowledge.service.js.map +1 -0
- package/dist/services/migration-transform.service.d.ts +11 -3
- package/dist/services/migration-transform.service.d.ts.map +1 -1
- package/dist/services/migration-transform.service.js +69 -10
- package/dist/services/migration-transform.service.js.map +1 -1
- package/dist/services/registry.service.d.ts +34 -0
- package/dist/services/registry.service.d.ts.map +1 -0
- package/dist/services/registry.service.js +161 -0
- package/dist/services/registry.service.js.map +1 -0
- package/dist/services/release-automation/release-agent.service.d.ts +39 -0
- package/dist/services/release-automation/release-agent.service.d.ts.map +1 -0
- package/dist/services/release-automation/release-agent.service.js +42 -0
- package/dist/services/release-automation/release-agent.service.js.map +1 -0
- package/dist/services/skills/claude-skills.service.d.ts +51 -0
- package/dist/services/skills/claude-skills.service.d.ts.map +1 -0
- package/dist/services/skills/claude-skills.service.js +252 -0
- package/dist/services/skills/claude-skills.service.js.map +1 -0
- package/dist/services/structure/agents-folder.service.d.ts +37 -0
- package/dist/services/structure/agents-folder.service.d.ts.map +1 -0
- package/dist/services/structure/agents-folder.service.js +318 -0
- package/dist/services/structure/agents-folder.service.js.map +1 -0
- package/dist/services/taxonomy-validator.service.d.ts +25 -0
- package/dist/services/taxonomy-validator.service.d.ts.map +1 -0
- package/dist/services/taxonomy-validator.service.js +149 -0
- package/dist/services/taxonomy-validator.service.js.map +1 -0
- package/dist/services/taxonomy.service.d.ts +132 -0
- package/dist/services/taxonomy.service.d.ts.map +1 -0
- package/dist/services/taxonomy.service.js +330 -0
- package/dist/services/taxonomy.service.js.map +1 -0
- package/dist/services/template-processor.service.d.ts +34 -0
- package/dist/services/template-processor.service.d.ts.map +1 -0
- package/dist/services/template-processor.service.js +112 -0
- package/dist/services/template-processor.service.js.map +1 -0
- package/dist/services/template.service.d.ts +54 -0
- package/dist/services/template.service.d.ts.map +1 -0
- package/dist/services/template.service.js +154 -0
- package/dist/services/template.service.js.map +1 -0
- package/dist/spec/ossa-audit-api.yaml +311 -0
- package/dist/spec/registry/registry-api.yaml +144 -0
- package/dist/spec/schema/components/adapter.schema.json +33 -0
- package/dist/spec/schema/components/identity.schema.json +78 -0
- package/dist/spec/v0.3/CHANGELOG.md +2 -2
- package/dist/spec/v0.3/MIGRATION-v0.3.5-to-v0.3.6.md +552 -0
- package/dist/spec/v0.3/README.md +2 -2
- package/dist/spec/v0.3/ossa-0.3.6.schema.json +17604 -0
- package/dist/spec/v0.3/ossa-v0.3.schema.json +15824 -0
- package/dist/spec/v0.3.6/CHANGELOG.md +171 -0
- package/dist/spec/v0.3.6/README.md +382 -0
- package/dist/spec/v0.3.6/taxonomy.yaml +506 -0
- package/dist/testing/fixtures.d.ts.map +1 -1
- package/dist/testing/fixtures.js +6 -0
- package/dist/testing/fixtures.js.map +1 -1
- package/dist/testing/runner.d.ts.map +1 -1
- package/dist/testing/runner.js +4 -20
- package/dist/testing/runner.js.map +1 -1
- package/dist/types/architect.d.ts +48 -0
- package/dist/types/architect.d.ts.map +1 -0
- package/dist/types/architect.js +7 -0
- package/dist/types/architect.js.map +1 -0
- package/dist/types/identity.d.ts +78 -401
- package/dist/types/identity.d.ts.map +1 -1
- package/dist/types/identity.js +5 -7
- package/dist/types/identity.js.map +1 -1
- package/dist/types/identity.zod.d.ts +5 -5
- package/dist/types/index.d.ts +69 -41
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +4 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/personality.zod.d.ts +24 -24
- package/dist/types/prompts.zod.d.ts +4 -4
- package/dist/utils/version.d.ts.map +1 -1
- package/dist/utils/version.js +73 -46
- package/dist/utils/version.js.map +1 -1
- package/dist/validation/__tests__/error-codes.test.d.ts +5 -0
- package/dist/validation/__tests__/error-codes.test.d.ts.map +1 -0
- package/dist/validation/__tests__/error-codes.test.js +252 -0
- package/dist/validation/__tests__/error-codes.test.js.map +1 -0
- package/dist/validation/enhanced-validator.d.ts +38 -0
- package/dist/validation/enhanced-validator.d.ts.map +1 -0
- package/dist/validation/enhanced-validator.js +242 -0
- package/dist/validation/enhanced-validator.js.map +1 -0
- package/dist/validation/error-codes.d.ts +170 -0
- package/dist/validation/error-codes.d.ts.map +1 -0
- package/dist/validation/error-codes.js +1159 -0
- package/dist/validation/error-codes.js.map +1 -0
- package/dist/validation/error-formatter.d.ts +81 -0
- package/dist/validation/error-formatter.d.ts.map +1 -0
- package/dist/validation/error-formatter.js +375 -0
- package/dist/validation/error-formatter.js.map +1 -0
- package/dist/validation/index.d.ts +16 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/index.js +20 -0
- package/dist/validation/index.js.map +1 -0
- package/dist/validation/linter.d.ts +36 -0
- package/dist/validation/linter.d.ts.map +1 -0
- package/dist/validation/linter.js +453 -0
- package/dist/validation/linter.js.map +1 -0
- package/dist/validation/validator.d.ts +38 -0
- package/dist/validation/validator.d.ts.map +1 -0
- package/dist/validation/validator.js +262 -0
- package/dist/validation/validator.js.map +1 -0
- package/examples/a2a/agent-handoff.ossa.yaml +1 -1
- package/examples/a2a/service-discovery.ossa.yaml +1 -1
- package/examples/adapters/drupal-eca-mapping.yaml +1 -1
- package/examples/adapters/drupal-eca-task.yaml +1 -1
- package/examples/adapters/drupal-flowdrop-mapping.yaml +1 -1
- package/examples/adapters/drupal-maestro-mapping.yaml +1 -1
- package/examples/adapters/mistral-agent.yaml +1 -1
- package/examples/adapters/symfony-messenger-task.yaml +1 -1
- package/examples/adapters/symfony-messenger-workflow.yaml +1 -1
- package/examples/advanced/reasoning-agent.yaml +1 -1
- 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/workers/worker-agent.yaml +1 -1
- package/examples/agents/architecture-healer-enterprise.yaml +1 -1
- package/examples/agents/dependency-healer-npm.yaml +1 -1
- package/examples/agents/spec-healer-openapi.yaml +1 -1
- package/examples/agents/wiki-healer-production.yaml +1 -1
- package/examples/agents-md/monorepo-agent.ossa.yaml +1 -1
- package/examples/autonomous-evolution/self-evolving-agent.ossa.yaml +1 -1
- package/examples/build-once-use-everywhere/README.md +184 -0
- package/examples/build-once-use-everywhere/agent.ossa.yaml +38 -0
- package/examples/build-once-use-everywhere/deploy-config.yaml +32 -0
- package/examples/claude-code/ossa-validator.ossa.yaml +1 -1
- package/examples/common_npm/agent-router.ossa.yaml +1 -1
- package/examples/contracts/data-consumer.ossa.yaml +1 -1
- package/examples/contracts/data-producer-v2.ossa.yaml +5 -3
- package/examples/contracts/data-producer.ossa.yaml +1 -1
- package/examples/drupal/gitlab-ml-recommender.ossa.yaml +1 -1
- package/examples/economics/marketplace-agent.ossa.json +210 -0
- package/examples/extensions/encryption-multi-provider.yaml +4 -4
- package/examples/extensions/knowledge-sources.yaml +1 -1
- package/examples/extensions/mcp-full-featured.yaml +1 -1
- package/examples/genetics/breeding-agent.ossa.json +194 -0
- package/examples/getting-started/01-minimal-agent.ossa.yaml +1 -1
- package/examples/getting-started/02-agent-with-tools.ossa.yaml +1 -1
- package/examples/getting-started/03-agent-with-safety.ossa.yaml +1 -1
- package/examples/getting-started/04-agent-with-messaging.ossa.yaml +1 -1
- package/examples/getting-started/05-workflow-composition.ossa.yaml +1 -1
- package/examples/getting-started/hello-world-complete.ossa.yaml +1 -1
- package/examples/integration-patterns/agent-to-agent-orchestration.ossa.yaml +1 -1
- 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.ossa.yaml +1 -1
- package/examples/kagent/security-scanner.ossa.yaml +1 -1
- package/examples/lifecycle/mentoring-agent.ossa.json +293 -0
- package/examples/mcp/database-mcp.ossa.yaml +1 -1
- package/examples/mcp/filesystem-mcp.ossa.yaml +1 -1
- package/examples/messaging/dependency-healer.ossa.yaml +1 -1
- package/examples/messaging/incident-responder.ossa.yaml +1 -1
- package/examples/messaging/routing-rules.ossa.yaml +1 -1
- package/examples/messaging/security-scanner.ossa.yaml +1 -1
- package/examples/migration-guides/from-langchain-to-ossa.yaml +4 -4
- package/examples/migrations/crewai-to-ossa/README.md +66 -0
- package/examples/migrations/langchain/01-python-react-agent-after.ossa.yaml +2 -2
- package/examples/migrations/langchain/02-typescript-conversational-after.ossa.yaml +2 -2
- package/examples/migrations/langchain/03-sequential-chain-after.ossa.yaml +2 -2
- package/examples/migrations/langchain/04-config-based-after.ossa.yaml +2 -2
- package/examples/migrations/langchain-to-ossa/README.md +73 -0
- package/examples/migrations/swarm-to-ossa/COMPARISON.md +350 -0
- package/examples/migrations/swarm-to-ossa/INDEX.md +355 -0
- package/examples/migrations/swarm-to-ossa/MIGRATION-FLOW.md +410 -0
- package/examples/migrations/swarm-to-ossa/QUICKSTART.md +453 -0
- package/examples/migrations/swarm-to-ossa/README.md +665 -0
- package/examples/migrations/swarm-to-ossa/after-handoffs.ossa.yaml +482 -0
- package/examples/migrations/swarm-to-ossa/after-triage-agent.ossa.yaml +315 -0
- package/examples/migrations/swarm-to-ossa/before-handoffs.py +373 -0
- package/examples/migrations/swarm-to-ossa/before-triage-agent.py +234 -0
- 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/multi-platform/single-manifest/README.md +72 -0
- package/examples/multi-platform/single-manifest/agent.ossa.yaml +32 -0
- package/examples/observability/activity-stream-full.yaml +1 -1
- package/examples/openai/basic-agent.ossa.yaml +1 -1
- package/examples/ossa-templates/11-react-performance-expert.ossa.yaml +1 -1
- package/examples/ossa-templates/12-typescript-type-safety-expert.ossa.yaml +1 -1
- package/examples/ossa-templates/13-accessibility-champion.ossa.yaml +1 -1
- package/examples/ossa-templates/14-security-hardening-agent.ossa.yaml +1 -1
- package/examples/quickstart/support-agent.ossa.yaml +1 -1
- package/examples/real-world/gitlab-cicd-optimizer.ossa.yaml +1 -1
- package/examples/real-world/rag-documentation-assistant.ossa.yaml +1 -1
- package/examples/registry/agents/code-reviewer/agent.yaml +1 -1
- package/examples/registry/agents/security-scanner/agent.yaml +1 -1
- package/examples/runtime-adapters/bedrock-claude-example.ossa.yaml +1 -1
- package/examples/schema/reusable-components.yaml +1 -1
- package/examples/showcase/ci-pipeline.ossa.yaml +1 -1
- package/examples/showcase/code-assistant.ossa.yaml +1 -1
- package/examples/showcase/code-reviewer.ossa.yaml +1 -1
- package/examples/showcase/compliance-validator.ossa.yaml +1 -1
- package/examples/showcase/content-writer.ossa.yaml +1 -1
- package/examples/showcase/data-transformer.ossa.yaml +1 -1
- package/examples/showcase/doc-generator.ossa.yaml +1 -1
- package/examples/showcase/security-scanner.ossa.yaml +1 -1
- package/examples/showcase/test-generator.ossa.yaml +1 -1
- package/examples/showcase/workflow-orchestrator.ossa.yaml +1 -1
- package/examples/swarm/pso-optimizer.ossa.json +171 -0
- package/examples/tasks/batch-email-sender.yaml +1 -1
- package/examples/tasks/data-transform.yaml +1 -1
- package/examples/tasks/publish-content.yaml +1 -1
- package/examples/templates/ossa-compliance.yaml +1 -1
- package/examples/unified/security-scanner.ossa.yaml +1 -1
- package/examples/v0.3.6/full-featured-v0.3.6.ossa.yaml +304 -0
- package/examples/v0.3.6/gitlab-duo-composite-identity.ossa.yaml +119 -0
- package/examples/v0.3.6/knowledge-graph-integration.ossa.yaml +109 -0
- package/examples/v0.3.6/token-efficiency-economy.ossa.yaml +111 -0
- package/examples/v0.3.6-features/README.md +433 -0
- package/examples/v0.3.6-features/genetics-breeding-advanced.ossa.yaml +496 -0
- package/examples/v0.3.6-features/genetics-breeding-simple.ossa.yaml +304 -0
- package/examples/v0.3.6-features/genetics-fitness-scoring.ossa.yaml +551 -0
- package/examples/validation/error-codes-demo.ts +254 -0
- package/examples/workflows/batch-email-campaign.yaml +1 -1
- package/examples/workflows/content-review-publish.yaml +1 -1
- package/examples/workflows/simple-etl.yaml +1 -1
- package/openapi/agents-md-service.yaml +338 -0
- package/openapi/cli-commands.openapi.yaml +0 -28
- package/openapi/ossa-cli-enhancements.openapi.yaml +148 -0
- package/openapi/release-automation.openapi.yaml +144 -0
- package/package.json +35 -12
- package/schemas/capability-contract.v0.json +116 -0
- package/schemas/identity.lock.schema.json +59 -0
- package/schemas/identity.plan.schema.json +132 -0
- package/spec/ossa-audit-api.yaml +311 -0
- package/spec/registry/registry-api.yaml +144 -0
- package/spec/schema/components/adapter.schema.json +33 -0
- package/spec/schema/components/identity.schema.json +78 -0
- package/spec/v0.3/CHANGELOG.md +2 -2
- package/spec/v0.3/MIGRATION-v0.3.5-to-v0.3.6.md +552 -0
- package/spec/v0.3/README.md +2 -2
- package/spec/v0.3/ossa-0.3.6.schema.json +17604 -0
- package/spec/v0.3/ossa-v0.3.schema.json +15824 -0
- package/spec/v0.3.6/CHANGELOG.md +171 -0
- package/spec/v0.3.6/README.md +382 -0
- package/spec/v0.3.6/taxonomy.yaml +506 -0
- package/src/dev-cli/src/index.ts +0 -0
- package/templates/agent-types/analyzer/cost-analyzer.yaml +38 -0
- package/templates/agent-types/analyzer/performance-profiler.yaml +38 -0
- package/templates/agent-types/analyzer/security-scanner.yaml +36 -0
- package/templates/agent-types/backend/api-validator.yaml +37 -0
- package/templates/agent-types/backend/load-balancer.yaml +39 -0
- package/templates/agent-types/content/content-generator.yaml +40 -0
- package/templates/agent-types/content/seo-optimizer.yaml +39 -0
- package/templates/agent-types/data/data-processor.yaml +38 -0
- package/templates/agent-types/data/report-generator.yaml +40 -0
- package/templates/agent-types/development/code-generator.yaml +39 -0
- package/templates/agent-types/development/dependency-updater.yaml +38 -0
- package/templates/agent-types/frontend/accessibility-checker.yaml +38 -0
- package/templates/agent-types/frontend/ui-tester.yaml +38 -0
- package/templates/agent-types/infrastructure/deployment-automator.yaml +39 -0
- package/templates/agent-types/infrastructure/resource-optimizer.yaml +38 -0
- package/templates/agent-types/monitor/health-checker.yaml +37 -0
- package/templates/agent-types/monitor/log-analyzer.yaml +37 -0
- package/templates/agent-types/orchestrator/multi-agent-coordinator.yaml +38 -0
- package/templates/agent-types/orchestrator/workflow-manager.yaml +39 -0
- package/templates/agent-types/security/compliance-checker.yaml +38 -0
- package/templates/agent-types/security/vulnerability-scanner.yaml +38 -0
- package/templates/agent-types/worker/api-tester.yaml +43 -0
- package/templates/agent-types/worker/code-reviewer.yaml +39 -0
- package/templates/agent-types/worker/database-migrator.yaml +38 -0
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
---
|
|
2
|
+
# OSSA v0.3.6 - Customer Service Triage Agent
|
|
3
|
+
#
|
|
4
|
+
# This is the OSSA equivalent of before-triage-agent.py
|
|
5
|
+
#
|
|
6
|
+
# Benefits over OpenAI Swarm:
|
|
7
|
+
# - Declarative YAML (version control, CI/CD, GitOps)
|
|
8
|
+
# - Deploy to ANY platform (Anthropic, OpenAI, LangChain, CrewAI, AutoGen)
|
|
9
|
+
# - Production-ready (auth, observability, rate limiting, governance)
|
|
10
|
+
# - 50% less code
|
|
11
|
+
# - Enterprise features built-in
|
|
12
|
+
|
|
13
|
+
apiVersion: ossa/v0.3.6
|
|
14
|
+
kind: Agent
|
|
15
|
+
metadata:
|
|
16
|
+
name: customer-service-triage
|
|
17
|
+
version: 1.0.0
|
|
18
|
+
description: "Customer service triage agent that routes requests to specialized agents"
|
|
19
|
+
|
|
20
|
+
# Agent Catalog (for discovery and reuse)
|
|
21
|
+
catalog:
|
|
22
|
+
published: true
|
|
23
|
+
catalog_id: ossa-customer-service-triage
|
|
24
|
+
visibility: public
|
|
25
|
+
categories:
|
|
26
|
+
- customer-service
|
|
27
|
+
- triage
|
|
28
|
+
- multi-agent
|
|
29
|
+
tags:
|
|
30
|
+
- customer-support
|
|
31
|
+
- routing
|
|
32
|
+
- handoffs
|
|
33
|
+
documentation_url: https://docs.example.com/agents/customer-service-triage
|
|
34
|
+
|
|
35
|
+
labels:
|
|
36
|
+
department: customer-service
|
|
37
|
+
tier: production
|
|
38
|
+
version: v1
|
|
39
|
+
|
|
40
|
+
spec:
|
|
41
|
+
# Agent role and behavior
|
|
42
|
+
role: |
|
|
43
|
+
You are a friendly customer service triage agent.
|
|
44
|
+
|
|
45
|
+
Your role is to:
|
|
46
|
+
1. Greet customers warmly
|
|
47
|
+
2. Understand their request or issue
|
|
48
|
+
3. Route them to the appropriate specialist:
|
|
49
|
+
- Sales Agent: For product inquiries, purchases, or general questions
|
|
50
|
+
- Refunds Agent: For returns, refunds, or order issues
|
|
51
|
+
|
|
52
|
+
Be concise and efficient in your routing.
|
|
53
|
+
|
|
54
|
+
# LLM Configuration
|
|
55
|
+
llm:
|
|
56
|
+
provider: anthropic # or "openai" to keep using OpenAI
|
|
57
|
+
model: claude-sonnet-4-5
|
|
58
|
+
temperature: 0.7
|
|
59
|
+
max_tokens: 2048
|
|
60
|
+
|
|
61
|
+
# Handoffs (Swarm's "transfer functions" → OSSA handoffs)
|
|
62
|
+
# This replaces transfer_to_sales_agent() and transfer_to_refunds_agent()
|
|
63
|
+
handoffs:
|
|
64
|
+
- name: route_to_sales
|
|
65
|
+
target_agent: sales-agent
|
|
66
|
+
description: "Route customer to sales agent for purchases and product questions"
|
|
67
|
+
condition: "intent == 'purchase' or intent == 'product_info' or intent == 'general_question'"
|
|
68
|
+
trigger: automatic # Handoff happens automatically when condition is met
|
|
69
|
+
context_transfer: full # Transfer entire conversation history
|
|
70
|
+
|
|
71
|
+
- name: route_to_refunds
|
|
72
|
+
target_agent: refunds-agent
|
|
73
|
+
description: "Route customer to refunds agent for returns and refunds"
|
|
74
|
+
condition: "intent == 'refund' or intent == 'return' or intent == 'complaint'"
|
|
75
|
+
trigger: automatic
|
|
76
|
+
context_transfer: full
|
|
77
|
+
|
|
78
|
+
# Context variables (Swarm's context_variables → OSSA context)
|
|
79
|
+
context_propagation:
|
|
80
|
+
mode: selective # Only propagate specified fields
|
|
81
|
+
allowed_fields:
|
|
82
|
+
- user_id
|
|
83
|
+
- account_type
|
|
84
|
+
- session_id
|
|
85
|
+
- conversation_history
|
|
86
|
+
sensitive_fields: # These require encryption in transit
|
|
87
|
+
- payment_info
|
|
88
|
+
- personal_data
|
|
89
|
+
|
|
90
|
+
# Authentication & Authorization (NOT available in Swarm)
|
|
91
|
+
identity:
|
|
92
|
+
provider: oauth2
|
|
93
|
+
authentication:
|
|
94
|
+
method: oauth2
|
|
95
|
+
scopes:
|
|
96
|
+
- read:user
|
|
97
|
+
- write:support_ticket
|
|
98
|
+
auto_refresh: true
|
|
99
|
+
|
|
100
|
+
# Observability (NOT available in Swarm)
|
|
101
|
+
observability:
|
|
102
|
+
metrics:
|
|
103
|
+
enabled: true
|
|
104
|
+
export_interval: 30s
|
|
105
|
+
metrics:
|
|
106
|
+
- handoff_rate
|
|
107
|
+
- response_time
|
|
108
|
+
- customer_satisfaction
|
|
109
|
+
tracing:
|
|
110
|
+
enabled: true
|
|
111
|
+
sampler: always_on
|
|
112
|
+
logging:
|
|
113
|
+
level: info
|
|
114
|
+
structured: true
|
|
115
|
+
include_context: true
|
|
116
|
+
|
|
117
|
+
# Rate Limiting (NOT available in Swarm)
|
|
118
|
+
constraints:
|
|
119
|
+
rate_limits:
|
|
120
|
+
requests_per_minute: 100
|
|
121
|
+
requests_per_hour: 1000
|
|
122
|
+
tokens_per_day: 500000
|
|
123
|
+
max_conversation_turns: 50
|
|
124
|
+
timeout_seconds: 30
|
|
125
|
+
|
|
126
|
+
# Cost Control (NOT available in Swarm)
|
|
127
|
+
token_efficiency:
|
|
128
|
+
enabled: true
|
|
129
|
+
target_savings: 0.5 # 50% token reduction
|
|
130
|
+
context_management:
|
|
131
|
+
strategy: adaptive
|
|
132
|
+
pruning:
|
|
133
|
+
enabled: true
|
|
134
|
+
threshold: 0.3 # Remove low-relevance context
|
|
135
|
+
caching:
|
|
136
|
+
enabled: true
|
|
137
|
+
strategy: semantic
|
|
138
|
+
ttl: 3600
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
# Sales Agent (equivalent to sales_agent in Swarm)
|
|
142
|
+
apiVersion: ossa/v0.3.6
|
|
143
|
+
kind: Agent
|
|
144
|
+
metadata:
|
|
145
|
+
name: sales-agent
|
|
146
|
+
version: 1.0.0
|
|
147
|
+
description: "Sales specialist agent for product questions and orders"
|
|
148
|
+
|
|
149
|
+
spec:
|
|
150
|
+
role: |
|
|
151
|
+
You are a knowledgeable sales agent.
|
|
152
|
+
|
|
153
|
+
Your role is to:
|
|
154
|
+
1. Answer product questions
|
|
155
|
+
2. Help customers make purchases
|
|
156
|
+
3. Provide recommendations
|
|
157
|
+
4. Execute orders when customers are ready
|
|
158
|
+
|
|
159
|
+
Be helpful and enthusiastic about our products!
|
|
160
|
+
|
|
161
|
+
llm:
|
|
162
|
+
provider: anthropic
|
|
163
|
+
model: claude-sonnet-4-5
|
|
164
|
+
temperature: 0.8 # More creative for sales
|
|
165
|
+
max_tokens: 2048
|
|
166
|
+
|
|
167
|
+
# Capabilities (Swarm's "functions" → OSSA capabilities)
|
|
168
|
+
# This replaces execute_order() function
|
|
169
|
+
capabilities:
|
|
170
|
+
- name: execute_order
|
|
171
|
+
description: "Execute a product order for the customer"
|
|
172
|
+
input_schema:
|
|
173
|
+
type: object
|
|
174
|
+
properties:
|
|
175
|
+
product_id:
|
|
176
|
+
type: string
|
|
177
|
+
description: "The product identifier"
|
|
178
|
+
pattern: "^[A-Z0-9-]+$"
|
|
179
|
+
quantity:
|
|
180
|
+
type: integer
|
|
181
|
+
description: "Number of items to order"
|
|
182
|
+
minimum: 1
|
|
183
|
+
maximum: 100
|
|
184
|
+
default: 1
|
|
185
|
+
required:
|
|
186
|
+
- product_id
|
|
187
|
+
output_schema:
|
|
188
|
+
type: object
|
|
189
|
+
properties:
|
|
190
|
+
order_id:
|
|
191
|
+
type: string
|
|
192
|
+
description: "Generated order identifier"
|
|
193
|
+
total_price:
|
|
194
|
+
type: number
|
|
195
|
+
description: "Total order price in USD"
|
|
196
|
+
status:
|
|
197
|
+
type: string
|
|
198
|
+
enum: [confirmed, pending, failed]
|
|
199
|
+
message:
|
|
200
|
+
type: string
|
|
201
|
+
description: "Order confirmation message"
|
|
202
|
+
|
|
203
|
+
# Handoffs back to triage or to refunds
|
|
204
|
+
handoffs:
|
|
205
|
+
- name: escalate_to_refunds
|
|
206
|
+
target_agent: refunds-agent
|
|
207
|
+
condition: "customer_wants_refund == true"
|
|
208
|
+
trigger: manual # Sales agent must explicitly decide to handoff
|
|
209
|
+
|
|
210
|
+
- name: return_to_triage
|
|
211
|
+
target_agent: customer-service-triage
|
|
212
|
+
condition: "request_type == 'other'"
|
|
213
|
+
trigger: automatic
|
|
214
|
+
|
|
215
|
+
# Observability
|
|
216
|
+
observability:
|
|
217
|
+
metrics:
|
|
218
|
+
enabled: true
|
|
219
|
+
metrics:
|
|
220
|
+
- orders_executed
|
|
221
|
+
- average_order_value
|
|
222
|
+
- conversion_rate
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
# Refunds Agent (equivalent to refunds_agent in Swarm)
|
|
226
|
+
apiVersion: ossa/v0.3.6
|
|
227
|
+
kind: Agent
|
|
228
|
+
metadata:
|
|
229
|
+
name: refunds-agent
|
|
230
|
+
version: 1.0.0
|
|
231
|
+
description: "Refunds specialist agent for returns and refunds"
|
|
232
|
+
|
|
233
|
+
spec:
|
|
234
|
+
role: |
|
|
235
|
+
You are an empathetic refunds specialist.
|
|
236
|
+
|
|
237
|
+
Your role is to:
|
|
238
|
+
1. Listen to customer concerns
|
|
239
|
+
2. Process refund requests
|
|
240
|
+
3. Explain refund policies clearly
|
|
241
|
+
4. Resolve issues with care
|
|
242
|
+
|
|
243
|
+
Be understanding and process refunds quickly.
|
|
244
|
+
|
|
245
|
+
llm:
|
|
246
|
+
provider: anthropic
|
|
247
|
+
model: claude-sonnet-4-5
|
|
248
|
+
temperature: 0.6 # Balanced for empathy and accuracy
|
|
249
|
+
max_tokens: 2048
|
|
250
|
+
|
|
251
|
+
# Capabilities (Swarm's "functions" → OSSA capabilities)
|
|
252
|
+
# This replaces process_refund() function
|
|
253
|
+
capabilities:
|
|
254
|
+
- name: process_refund
|
|
255
|
+
description: "Process a refund request for an item"
|
|
256
|
+
input_schema:
|
|
257
|
+
type: object
|
|
258
|
+
properties:
|
|
259
|
+
item_id:
|
|
260
|
+
type: string
|
|
261
|
+
description: "The item identifier to refund"
|
|
262
|
+
pattern: "^[A-Z0-9-]+$"
|
|
263
|
+
reason:
|
|
264
|
+
type: string
|
|
265
|
+
description: "Reason for the refund"
|
|
266
|
+
minLength: 10
|
|
267
|
+
maxLength: 500
|
|
268
|
+
required:
|
|
269
|
+
- item_id
|
|
270
|
+
- reason
|
|
271
|
+
output_schema:
|
|
272
|
+
type: object
|
|
273
|
+
properties:
|
|
274
|
+
refund_id:
|
|
275
|
+
type: string
|
|
276
|
+
description: "Generated refund identifier"
|
|
277
|
+
status:
|
|
278
|
+
type: string
|
|
279
|
+
enum: [processed, pending, rejected]
|
|
280
|
+
amount:
|
|
281
|
+
type: number
|
|
282
|
+
description: "Refund amount in USD"
|
|
283
|
+
message:
|
|
284
|
+
type: string
|
|
285
|
+
description: "Refund confirmation message"
|
|
286
|
+
|
|
287
|
+
# Handoffs back to sales or triage
|
|
288
|
+
handoffs:
|
|
289
|
+
- name: upsell_opportunity
|
|
290
|
+
target_agent: sales-agent
|
|
291
|
+
condition: "customer_wants_replacement == true"
|
|
292
|
+
trigger: automatic
|
|
293
|
+
|
|
294
|
+
- name: return_to_triage
|
|
295
|
+
target_agent: customer-service-triage
|
|
296
|
+
condition: "issue_resolved == false"
|
|
297
|
+
trigger: manual
|
|
298
|
+
|
|
299
|
+
# Compliance & Governance (NOT available in Swarm)
|
|
300
|
+
compliance:
|
|
301
|
+
data_retention:
|
|
302
|
+
policy: gdpr
|
|
303
|
+
retention_days: 90
|
|
304
|
+
audit_logging:
|
|
305
|
+
enabled: true
|
|
306
|
+
log_all_interactions: true
|
|
307
|
+
|
|
308
|
+
# Observability
|
|
309
|
+
observability:
|
|
310
|
+
metrics:
|
|
311
|
+
enabled: true
|
|
312
|
+
metrics:
|
|
313
|
+
- refunds_processed
|
|
314
|
+
- average_refund_amount
|
|
315
|
+
- customer_satisfaction_score
|
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
"""
|
|
2
|
+
OpenAI Swarm: Advanced Handoff Patterns
|
|
3
|
+
|
|
4
|
+
This example demonstrates various handoff patterns in OpenAI Swarm:
|
|
5
|
+
1. Conditional handoffs
|
|
6
|
+
2. Bidirectional handoffs (agents can transfer back and forth)
|
|
7
|
+
3. Context preservation across handoffs
|
|
8
|
+
4. Handoff with state changes
|
|
9
|
+
|
|
10
|
+
Swarm Documentation: https://github.com/openai/swarm
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
from swarm import Swarm, Agent
|
|
14
|
+
from typing import Dict, Any, Optional
|
|
15
|
+
|
|
16
|
+
# Initialize Swarm client
|
|
17
|
+
client = Swarm()
|
|
18
|
+
|
|
19
|
+
# ============================================================================
|
|
20
|
+
# Shared State (simulated database)
|
|
21
|
+
# ============================================================================
|
|
22
|
+
|
|
23
|
+
conversation_state = {
|
|
24
|
+
"order_id": None,
|
|
25
|
+
"customer_tier": "standard",
|
|
26
|
+
"issue_resolved": False,
|
|
27
|
+
"escalation_count": 0
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
# ============================================================================
|
|
31
|
+
# Transfer Functions with Context
|
|
32
|
+
# ============================================================================
|
|
33
|
+
|
|
34
|
+
def transfer_to_order_verification():
|
|
35
|
+
"""Transfer to order verification agent to validate order details."""
|
|
36
|
+
print("[HANDOFF] → Order Verification Agent")
|
|
37
|
+
return order_verification_agent
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def transfer_to_payment_processing():
|
|
41
|
+
"""Transfer to payment processing agent after order verification."""
|
|
42
|
+
print("[HANDOFF] → Payment Processing Agent")
|
|
43
|
+
return payment_processing_agent
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def transfer_to_fulfillment():
|
|
47
|
+
"""Transfer to fulfillment agent after payment is processed."""
|
|
48
|
+
print("[HANDOFF] → Fulfillment Agent")
|
|
49
|
+
return fulfillment_agent
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def transfer_to_supervisor():
|
|
53
|
+
"""Escalate to supervisor for complex issues."""
|
|
54
|
+
global conversation_state
|
|
55
|
+
conversation_state["escalation_count"] += 1
|
|
56
|
+
print(f"[ESCALATION] → Supervisor (Escalation #{conversation_state['escalation_count']})")
|
|
57
|
+
return supervisor_agent
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def transfer_back_to_sales():
|
|
61
|
+
"""Return customer to sales agent."""
|
|
62
|
+
print("[HANDOFF] ← Sales Agent")
|
|
63
|
+
return sales_agent
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
# ============================================================================
|
|
67
|
+
# Conditional Transfer Functions
|
|
68
|
+
# ============================================================================
|
|
69
|
+
|
|
70
|
+
def conditional_transfer_payment(context_variables: Dict[str, Any]):
|
|
71
|
+
"""
|
|
72
|
+
Conditionally transfer to payment based on order total.
|
|
73
|
+
High-value orders go to supervisor for approval.
|
|
74
|
+
"""
|
|
75
|
+
order_total = context_variables.get("order_total", 0)
|
|
76
|
+
|
|
77
|
+
if order_total > 10000:
|
|
78
|
+
print(f"[CONDITIONAL] High-value order (${order_total}) → Supervisor")
|
|
79
|
+
return supervisor_agent
|
|
80
|
+
else:
|
|
81
|
+
print(f"[CONDITIONAL] Standard order (${order_total}) → Payment Processing")
|
|
82
|
+
return payment_processing_agent
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
# ============================================================================
|
|
86
|
+
# Agent Functions
|
|
87
|
+
# ============================================================================
|
|
88
|
+
|
|
89
|
+
def verify_order(order_id: str, customer_id: str) -> str:
|
|
90
|
+
"""Verify order details and customer eligibility."""
|
|
91
|
+
global conversation_state
|
|
92
|
+
conversation_state["order_id"] = order_id
|
|
93
|
+
|
|
94
|
+
# Simulated verification
|
|
95
|
+
return f"Order {order_id} verified for customer {customer_id}. Ready for payment."
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def process_payment(payment_method: str, amount: float) -> str:
|
|
99
|
+
"""Process payment for the order."""
|
|
100
|
+
# Simulated payment processing
|
|
101
|
+
return f"Payment of ${amount:.2f} processed via {payment_method}. Transaction ID: TXN-{payment_method}-001"
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def schedule_fulfillment(order_id: str, delivery_address: str) -> str:
|
|
105
|
+
"""Schedule order fulfillment and delivery."""
|
|
106
|
+
# Simulated fulfillment
|
|
107
|
+
return f"Order {order_id} scheduled for delivery to {delivery_address}. Expected delivery: 3-5 business days."
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def approve_order(order_id: str, approval_note: str) -> str:
|
|
111
|
+
"""Supervisor approves high-value orders."""
|
|
112
|
+
return f"Order {order_id} approved by supervisor. Note: {approval_note}"
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
# ============================================================================
|
|
116
|
+
# Agent Definitions with Handoff Patterns
|
|
117
|
+
# ============================================================================
|
|
118
|
+
|
|
119
|
+
# Sales Agent - Entry point
|
|
120
|
+
sales_agent = Agent(
|
|
121
|
+
name="Sales Agent",
|
|
122
|
+
instructions="""You are a sales agent helping customers place orders.
|
|
123
|
+
|
|
124
|
+
When a customer wants to order:
|
|
125
|
+
1. Collect order details (items, quantities)
|
|
126
|
+
2. Calculate order total
|
|
127
|
+
3. Transfer to Order Verification Agent to validate the order
|
|
128
|
+
|
|
129
|
+
Be friendly and helpful!""",
|
|
130
|
+
functions=[transfer_to_order_verification]
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
# Order Verification Agent
|
|
134
|
+
order_verification_agent = Agent(
|
|
135
|
+
name="Order Verification Agent",
|
|
136
|
+
instructions="""You verify order details and customer eligibility.
|
|
137
|
+
|
|
138
|
+
Process:
|
|
139
|
+
1. Verify the order details provided by the customer
|
|
140
|
+
2. Check customer eligibility
|
|
141
|
+
3. Transfer to Payment Processing Agent when verification is complete
|
|
142
|
+
|
|
143
|
+
If there are issues with the order, transfer back to Sales Agent.""",
|
|
144
|
+
functions=[verify_order, transfer_to_payment_processing, transfer_back_to_sales]
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
# Payment Processing Agent
|
|
148
|
+
payment_processing_agent = Agent(
|
|
149
|
+
name="Payment Processing Agent",
|
|
150
|
+
instructions="""You handle payment processing for orders.
|
|
151
|
+
|
|
152
|
+
Process:
|
|
153
|
+
1. Collect payment information
|
|
154
|
+
2. Process the payment securely
|
|
155
|
+
3. Transfer to Fulfillment Agent when payment is successful
|
|
156
|
+
|
|
157
|
+
For high-value orders (>$10,000), escalate to Supervisor for approval first.
|
|
158
|
+
If payment fails, transfer back to Sales Agent.""",
|
|
159
|
+
functions=[process_payment, transfer_to_fulfillment, transfer_to_supervisor, transfer_back_to_sales]
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
# Fulfillment Agent
|
|
163
|
+
fulfillment_agent = Agent(
|
|
164
|
+
name="Fulfillment Agent",
|
|
165
|
+
instructions="""You handle order fulfillment and delivery.
|
|
166
|
+
|
|
167
|
+
Process:
|
|
168
|
+
1. Schedule order fulfillment
|
|
169
|
+
2. Arrange delivery
|
|
170
|
+
3. Provide tracking information
|
|
171
|
+
|
|
172
|
+
Mark the issue as resolved when delivery is scheduled.""",
|
|
173
|
+
functions=[schedule_fulfillment, transfer_back_to_sales]
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
# Supervisor Agent - Handles escalations
|
|
177
|
+
supervisor_agent = Agent(
|
|
178
|
+
name="Supervisor Agent",
|
|
179
|
+
instructions="""You are a supervisor handling escalated cases.
|
|
180
|
+
|
|
181
|
+
Your role:
|
|
182
|
+
1. Review escalated orders (especially high-value ones)
|
|
183
|
+
2. Approve or modify orders as needed
|
|
184
|
+
3. Resolve complex customer issues
|
|
185
|
+
|
|
186
|
+
You can transfer to any other agent as needed.""",
|
|
187
|
+
functions=[
|
|
188
|
+
approve_order,
|
|
189
|
+
transfer_to_payment_processing,
|
|
190
|
+
transfer_to_fulfillment,
|
|
191
|
+
transfer_back_to_sales
|
|
192
|
+
]
|
|
193
|
+
)
|
|
194
|
+
|
|
195
|
+
# ============================================================================
|
|
196
|
+
# Usage Examples
|
|
197
|
+
# ============================================================================
|
|
198
|
+
|
|
199
|
+
def example_simple_handoff():
|
|
200
|
+
"""Example 1: Simple linear handoff flow."""
|
|
201
|
+
print("\n" + "=" * 80)
|
|
202
|
+
print("Example 1: Simple Handoff Flow (Sales → Verification → Payment → Fulfillment)")
|
|
203
|
+
print("=" * 80)
|
|
204
|
+
|
|
205
|
+
messages = [
|
|
206
|
+
{"role": "user", "content": "I want to order 2 premium widgets for $500 total"}
|
|
207
|
+
]
|
|
208
|
+
|
|
209
|
+
context_variables = {
|
|
210
|
+
"customer_id": "CUST123",
|
|
211
|
+
"customer_tier": "premium",
|
|
212
|
+
"order_total": 500
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
# Start with sales agent
|
|
216
|
+
response = client.run(
|
|
217
|
+
agent=sales_agent,
|
|
218
|
+
messages=messages,
|
|
219
|
+
context_variables=context_variables
|
|
220
|
+
)
|
|
221
|
+
|
|
222
|
+
print(f"Current Agent: {response.agent.name}")
|
|
223
|
+
print(f"Response: {response.messages[-1]['content']}")
|
|
224
|
+
|
|
225
|
+
# Continue to verification
|
|
226
|
+
messages = response.messages
|
|
227
|
+
messages.append({"role": "user", "content": "Yes, verify the order please"})
|
|
228
|
+
|
|
229
|
+
response = client.run(
|
|
230
|
+
agent=response.agent,
|
|
231
|
+
messages=messages,
|
|
232
|
+
context_variables=context_variables
|
|
233
|
+
)
|
|
234
|
+
|
|
235
|
+
print(f"Current Agent: {response.agent.name}")
|
|
236
|
+
print(f"Response: {response.messages[-1]['content']}")
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
def example_conditional_handoff():
|
|
240
|
+
"""Example 2: Conditional handoff based on order value."""
|
|
241
|
+
print("\n" + "=" * 80)
|
|
242
|
+
print("Example 2: Conditional Handoff (High-Value Order → Supervisor)")
|
|
243
|
+
print("=" * 80)
|
|
244
|
+
|
|
245
|
+
messages = [
|
|
246
|
+
{"role": "user", "content": "I want to place a large enterprise order worth $15,000"}
|
|
247
|
+
]
|
|
248
|
+
|
|
249
|
+
context_variables = {
|
|
250
|
+
"customer_id": "CUST456",
|
|
251
|
+
"customer_tier": "enterprise",
|
|
252
|
+
"order_total": 15000
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
response = client.run(
|
|
256
|
+
agent=sales_agent,
|
|
257
|
+
messages=messages,
|
|
258
|
+
context_variables=context_variables
|
|
259
|
+
)
|
|
260
|
+
|
|
261
|
+
print(f"Current Agent: {response.agent.name}")
|
|
262
|
+
print(f"Context: {context_variables}")
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
def example_bidirectional_handoff():
|
|
266
|
+
"""Example 3: Bidirectional handoff (agent can go back)."""
|
|
267
|
+
print("\n" + "=" * 80)
|
|
268
|
+
print("Example 3: Bidirectional Handoff (Payment fails → Back to Sales)")
|
|
269
|
+
print("=" * 80)
|
|
270
|
+
|
|
271
|
+
messages = [
|
|
272
|
+
{"role": "user", "content": "My payment failed, what should I do?"}
|
|
273
|
+
]
|
|
274
|
+
|
|
275
|
+
context_variables = {
|
|
276
|
+
"customer_id": "CUST789",
|
|
277
|
+
"payment_failed": True
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
# Start at payment processing agent
|
|
281
|
+
response = client.run(
|
|
282
|
+
agent=payment_processing_agent,
|
|
283
|
+
messages=messages,
|
|
284
|
+
context_variables=context_variables
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
print(f"Current Agent: {response.agent.name}")
|
|
288
|
+
print(f"Response: {response.messages[-1]['content']}")
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
def example_context_preservation():
|
|
292
|
+
"""Example 4: Context preservation across handoffs."""
|
|
293
|
+
print("\n" + "=" * 80)
|
|
294
|
+
print("Example 4: Context Preservation Across Handoffs")
|
|
295
|
+
print("=" * 80)
|
|
296
|
+
|
|
297
|
+
initial_context = {
|
|
298
|
+
"customer_id": "CUST999",
|
|
299
|
+
"customer_tier": "premium",
|
|
300
|
+
"order_total": 750,
|
|
301
|
+
"order_items": ["widget-pro", "widget-plus"],
|
|
302
|
+
"delivery_address": "123 Main St, City, State 12345"
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
messages = [
|
|
306
|
+
{"role": "user", "content": "I'm ready to complete my order"}
|
|
307
|
+
]
|
|
308
|
+
|
|
309
|
+
response = client.run(
|
|
310
|
+
agent=sales_agent,
|
|
311
|
+
messages=messages,
|
|
312
|
+
context_variables=initial_context
|
|
313
|
+
)
|
|
314
|
+
|
|
315
|
+
print(f"Initial Context: {initial_context}")
|
|
316
|
+
print(f"Current Agent: {response.agent.name}")
|
|
317
|
+
print("Context is automatically preserved across all handoffs!")
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
# ============================================================================
|
|
321
|
+
# Swarm Handoff Limitations
|
|
322
|
+
# ============================================================================
|
|
323
|
+
|
|
324
|
+
def demonstrate_limitations():
|
|
325
|
+
"""Demonstrate limitations of Swarm's handoff system."""
|
|
326
|
+
print("\n" + "=" * 80)
|
|
327
|
+
print("Swarm Handoff Limitations")
|
|
328
|
+
print("=" * 80)
|
|
329
|
+
|
|
330
|
+
limitations = [
|
|
331
|
+
"1. NO DECLARATIVE HANDOFF RULES: Handoffs are coded in functions, not declared",
|
|
332
|
+
"2. NO CONDITIONAL SYNTAX: Must write Python code for conditions",
|
|
333
|
+
"3. NO HANDOFF OBSERVABILITY: Can't track handoff metrics or patterns",
|
|
334
|
+
"4. NO HANDOFF POLICIES: Can't enforce rules like 'max 3 handoffs'",
|
|
335
|
+
"5. MANUAL CONTEXT MANAGEMENT: Must manually pass context_variables",
|
|
336
|
+
"6. NO HANDOFF APPROVAL: Can't require approval for certain handoffs",
|
|
337
|
+
"7. NO HANDOFF ROLLBACK: Can't undo a handoff if it was wrong",
|
|
338
|
+
"8. HARD TO TEST: Handoff logic scattered across functions",
|
|
339
|
+
]
|
|
340
|
+
|
|
341
|
+
for limitation in limitations:
|
|
342
|
+
print(f" ❌ {limitation}")
|
|
343
|
+
|
|
344
|
+
print("\n ✓ OSSA solves ALL of these with declarative handoff configuration!")
|
|
345
|
+
print(" See after-handoffs.ossa.yaml for the solution.")
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
# ============================================================================
|
|
349
|
+
# Main
|
|
350
|
+
# ============================================================================
|
|
351
|
+
|
|
352
|
+
if __name__ == "__main__":
|
|
353
|
+
print("OpenAI Swarm - Advanced Handoff Patterns")
|
|
354
|
+
print("=" * 80)
|
|
355
|
+
|
|
356
|
+
# Run examples
|
|
357
|
+
example_simple_handoff()
|
|
358
|
+
example_conditional_handoff()
|
|
359
|
+
example_bidirectional_handoff()
|
|
360
|
+
example_context_preservation()
|
|
361
|
+
demonstrate_limitations()
|
|
362
|
+
|
|
363
|
+
print("\n" + "=" * 80)
|
|
364
|
+
print("Migration to OSSA")
|
|
365
|
+
print("=" * 80)
|
|
366
|
+
print("See after-handoffs.ossa.yaml for declarative handoff configuration.")
|
|
367
|
+
print("\nOSSA Benefits:")
|
|
368
|
+
print(" ✓ Declarative handoff rules (YAML, not code)")
|
|
369
|
+
print(" ✓ Conditional handoffs with expression syntax")
|
|
370
|
+
print(" ✓ Automatic context propagation (no manual passing)")
|
|
371
|
+
print(" ✓ Handoff observability (metrics, tracing, logging)")
|
|
372
|
+
print(" ✓ Handoff policies (max handoffs, approval rules)")
|
|
373
|
+
print(" ✓ Easy testing and validation")
|