@bluefly/openstandardagents 0.4.0 → 0.4.1
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/CHANGELOG.md +117 -0
- package/DEMO.md +212 -0
- package/README.md +75 -15
- package/dist/adapters/drupal/generator.d.ts +149 -0
- package/dist/adapters/drupal/generator.d.ts.map +1 -0
- package/dist/adapters/drupal/generator.js +1760 -0
- package/dist/adapters/drupal/generator.js.map +1 -0
- package/dist/adapters/drupal/index.d.ts +2 -0
- package/dist/adapters/drupal/index.d.ts.map +1 -1
- package/dist/adapters/drupal/index.js +3 -0
- package/dist/adapters/drupal/index.js.map +1 -1
- package/dist/adapters/npm/adapter.js +2 -2
- package/dist/adapters/npm/converter.js +3 -3
- package/dist/cli/banner.d.ts +21 -0
- package/dist/cli/banner.d.ts.map +1 -0
- package/dist/cli/banner.js +128 -0
- package/dist/cli/banner.js.map +1 -0
- package/dist/cli/commands/dev.command.d.ts +20 -0
- package/dist/cli/commands/dev.command.d.ts.map +1 -0
- package/dist/cli/commands/dev.command.js +78 -0
- package/dist/cli/commands/dev.command.js.map +1 -0
- package/dist/cli/commands/estimate.command.d.ts +12 -0
- package/dist/cli/commands/estimate.command.d.ts.map +1 -0
- package/dist/cli/commands/estimate.command.js +226 -0
- package/dist/cli/commands/estimate.command.js.map +1 -0
- package/dist/cli/commands/export-enhanced.command.d.ts +7 -0
- package/dist/cli/commands/export-enhanced.command.d.ts.map +1 -0
- package/dist/cli/commands/{export-v2.command.js → export-enhanced.command.js} +3 -3
- package/dist/cli/commands/export-enhanced.command.js.map +1 -0
- package/dist/cli/commands/export.command.d.ts.map +1 -1
- package/dist/cli/commands/export.command.js +82 -4
- package/dist/cli/commands/export.command.js.map +1 -1
- package/dist/cli/commands/init.command.d.ts.map +1 -1
- package/dist/cli/commands/init.command.js +2 -0
- package/dist/cli/commands/init.command.js.map +1 -1
- package/dist/cli/commands/test.command.d.ts +1 -0
- package/dist/cli/commands/test.command.d.ts.map +1 -1
- package/dist/cli/commands/test.command.js +172 -105
- package/dist/cli/commands/test.command.js.map +1 -1
- package/dist/cli/commands/types/wizard-config.types.d.ts +59 -0
- package/dist/cli/commands/types/wizard-config.types.d.ts.map +1 -0
- package/dist/cli/commands/types/wizard-config.types.js +34 -0
- package/dist/cli/commands/types/wizard-config.types.js.map +1 -0
- package/dist/cli/commands/upgrade.command.d.ts +9 -0
- package/dist/cli/commands/upgrade.command.d.ts.map +1 -0
- package/dist/cli/commands/upgrade.command.js +167 -0
- package/dist/cli/commands/upgrade.command.js.map +1 -0
- package/dist/cli/commands/wizard-api-first.command.d.ts +18 -0
- package/dist/cli/commands/wizard-api-first.command.d.ts.map +1 -0
- package/dist/cli/commands/wizard-api-first.command.js +854 -0
- package/dist/cli/commands/wizard-api-first.command.js.map +1 -0
- package/dist/cli/commands/wizard-interactive.command.d.ts +25 -0
- package/dist/cli/commands/wizard-interactive.command.d.ts.map +1 -0
- package/dist/cli/commands/wizard-interactive.command.js +1875 -0
- package/dist/cli/commands/wizard-interactive.command.js.map +1 -0
- package/dist/cli/commands/workspace.command.js +1 -1
- package/dist/cli/commands/workspace.command.js.map +1 -1
- package/dist/cli/index.js +9 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/schema-driven/index.d.ts +27 -0
- package/dist/cli/schema-driven/index.d.ts.map +1 -0
- package/dist/cli/schema-driven/index.js +34 -0
- package/dist/cli/schema-driven/index.js.map +1 -0
- package/dist/cli/schema-driven/schema-loader.d.ts +115 -0
- package/dist/cli/schema-driven/schema-loader.d.ts.map +1 -0
- package/dist/cli/schema-driven/schema-loader.js +270 -0
- package/dist/cli/schema-driven/schema-loader.js.map +1 -0
- package/dist/cli/schema-driven/ui-generator.d.ts +88 -0
- package/dist/cli/schema-driven/ui-generator.d.ts.map +1 -0
- package/dist/cli/schema-driven/ui-generator.js +326 -0
- package/dist/cli/schema-driven/ui-generator.js.map +1 -0
- package/dist/cli/wizard/interactive-wizard.d.ts +26 -0
- package/dist/cli/wizard/interactive-wizard.d.ts.map +1 -0
- package/dist/cli/wizard/interactive-wizard.js +296 -0
- package/dist/cli/wizard/interactive-wizard.js.map +1 -0
- package/dist/cli/wizard/template-catalog.d.ts +32 -0
- package/dist/cli/wizard/template-catalog.d.ts.map +1 -0
- package/dist/cli/wizard/template-catalog.js +99 -0
- package/dist/cli/wizard/template-catalog.js.map +1 -0
- package/dist/cli/wizard/use-cases.d.ts +37 -0
- package/dist/cli/wizard/use-cases.d.ts.map +1 -0
- package/dist/cli/wizard/use-cases.js +157 -0
- package/dist/cli/wizard/use-cases.js.map +1 -0
- package/dist/di-container.d.ts.map +1 -1
- package/dist/di-container.js +2 -0
- package/dist/di-container.js.map +1 -1
- package/dist/package.json +19 -9
- package/dist/runtime/agent-runner.d.ts +46 -0
- package/dist/runtime/agent-runner.d.ts.map +1 -0
- package/dist/runtime/agent-runner.js +346 -0
- package/dist/runtime/agent-runner.js.map +1 -0
- package/dist/sdks/kagent/crd-generator.d.ts +4 -0
- package/dist/sdks/kagent/crd-generator.d.ts.map +1 -1
- package/dist/sdks/kagent/crd-generator.js +83 -2
- package/dist/sdks/kagent/crd-generator.js.map +1 -1
- package/dist/sdks/kagent/k8s-resources-generator.d.ts +73 -0
- package/dist/sdks/kagent/k8s-resources-generator.d.ts.map +1 -0
- package/dist/sdks/kagent/k8s-resources-generator.js +286 -0
- package/dist/sdks/kagent/k8s-resources-generator.js.map +1 -0
- package/dist/sdks/kagent/types.d.ts +79 -0
- package/dist/sdks/kagent/types.d.ts.map +1 -1
- package/dist/sdks/shared/validation.d.ts +2 -2
- package/dist/services/cost-estimation/optimization-patterns.d.ts +23 -0
- package/dist/services/cost-estimation/optimization-patterns.d.ts.map +1 -0
- package/dist/services/cost-estimation/optimization-patterns.js +147 -0
- package/dist/services/cost-estimation/optimization-patterns.js.map +1 -0
- package/dist/services/cost-estimation/pricing.d.ts +29 -0
- package/dist/services/cost-estimation/pricing.d.ts.map +1 -0
- package/dist/services/cost-estimation/pricing.js +225 -0
- package/dist/services/cost-estimation/pricing.js.map +1 -0
- package/dist/services/cost-estimation/scenario-estimator.d.ts +59 -0
- package/dist/services/cost-estimation/scenario-estimator.d.ts.map +1 -0
- package/dist/services/cost-estimation/scenario-estimator.js +145 -0
- package/dist/services/cost-estimation/scenario-estimator.js.map +1 -0
- package/dist/services/cost-estimation/token-counter.service.d.ts +51 -0
- package/dist/services/cost-estimation/token-counter.service.d.ts.map +1 -0
- package/dist/services/cost-estimation/token-counter.service.js +125 -0
- package/dist/services/cost-estimation/token-counter.service.js.map +1 -0
- package/dist/services/dev-server/dev-server.service.d.ts +121 -0
- package/dist/services/dev-server/dev-server.service.d.ts.map +1 -0
- package/dist/services/dev-server/dev-server.service.js +290 -0
- package/dist/services/dev-server/dev-server.service.js.map +1 -0
- package/dist/services/dev-server/file-watcher.d.ts +101 -0
- package/dist/services/dev-server/file-watcher.d.ts.map +1 -0
- package/dist/services/dev-server/file-watcher.js +190 -0
- package/dist/services/dev-server/file-watcher.js.map +1 -0
- package/dist/services/dev-server/live-validator.d.ts +157 -0
- package/dist/services/dev-server/live-validator.d.ts.map +1 -0
- package/dist/services/dev-server/live-validator.js +301 -0
- package/dist/services/dev-server/live-validator.js.map +1 -0
- package/dist/services/dev-server/websocket-server.d.ts +137 -0
- package/dist/services/dev-server/websocket-server.d.ts.map +1 -0
- package/dist/services/dev-server/websocket-server.js +229 -0
- package/dist/services/dev-server/websocket-server.js.map +1 -0
- package/dist/services/export/anthropic/anthropic-exporter.d.ts +70 -0
- package/dist/services/export/anthropic/anthropic-exporter.d.ts.map +1 -0
- package/dist/services/export/anthropic/anthropic-exporter.js +576 -0
- package/dist/services/export/anthropic/anthropic-exporter.js.map +1 -0
- package/dist/services/export/anthropic/api-generator.d.ts +39 -0
- package/dist/services/export/anthropic/api-generator.d.ts.map +1 -0
- package/dist/services/export/anthropic/api-generator.js +395 -0
- package/dist/services/export/anthropic/api-generator.js.map +1 -0
- package/dist/services/export/anthropic/index.d.ts +18 -0
- package/dist/services/export/anthropic/index.d.ts.map +1 -0
- package/dist/services/export/anthropic/index.js +16 -0
- package/dist/services/export/anthropic/index.js.map +1 -0
- package/dist/services/export/anthropic/tools-generator.d.ts +35 -0
- package/dist/services/export/anthropic/tools-generator.d.ts.map +1 -0
- package/dist/services/export/anthropic/tools-generator.js +260 -0
- package/dist/services/export/anthropic/tools-generator.js.map +1 -0
- package/dist/services/export/langchain/api-generator.d.ts +17 -0
- package/dist/services/export/langchain/api-generator.d.ts.map +1 -0
- package/dist/services/export/langchain/api-generator.js +375 -0
- package/dist/services/export/langchain/api-generator.js.map +1 -0
- package/dist/services/export/langchain/callbacks-generator.d.ts +63 -0
- package/dist/services/export/langchain/callbacks-generator.d.ts.map +1 -0
- package/dist/services/export/langchain/callbacks-generator.js +408 -0
- package/dist/services/export/langchain/callbacks-generator.js.map +1 -0
- package/dist/services/export/langchain/error-handling-generator.d.ts +76 -0
- package/dist/services/export/langchain/error-handling-generator.d.ts.map +1 -0
- package/dist/services/export/langchain/error-handling-generator.js +522 -0
- package/dist/services/export/langchain/error-handling-generator.js.map +1 -0
- package/dist/services/export/langchain/index.d.ts +17 -0
- package/dist/services/export/langchain/index.d.ts.map +1 -0
- package/dist/services/export/langchain/index.js +13 -0
- package/dist/services/export/langchain/index.js.map +1 -0
- package/dist/services/export/langchain/langchain-exporter.d.ts +174 -0
- package/dist/services/export/langchain/langchain-exporter.d.ts.map +1 -0
- package/dist/services/export/langchain/langchain-exporter.js +953 -0
- package/dist/services/export/langchain/langchain-exporter.js.map +1 -0
- package/dist/services/export/langchain/langgraph-generator.d.ts +86 -0
- package/dist/services/export/langchain/langgraph-generator.d.ts.map +1 -0
- package/dist/services/export/langchain/langgraph-generator.js +473 -0
- package/dist/services/export/langchain/langgraph-generator.js.map +1 -0
- package/dist/services/export/langchain/langserve-generator.d.ts +95 -0
- package/dist/services/export/langchain/langserve-generator.d.ts.map +1 -0
- package/dist/services/export/langchain/langserve-generator.js +807 -0
- package/dist/services/export/langchain/langserve-generator.js.map +1 -0
- package/dist/services/export/langchain/memory-generator.d.ts +71 -0
- package/dist/services/export/langchain/memory-generator.d.ts.map +1 -0
- package/dist/services/export/langchain/memory-generator.js +1182 -0
- package/dist/services/export/langchain/memory-generator.js.map +1 -0
- package/dist/services/export/langchain/openapi-generator.d.ts +20 -0
- package/dist/services/export/langchain/openapi-generator.d.ts.map +1 -0
- package/dist/services/export/langchain/openapi-generator.js +364 -0
- package/dist/services/export/langchain/openapi-generator.js.map +1 -0
- package/dist/services/export/langchain/plan-execute-generator.d.ts +60 -0
- package/dist/services/export/langchain/plan-execute-generator.d.ts.map +1 -0
- package/dist/services/export/langchain/plan-execute-generator.js +679 -0
- package/dist/services/export/langchain/plan-execute-generator.js.map +1 -0
- package/dist/services/export/langchain/streaming-generator.d.ts +66 -0
- package/dist/services/export/langchain/streaming-generator.d.ts.map +1 -0
- package/dist/services/export/langchain/streaming-generator.js +749 -0
- package/dist/services/export/langchain/streaming-generator.js.map +1 -0
- package/dist/services/export/langchain/tools-generator.d.ts +67 -0
- package/dist/services/export/langchain/tools-generator.d.ts.map +1 -0
- package/dist/services/export/langchain/tools-generator.js +543 -0
- package/dist/services/export/langchain/tools-generator.js.map +1 -0
- package/dist/services/export/npm/express-generator.d.ts +23 -0
- package/dist/services/export/npm/express-generator.d.ts.map +1 -0
- package/dist/services/export/npm/express-generator.js +296 -0
- package/dist/services/export/npm/express-generator.js.map +1 -0
- package/dist/services/export/npm/index.d.ts +13 -0
- package/dist/services/export/npm/index.d.ts.map +1 -0
- package/dist/services/export/npm/index.js +11 -0
- package/dist/services/export/npm/index.js.map +1 -0
- package/dist/services/export/npm/npm-exporter.d.ts +142 -0
- package/dist/services/export/npm/npm-exporter.d.ts.map +1 -0
- package/dist/services/export/npm/npm-exporter.js +480 -0
- package/dist/services/export/npm/npm-exporter.js.map +1 -0
- package/dist/services/export/npm/openapi-generator.d.ts +19 -0
- package/dist/services/export/npm/openapi-generator.d.ts.map +1 -0
- package/dist/services/export/npm/openapi-generator.js +428 -0
- package/dist/services/export/npm/openapi-generator.js.map +1 -0
- package/dist/services/export/npm/package-json-generator.d.ts +31 -0
- package/dist/services/export/npm/package-json-generator.d.ts.map +1 -0
- package/dist/services/export/npm/package-json-generator.js +153 -0
- package/dist/services/export/npm/package-json-generator.js.map +1 -0
- package/dist/services/export/npm/typescript-generator.d.ts +69 -0
- package/dist/services/export/npm/typescript-generator.d.ts.map +1 -0
- package/dist/services/export/npm/typescript-generator.js +437 -0
- package/dist/services/export/npm/typescript-generator.js.map +1 -0
- package/dist/services/export/testing/index.d.ts +8 -0
- package/dist/services/export/testing/index.d.ts.map +1 -0
- package/dist/services/export/testing/index.js +7 -0
- package/dist/services/export/testing/index.js.map +1 -0
- package/dist/services/export/testing/test-generator.d.ts +178 -0
- package/dist/services/export/testing/test-generator.d.ts.map +1 -0
- package/dist/services/export/testing/test-generator.js +2542 -0
- package/dist/services/export/testing/test-generator.js.map +1 -0
- package/dist/services/test-runner/mock-llm.service.d.ts +77 -0
- package/dist/services/test-runner/mock-llm.service.d.ts.map +1 -0
- package/dist/services/test-runner/mock-llm.service.js +173 -0
- package/dist/services/test-runner/mock-llm.service.js.map +1 -0
- package/dist/services/test-runner/scenarios.d.ts +36 -0
- package/dist/services/test-runner/scenarios.d.ts.map +1 -0
- package/dist/services/test-runner/scenarios.js +196 -0
- package/dist/services/test-runner/scenarios.js.map +1 -0
- package/dist/services/test-runner/test-runner.service.d.ts +19 -1
- package/dist/services/test-runner/test-runner.service.d.ts.map +1 -1
- package/dist/services/test-runner/test-runner.service.js +72 -6
- package/dist/services/test-runner/test-runner.service.js.map +1 -1
- package/dist/services/validation/best-practices-validator.d.ts +84 -0
- package/dist/services/validation/best-practices-validator.d.ts.map +1 -0
- package/dist/services/validation/best-practices-validator.js +499 -0
- package/dist/services/validation/best-practices-validator.js.map +1 -0
- package/dist/services/validation/cost-estimator.d.ts +69 -0
- package/dist/services/validation/cost-estimator.d.ts.map +1 -0
- package/dist/services/validation/cost-estimator.js +221 -0
- package/dist/services/validation/cost-estimator.js.map +1 -0
- package/dist/services/validation/enhanced-validator.d.ts +78 -0
- package/dist/services/validation/enhanced-validator.d.ts.map +1 -0
- package/dist/services/validation/enhanced-validator.js +212 -0
- package/dist/services/validation/enhanced-validator.js.map +1 -0
- package/dist/services/validation/index.d.ts +13 -0
- package/dist/services/validation/index.d.ts.map +1 -0
- package/dist/services/validation/index.js +9 -0
- package/dist/services/validation/index.js.map +1 -0
- package/dist/services/validation/security-validator.d.ts +81 -0
- package/dist/services/validation/security-validator.d.ts.map +1 -0
- package/dist/services/validation/security-validator.js +328 -0
- package/dist/services/validation/security-validator.js.map +1 -0
- package/dist/services/wizard/prompts.d.ts +71 -0
- package/dist/services/wizard/prompts.d.ts.map +1 -0
- package/dist/services/wizard/prompts.js +322 -0
- package/dist/services/wizard/prompts.js.map +1 -0
- package/dist/services/wizard/wizard.service.d.ts +60 -0
- package/dist/services/wizard/wizard.service.d.ts.map +1 -0
- package/dist/services/wizard/wizard.service.js +261 -0
- package/dist/services/wizard/wizard.service.js.map +1 -0
- package/dist/types/personality.zod.d.ts +23 -23
- package/dist/utils/version.d.ts +1 -1
- package/dist/utils/version.js +1 -1
- package/dist/version-management/core/version-manager.test.js.map +1 -1
- package/dist/version.d.ts +62 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +73 -0
- package/dist/version.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/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 +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/sample-compliant-agent.yaml +1 -1
- package/examples/agent-manifests/workers/worker-agent.yaml +1 -1
- package/examples/agents/01-customer-support-bot/.env.example +32 -0
- package/examples/agents/01-customer-support-bot/Dockerfile +30 -0
- package/examples/agents/01-customer-support-bot/README.md +295 -0
- package/examples/agents/01-customer-support-bot/agent.ossa.yaml +172 -0
- package/examples/agents/01-customer-support-bot/docker-compose.yml +55 -0
- package/examples/agents/01-customer-support-bot/openapi.yaml +238 -0
- package/examples/agents/01-customer-support-bot/package.json +48 -0
- package/examples/agents/02-code-review-agent/README.md +72 -0
- package/examples/agents/02-code-review-agent/agent.ossa.yaml +239 -0
- package/examples/agents/02-code-review-agent/docker-compose.yml +22 -0
- package/examples/agents/02-code-review-agent/openapi.yaml +150 -0
- package/examples/agents/03-data-analysis-agent/README.md +51 -0
- package/examples/agents/03-data-analysis-agent/agent.ossa.yaml +97 -0
- package/examples/agents/03-data-analysis-agent/openapi.yaml +74 -0
- package/examples/agents/04-content-moderator/README.md +55 -0
- package/examples/agents/04-content-moderator/agent.ossa.yaml +131 -0
- package/examples/agents/04-content-moderator/openapi.yaml +50 -0
- package/examples/agents/05-sales-assistant/README.md +37 -0
- package/examples/agents/05-sales-assistant/agent.ossa.yaml +146 -0
- package/examples/agents/05-sales-assistant/openapi.yaml +59 -0
- package/examples/agents/06-devops-agent/README.md +39 -0
- package/examples/agents/06-devops-agent/agent.ossa.yaml +141 -0
- package/examples/agents/06-devops-agent/openapi.yaml +51 -0
- package/examples/agents/07-research-assistant/README.md +31 -0
- package/examples/agents/07-research-assistant/agent.ossa.yaml +119 -0
- package/examples/agents/07-research-assistant/openapi.yaml +56 -0
- package/examples/agents/08-email-triage-agent/README.md +33 -0
- package/examples/agents/08-email-triage-agent/agent.ossa.yaml +133 -0
- package/examples/agents/08-email-triage-agent/openapi.yaml +41 -0
- package/examples/agents/09-security-scanner/README.md +49 -0
- package/examples/agents/09-security-scanner/agent.ossa.yaml +174 -0
- package/examples/agents/09-security-scanner/openapi.yaml +46 -0
- package/examples/agents/10-meeting-assistant/README.md +53 -0
- package/examples/agents/10-meeting-assistant/agent.ossa.yaml +211 -0
- package/examples/agents/10-meeting-assistant/docker-compose.yml +27 -0
- package/examples/agents/10-meeting-assistant/openapi.yaml +131 -0
- package/examples/agents/COMPLETION_REPORT.txt +272 -0
- package/examples/agents/INDEX.md +296 -0
- package/examples/agents/README.md +452 -0
- package/examples/agents/SUMMARY.md +362 -0
- package/examples/agents/TEST_RESULTS.md +458 -0
- 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/code-agent.ossa.json +1 -1
- package/examples/agents-md/monorepo-agent.ossa.yaml +1 -1
- package/examples/anthropic/claude-assistant.ossa.json +1 -1
- package/examples/autogen/multi-agent.ossa.json +1 -1
- package/examples/autonomous-evolution/self-evolving-agent.ossa.yaml +1 -1
- package/examples/build-once-use-everywhere/agent.ossa.yaml +1 -1
- package/examples/claude-code/code-reviewer.ossa.yaml +1 -1
- package/examples/claude-code/ossa-validator.ossa.yaml +1 -1
- package/examples/common_npm/agent-router.ossa.yaml +2 -2
- package/examples/contracts/data-consumer.ossa.yaml +1 -1
- package/examples/contracts/data-producer-v2.ossa.yaml +1 -1
- package/examples/contracts/data-producer.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/QUICKSTART.md +439 -0
- package/examples/drupal/ai_agents_ossa-module/.agents/example-agent/agent.ossa.yaml +1 -1
- package/examples/drupal/content-moderator.ossa.yaml +107 -0
- package/examples/drupal/gitlab-ml-recommender.ossa.yaml +2 -2
- package/examples/economics/marketplace-agent.ossa.json +1 -1
- package/examples/export/langchain/production-agent-with-memory/README.md +373 -0
- package/examples/export/langchain/production-agent-with-memory/agent.ossa.yaml +97 -0
- package/examples/export/langchain/production-agent-with-streaming/README.md +617 -0
- package/examples/export/langchain/production-agent-with-streaming/agent.ossa.yaml +100 -0
- package/examples/export/langchain/production-agent-with-streaming/client-example.py +263 -0
- package/examples/export/langchain/production-agent-with-tools/README.md +296 -0
- package/examples/export/langchain/production-agent-with-tools/agent.ossa.yaml +216 -0
- package/examples/export/langchain-export-example.ts +246 -0
- package/examples/export/langserve-export-example.ts +246 -0
- package/examples/export/test-generation-example.ts +457 -0
- package/examples/extensions/agents-md-advanced.yml +1 -1
- package/examples/extensions/agents-md-basic.yml +1 -1
- package/examples/extensions/agents-md-sync.yml +1 -1
- package/examples/extensions/agents-md-v1.yml +1 -1
- package/examples/extensions/drupal-v1.yml +1 -1
- package/examples/extensions/encryption-multi-provider.yaml +4 -4
- package/examples/extensions/kagent-v1.yml +1 -1
- package/examples/extensions/knowledge-sources.yaml +1 -1
- package/examples/extensions/mcp-full-featured.yaml +1 -1
- package/examples/genetics/breeding-agent.ossa.json +1 -1
- 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 +2 -2
- 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/lifecycle/mentoring-agent.ossa.json +1 -1
- package/examples/llamaindex/rag-agent.ossa.json +1 -1
- 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/langchain/01-python-react-agent-after.ossa.yaml +1 -1
- package/examples/migrations/langchain/02-typescript-conversational-after.ossa.yaml +1 -1
- package/examples/migrations/langchain/03-sequential-chain-after.ossa.yaml +1 -1
- package/examples/migrations/langchain/04-config-based-after.ossa.yaml +1 -1
- package/examples/migrations/swarm-to-ossa/after-handoffs.ossa.yaml +6 -6
- package/examples/migrations/swarm-to-ossa/after-triage-agent.ossa.yaml +3 -3
- 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-agent-research-workflow.ossa.yaml +133 -0
- package/examples/multi-platform/single-manifest/agent.ossa.yaml +1 -1
- package/examples/npm-export-example.ts +150 -0
- package/examples/observability/activity-stream-full.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/ossa-templates/01-code-assistant.ossa.yaml +1 -1
- package/examples/ossa-templates/02-security-scanner.ossa.yaml +1 -1
- package/examples/ossa-templates/03-ci-pipeline.ossa.yaml +1 -1
- package/examples/ossa-templates/04-code-reviewer.ossa.yaml +1 -1
- package/examples/ossa-templates/05-doc-generator.ossa.yaml +1 -1
- package/examples/ossa-templates/06-compliance-validator.ossa.yaml +1 -1
- package/examples/ossa-templates/07-workflow-orchestrator.ossa.yaml +1 -1
- package/examples/ossa-templates/08-content-writer.ossa.yaml +1 -1
- package/examples/ossa-templates/09-test-generator.ossa.yaml +1 -1
- package/examples/ossa-templates/10-data-transformer.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/production/document-analyzer-openai.yml +1 -1
- package/examples/production-ready/01-customer-support-bot/.env.example +32 -0
- package/examples/production-ready/01-customer-support-bot/Dockerfile +30 -0
- package/examples/production-ready/01-customer-support-bot/README.md +295 -0
- package/examples/production-ready/01-customer-support-bot/agent.ossa.yaml +172 -0
- package/examples/production-ready/01-customer-support-bot/docker-compose.yml +55 -0
- package/examples/production-ready/01-customer-support-bot/openapi.yaml +238 -0
- package/examples/production-ready/01-customer-support-bot/package.json +48 -0
- package/examples/production-ready/02-code-review-agent/README.md +72 -0
- package/examples/production-ready/02-code-review-agent/agent.ossa.yaml +239 -0
- package/examples/production-ready/02-code-review-agent/docker-compose.yml +22 -0
- package/examples/production-ready/02-code-review-agent/openapi.yaml +150 -0
- package/examples/production-ready/03-data-analysis-agent/README.md +51 -0
- package/examples/production-ready/03-data-analysis-agent/agent.ossa.yaml +97 -0
- package/examples/production-ready/03-data-analysis-agent/openapi.yaml +74 -0
- package/examples/production-ready/04-content-moderator/README.md +55 -0
- package/examples/production-ready/04-content-moderator/agent.ossa.yaml +131 -0
- package/examples/production-ready/04-content-moderator/openapi.yaml +50 -0
- package/examples/production-ready/05-sales-assistant/README.md +37 -0
- package/examples/production-ready/05-sales-assistant/agent.ossa.yaml +146 -0
- package/examples/production-ready/05-sales-assistant/openapi.yaml +59 -0
- package/examples/production-ready/06-devops-agent/README.md +39 -0
- package/examples/production-ready/06-devops-agent/agent.ossa.yaml +141 -0
- package/examples/production-ready/06-devops-agent/openapi.yaml +51 -0
- package/examples/production-ready/07-research-assistant/README.md +31 -0
- package/examples/production-ready/07-research-assistant/agent.ossa.yaml +119 -0
- package/examples/production-ready/07-research-assistant/openapi.yaml +56 -0
- package/examples/production-ready/08-email-triage-agent/README.md +33 -0
- package/examples/production-ready/08-email-triage-agent/agent.ossa.yaml +133 -0
- package/examples/production-ready/08-email-triage-agent/openapi.yaml +41 -0
- package/examples/production-ready/09-security-scanner/README.md +49 -0
- package/examples/production-ready/09-security-scanner/agent.ossa.yaml +174 -0
- package/examples/production-ready/09-security-scanner/openapi.yaml +46 -0
- package/examples/production-ready/10-meeting-assistant/README.md +53 -0
- package/examples/production-ready/10-meeting-assistant/agent.ossa.yaml +211 -0
- package/examples/production-ready/10-meeting-assistant/docker-compose.yml +27 -0
- package/examples/production-ready/10-meeting-assistant/openapi.yaml +131 -0
- package/examples/production-ready/COMPLETION_REPORT.txt +272 -0
- package/examples/production-ready/INDEX.md +296 -0
- package/examples/production-ready/README.md +452 -0
- package/examples/production-ready/SUMMARY.md +362 -0
- package/examples/production-ready/TEST_RESULTS.md +458 -0
- 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/skills-example.ossa.yaml +140 -0
- package/examples/swarm/pso-optimizer.ossa.json +1 -1
- 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-features/genetics-breeding-advanced.ossa.yaml +1 -1
- package/examples/v0.3.6-features/genetics-breeding-simple.ossa.yaml +1 -1
- package/examples/v0.3.6-features/genetics-fitness-scoring.ossa.yaml +1 -1
- package/examples/vercel/edge-agent.ossa.json +1 -1
- 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/cli/openapi.yaml +221 -5
- package/package.json +17 -7
- package/dist/cli/commands/export-v2.command.d.ts +0 -7
- package/dist/cli/commands/export-v2.command.d.ts.map +0 -1
- package/dist/cli/commands/export-v2.command.js.map +0 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# OpenAI Configuration
|
|
2
|
+
OPENAI_API_KEY=sk-...
|
|
3
|
+
|
|
4
|
+
# Redis Configuration
|
|
5
|
+
REDIS_URL=redis://localhost:6379
|
|
6
|
+
|
|
7
|
+
# Server Configuration
|
|
8
|
+
PORT=8080
|
|
9
|
+
NODE_ENV=development
|
|
10
|
+
|
|
11
|
+
# Logging
|
|
12
|
+
LOG_LEVEL=info
|
|
13
|
+
|
|
14
|
+
# Metrics
|
|
15
|
+
METRICS_ENABLED=true
|
|
16
|
+
METRICS_PORT=9090
|
|
17
|
+
|
|
18
|
+
# Observability
|
|
19
|
+
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
|
|
20
|
+
TRACING_ENABLED=true
|
|
21
|
+
|
|
22
|
+
# Rate Limiting
|
|
23
|
+
RATE_LIMIT_MAX=100
|
|
24
|
+
RATE_LIMIT_WINDOW_MS=60000
|
|
25
|
+
|
|
26
|
+
# Security
|
|
27
|
+
ENABLE_PII_REDACTION=true
|
|
28
|
+
ENABLE_INPUT_VALIDATION=true
|
|
29
|
+
|
|
30
|
+
# Feature Flags
|
|
31
|
+
ENABLE_TICKET_CREATION=true
|
|
32
|
+
ENABLE_EMAIL_SENDING=true
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
FROM node:18-alpine AS base
|
|
2
|
+
|
|
3
|
+
# Install Python for LangChain
|
|
4
|
+
RUN apk add --no-cache python3 py3-pip
|
|
5
|
+
|
|
6
|
+
WORKDIR /app
|
|
7
|
+
|
|
8
|
+
# Copy package files
|
|
9
|
+
COPY package*.json ./
|
|
10
|
+
COPY requirements.txt ./
|
|
11
|
+
|
|
12
|
+
# Install dependencies
|
|
13
|
+
RUN npm ci --only=production
|
|
14
|
+
RUN pip3 install --no-cache-dir -r requirements.txt
|
|
15
|
+
|
|
16
|
+
# Copy application
|
|
17
|
+
COPY . .
|
|
18
|
+
|
|
19
|
+
# Build TypeScript
|
|
20
|
+
RUN npm run build
|
|
21
|
+
|
|
22
|
+
# Expose port
|
|
23
|
+
EXPOSE 8080
|
|
24
|
+
|
|
25
|
+
# Health check
|
|
26
|
+
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
|
27
|
+
CMD node healthcheck.js || exit 1
|
|
28
|
+
|
|
29
|
+
# Run application
|
|
30
|
+
CMD ["node", "dist/index.js"]
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
# Customer Support Bot
|
|
2
|
+
|
|
3
|
+
Production-ready customer support agent built with OSSA v0.3.6 and exported to LangChain.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Multi-turn conversations with memory
|
|
8
|
+
- Documentation search integration
|
|
9
|
+
- Automated ticket creation
|
|
10
|
+
- Email notifications
|
|
11
|
+
- PII redaction and safety filters
|
|
12
|
+
- OpenTelemetry observability
|
|
13
|
+
- Redis-backed session persistence
|
|
14
|
+
|
|
15
|
+
## Prerequisites
|
|
16
|
+
|
|
17
|
+
- Docker and Docker Compose
|
|
18
|
+
- Node.js 18+ (for local development)
|
|
19
|
+
- Python 3.9+ (for LangChain)
|
|
20
|
+
- OpenAI API key
|
|
21
|
+
- Redis instance
|
|
22
|
+
|
|
23
|
+
## Quick Start
|
|
24
|
+
|
|
25
|
+
### Using Docker Compose (Recommended)
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Set your OpenAI API key
|
|
29
|
+
export OPENAI_API_KEY=sk-...
|
|
30
|
+
|
|
31
|
+
# Start all services
|
|
32
|
+
docker-compose up -d
|
|
33
|
+
|
|
34
|
+
# View logs
|
|
35
|
+
docker-compose logs -f customer-support-bot
|
|
36
|
+
|
|
37
|
+
# Health check
|
|
38
|
+
curl http://localhost:8080/v1/health
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Local Development
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Install dependencies
|
|
45
|
+
npm install
|
|
46
|
+
pip install -r requirements.txt
|
|
47
|
+
|
|
48
|
+
# Set environment variables
|
|
49
|
+
cp .env.example .env
|
|
50
|
+
# Edit .env with your configuration
|
|
51
|
+
|
|
52
|
+
# Build TypeScript
|
|
53
|
+
npm run build
|
|
54
|
+
|
|
55
|
+
# Start development server
|
|
56
|
+
npm run dev
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Usage
|
|
60
|
+
|
|
61
|
+
### Send a message
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
curl -X POST http://localhost:8080/v1/chat \
|
|
65
|
+
-H "Content-Type: application/json" \
|
|
66
|
+
-d '{
|
|
67
|
+
"message": "How do I reset my password?",
|
|
68
|
+
"sessionId": "sess_123",
|
|
69
|
+
"userId": "user_456"
|
|
70
|
+
}'
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Get conversation history
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
curl http://localhost:8080/v1/session/sess_123/history
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Create a ticket
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
curl -X POST http://localhost:8080/v1/tickets \
|
|
83
|
+
-H "Content-Type: application/json" \
|
|
84
|
+
-d '{
|
|
85
|
+
"title": "Login issue",
|
|
86
|
+
"description": "Unable to access account after password reset",
|
|
87
|
+
"priority": "high",
|
|
88
|
+
"category": "technical"
|
|
89
|
+
}'
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## OSSA Export
|
|
93
|
+
|
|
94
|
+
This agent is defined in OSSA format and can be exported to multiple platforms:
|
|
95
|
+
|
|
96
|
+
### Export to LangChain (Python)
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
ossa export agent.ossa.yaml --platform langchain --output customer_support.py
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Generated file: `customer_support.py`
|
|
103
|
+
|
|
104
|
+
```python
|
|
105
|
+
from langchain.agents import create_react_agent
|
|
106
|
+
from langchain_openai import ChatOpenAI
|
|
107
|
+
from langchain.memory import ConversationBufferMemory
|
|
108
|
+
from langchain.tools import Tool
|
|
109
|
+
|
|
110
|
+
# Auto-generated from OSSA manifest
|
|
111
|
+
class CustomerSupportAgent:
|
|
112
|
+
def __init__(self):
|
|
113
|
+
self.llm = ChatOpenAI(model="gpt-4o", temperature=0.7)
|
|
114
|
+
self.memory = ConversationBufferMemory(memory_key="chat_history")
|
|
115
|
+
self.tools = [
|
|
116
|
+
Tool(name="search_docs", func=self.search_docs, ...),
|
|
117
|
+
Tool(name="create_ticket", func=self.create_ticket, ...),
|
|
118
|
+
Tool(name="send_email", func=self.send_email, ...)
|
|
119
|
+
]
|
|
120
|
+
self.agent = create_react_agent(self.llm, self.tools, ...)
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Export to LangChain (TypeScript)
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
ossa export agent.ossa.yaml --platform langchain-js --output customer-support.ts
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Export to npm package
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
ossa export agent.ossa.yaml --platform npm --output dist/
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Architecture
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
┌─────────────┐
|
|
139
|
+
│ Client │
|
|
140
|
+
└──────┬──────┘
|
|
141
|
+
│
|
|
142
|
+
▼
|
|
143
|
+
┌─────────────────────┐
|
|
144
|
+
│ Express API │
|
|
145
|
+
│ (OpenAPI 3.1) │
|
|
146
|
+
└──────┬──────────────┘
|
|
147
|
+
│
|
|
148
|
+
▼
|
|
149
|
+
┌─────────────────────┐
|
|
150
|
+
│ OSSA Agent Runtime │
|
|
151
|
+
│ - LangChain Agent │
|
|
152
|
+
│ - Memory Manager │
|
|
153
|
+
│ - Tool Executor │
|
|
154
|
+
└──────┬──────────────┘
|
|
155
|
+
│
|
|
156
|
+
├───► Redis (Memory)
|
|
157
|
+
│
|
|
158
|
+
├───► OpenAI (LLM)
|
|
159
|
+
│
|
|
160
|
+
└───► Tools (Docs, Tickets, Email)
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Configuration
|
|
164
|
+
|
|
165
|
+
### Environment Variables
|
|
166
|
+
|
|
167
|
+
| Variable | Description | Required |
|
|
168
|
+
|----------|-------------|----------|
|
|
169
|
+
| `OPENAI_API_KEY` | OpenAI API key | Yes |
|
|
170
|
+
| `REDIS_URL` | Redis connection URL | Yes |
|
|
171
|
+
| `LOG_LEVEL` | Logging level (debug, info, warn, error) | No (default: info) |
|
|
172
|
+
| `METRICS_ENABLED` | Enable Prometheus metrics | No (default: true) |
|
|
173
|
+
| `NODE_ENV` | Environment (development, production) | No (default: development) |
|
|
174
|
+
|
|
175
|
+
### Memory Configuration
|
|
176
|
+
|
|
177
|
+
The agent uses conversation buffer memory with Redis persistence:
|
|
178
|
+
|
|
179
|
+
```yaml
|
|
180
|
+
memory:
|
|
181
|
+
type: conversation_buffer
|
|
182
|
+
window_size: 10 # Keep last 10 messages
|
|
183
|
+
persistence:
|
|
184
|
+
backend: redis
|
|
185
|
+
ttl: 86400 # 24 hours
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Safety Configuration
|
|
189
|
+
|
|
190
|
+
Built-in safety features:
|
|
191
|
+
|
|
192
|
+
- PII detection and redaction
|
|
193
|
+
- Profanity filtering
|
|
194
|
+
- Hallucination checking
|
|
195
|
+
- Tone analysis
|
|
196
|
+
|
|
197
|
+
## Monitoring
|
|
198
|
+
|
|
199
|
+
### Metrics
|
|
200
|
+
|
|
201
|
+
Access Prometheus metrics at `http://localhost:9090/metrics`:
|
|
202
|
+
|
|
203
|
+
- `conversations_total` - Total conversations handled
|
|
204
|
+
- `tickets_created` - Number of tickets created
|
|
205
|
+
- `emails_sent` - Number of emails sent
|
|
206
|
+
- `response_time` - Average response time
|
|
207
|
+
|
|
208
|
+
### Logs
|
|
209
|
+
|
|
210
|
+
Structured JSON logs are written to `./logs/`:
|
|
211
|
+
|
|
212
|
+
```json
|
|
213
|
+
{
|
|
214
|
+
"level": "info",
|
|
215
|
+
"timestamp": "2026-02-02T12:00:00Z",
|
|
216
|
+
"sessionId": "sess_123",
|
|
217
|
+
"action": "message_received",
|
|
218
|
+
"userId": "user_456"
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### Tracing
|
|
223
|
+
|
|
224
|
+
OpenTelemetry traces are exported for distributed tracing.
|
|
225
|
+
|
|
226
|
+
## Testing
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
# Run unit tests
|
|
230
|
+
npm test
|
|
231
|
+
|
|
232
|
+
# Run integration tests
|
|
233
|
+
npm run test:integration
|
|
234
|
+
|
|
235
|
+
# Test OSSA manifest validation
|
|
236
|
+
ossa validate agent.ossa.yaml
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
## Production Deployment
|
|
240
|
+
|
|
241
|
+
### Kubernetes
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
# Apply Kubernetes manifests
|
|
245
|
+
kubectl apply -f k8s/
|
|
246
|
+
|
|
247
|
+
# Check deployment status
|
|
248
|
+
kubectl get pods -l app=customer-support-bot
|
|
249
|
+
|
|
250
|
+
# View logs
|
|
251
|
+
kubectl logs -f deployment/customer-support-bot
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### Scaling
|
|
255
|
+
|
|
256
|
+
The agent is stateless (session data in Redis) and can be horizontally scaled:
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
docker-compose up -d --scale customer-support-bot=3
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
## Troubleshooting
|
|
263
|
+
|
|
264
|
+
### Agent not responding
|
|
265
|
+
|
|
266
|
+
Check Redis connection:
|
|
267
|
+
```bash
|
|
268
|
+
docker-compose logs redis
|
|
269
|
+
redis-cli ping
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### High latency
|
|
273
|
+
|
|
274
|
+
Check OpenAI API status and rate limits:
|
|
275
|
+
```bash
|
|
276
|
+
curl -H "Authorization: Bearer $OPENAI_API_KEY" \
|
|
277
|
+
https://api.openai.com/v1/models
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### Memory issues
|
|
281
|
+
|
|
282
|
+
Clear Redis cache:
|
|
283
|
+
```bash
|
|
284
|
+
redis-cli FLUSHDB
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
## License
|
|
288
|
+
|
|
289
|
+
Apache-2.0
|
|
290
|
+
|
|
291
|
+
## Support
|
|
292
|
+
|
|
293
|
+
For issues and questions:
|
|
294
|
+
- GitHub Issues: https://github.com/org/repo/issues
|
|
295
|
+
- Email: support@techcorp.com
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
apiVersion: ossa/v0.4.1
|
|
2
|
+
kind: Agent
|
|
3
|
+
metadata:
|
|
4
|
+
name: customer-support-bot
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
description: |
|
|
7
|
+
Production customer support agent with memory, multi-channel support, and ticket creation.
|
|
8
|
+
Handles customer inquiries, searches documentation, creates tickets, and sends follow-up emails.
|
|
9
|
+
labels:
|
|
10
|
+
platform: langchain
|
|
11
|
+
export: langchain
|
|
12
|
+
use-case: customer-support
|
|
13
|
+
tier: production
|
|
14
|
+
spec:
|
|
15
|
+
role: |
|
|
16
|
+
You are a professional customer support agent for TechCorp. Your responsibilities:
|
|
17
|
+
|
|
18
|
+
1. Answer customer questions accurately and professionally
|
|
19
|
+
2. Search documentation to provide accurate technical information
|
|
20
|
+
3. Create support tickets for issues requiring human intervention
|
|
21
|
+
4. Send follow-up emails to keep customers informed
|
|
22
|
+
5. Maintain conversation context to provide personalized support
|
|
23
|
+
|
|
24
|
+
Communication style:
|
|
25
|
+
- Professional, friendly, and empathetic
|
|
26
|
+
- Clear and concise explanations
|
|
27
|
+
- Proactive in offering solutions
|
|
28
|
+
- Transparent about limitations
|
|
29
|
+
|
|
30
|
+
llm:
|
|
31
|
+
provider: openai
|
|
32
|
+
model: gpt-4o
|
|
33
|
+
temperature: 0.7
|
|
34
|
+
maxTokens: 1500
|
|
35
|
+
|
|
36
|
+
capabilities:
|
|
37
|
+
- search_documentation
|
|
38
|
+
- create_ticket
|
|
39
|
+
- send_email
|
|
40
|
+
- conversation_memory
|
|
41
|
+
|
|
42
|
+
tools:
|
|
43
|
+
- type: function
|
|
44
|
+
name: search_docs
|
|
45
|
+
description: Search the knowledge base for relevant documentation
|
|
46
|
+
parameters:
|
|
47
|
+
type: object
|
|
48
|
+
properties:
|
|
49
|
+
query:
|
|
50
|
+
type: string
|
|
51
|
+
description: Search query for documentation
|
|
52
|
+
max_results:
|
|
53
|
+
type: integer
|
|
54
|
+
description: Maximum number of results to return
|
|
55
|
+
default: 5
|
|
56
|
+
required:
|
|
57
|
+
- query
|
|
58
|
+
|
|
59
|
+
- type: function
|
|
60
|
+
name: create_ticket
|
|
61
|
+
description: Create a support ticket for issues requiring human attention
|
|
62
|
+
parameters:
|
|
63
|
+
type: object
|
|
64
|
+
properties:
|
|
65
|
+
title:
|
|
66
|
+
type: string
|
|
67
|
+
description: Brief title of the issue
|
|
68
|
+
description:
|
|
69
|
+
type: string
|
|
70
|
+
description: Detailed description of the issue
|
|
71
|
+
priority:
|
|
72
|
+
type: string
|
|
73
|
+
enum: [low, medium, high, urgent]
|
|
74
|
+
description: Priority level of the ticket
|
|
75
|
+
category:
|
|
76
|
+
type: string
|
|
77
|
+
description: Category (billing, technical, account, etc.)
|
|
78
|
+
required:
|
|
79
|
+
- title
|
|
80
|
+
- description
|
|
81
|
+
- priority
|
|
82
|
+
|
|
83
|
+
- type: function
|
|
84
|
+
name: send_email
|
|
85
|
+
description: Send follow-up email to customer
|
|
86
|
+
parameters:
|
|
87
|
+
type: object
|
|
88
|
+
properties:
|
|
89
|
+
to:
|
|
90
|
+
type: string
|
|
91
|
+
description: Customer email address
|
|
92
|
+
subject:
|
|
93
|
+
type: string
|
|
94
|
+
description: Email subject line
|
|
95
|
+
body:
|
|
96
|
+
type: string
|
|
97
|
+
description: Email body content
|
|
98
|
+
template:
|
|
99
|
+
type: string
|
|
100
|
+
description: Email template to use
|
|
101
|
+
enum: [follow_up, resolution, escalation]
|
|
102
|
+
required:
|
|
103
|
+
- to
|
|
104
|
+
- subject
|
|
105
|
+
- body
|
|
106
|
+
|
|
107
|
+
autonomy:
|
|
108
|
+
level: supervised
|
|
109
|
+
approval_required: false
|
|
110
|
+
escalation_rules:
|
|
111
|
+
- condition: priority == 'urgent'
|
|
112
|
+
action: notify_human
|
|
113
|
+
- condition: ticket_count > 3
|
|
114
|
+
action: escalate
|
|
115
|
+
|
|
116
|
+
memory:
|
|
117
|
+
enabled: true
|
|
118
|
+
type: conversation_buffer
|
|
119
|
+
window_size: 10
|
|
120
|
+
persistence:
|
|
121
|
+
enabled: true
|
|
122
|
+
backend: redis
|
|
123
|
+
ttl: 86400
|
|
124
|
+
|
|
125
|
+
safety:
|
|
126
|
+
input_filters:
|
|
127
|
+
- type: pii_detection
|
|
128
|
+
action: redact
|
|
129
|
+
- type: profanity_filter
|
|
130
|
+
action: reject
|
|
131
|
+
output_validation:
|
|
132
|
+
- type: hallucination_check
|
|
133
|
+
threshold: 0.8
|
|
134
|
+
- type: tone_analysis
|
|
135
|
+
required_sentiment: [positive, neutral]
|
|
136
|
+
|
|
137
|
+
observability:
|
|
138
|
+
logging:
|
|
139
|
+
level: info
|
|
140
|
+
format: json
|
|
141
|
+
include_pii: false
|
|
142
|
+
metrics:
|
|
143
|
+
enabled: true
|
|
144
|
+
port: 9090
|
|
145
|
+
metrics:
|
|
146
|
+
- conversations_total
|
|
147
|
+
- tickets_created
|
|
148
|
+
- emails_sent
|
|
149
|
+
- response_time
|
|
150
|
+
tracing:
|
|
151
|
+
enabled: true
|
|
152
|
+
provider: opentelemetry
|
|
153
|
+
|
|
154
|
+
extensions:
|
|
155
|
+
langchain:
|
|
156
|
+
agent_type: react
|
|
157
|
+
memory_type: conversation_buffer
|
|
158
|
+
chain_type: conversation
|
|
159
|
+
tools_mapping:
|
|
160
|
+
- ossa_capability: search_documentation
|
|
161
|
+
langchain_tool: search_docs
|
|
162
|
+
tool_class: CustomSearchTool
|
|
163
|
+
- ossa_capability: create_ticket
|
|
164
|
+
langchain_tool: create_ticket
|
|
165
|
+
tool_class: TicketingTool
|
|
166
|
+
- ossa_capability: send_email
|
|
167
|
+
langchain_tool: send_email
|
|
168
|
+
tool_class: EmailTool
|
|
169
|
+
export_config:
|
|
170
|
+
format: python
|
|
171
|
+
include_dependencies: true
|
|
172
|
+
output_file: customer_support_agent.py
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
version: '3.8'
|
|
2
|
+
|
|
3
|
+
services:
|
|
4
|
+
customer-support-bot:
|
|
5
|
+
build: .
|
|
6
|
+
container_name: customer-support-bot
|
|
7
|
+
ports:
|
|
8
|
+
- "8080:8080"
|
|
9
|
+
- "9090:9090" # Metrics
|
|
10
|
+
environment:
|
|
11
|
+
- NODE_ENV=production
|
|
12
|
+
- OPENAI_API_KEY=${OPENAI_API_KEY}
|
|
13
|
+
- REDIS_URL=redis://redis:6379
|
|
14
|
+
- LOG_LEVEL=info
|
|
15
|
+
- METRICS_ENABLED=true
|
|
16
|
+
depends_on:
|
|
17
|
+
- redis
|
|
18
|
+
restart: unless-stopped
|
|
19
|
+
networks:
|
|
20
|
+
- support-network
|
|
21
|
+
volumes:
|
|
22
|
+
- ./logs:/app/logs
|
|
23
|
+
|
|
24
|
+
redis:
|
|
25
|
+
image: redis:7-alpine
|
|
26
|
+
container_name: support-redis
|
|
27
|
+
ports:
|
|
28
|
+
- "6379:6379"
|
|
29
|
+
volumes:
|
|
30
|
+
- redis-data:/data
|
|
31
|
+
restart: unless-stopped
|
|
32
|
+
networks:
|
|
33
|
+
- support-network
|
|
34
|
+
|
|
35
|
+
prometheus:
|
|
36
|
+
image: prom/prometheus:latest
|
|
37
|
+
container_name: support-prometheus
|
|
38
|
+
ports:
|
|
39
|
+
- "9091:9090"
|
|
40
|
+
volumes:
|
|
41
|
+
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
|
42
|
+
- prometheus-data:/prometheus
|
|
43
|
+
command:
|
|
44
|
+
- '--config.file=/etc/prometheus/prometheus.yml'
|
|
45
|
+
restart: unless-stopped
|
|
46
|
+
networks:
|
|
47
|
+
- support-network
|
|
48
|
+
|
|
49
|
+
networks:
|
|
50
|
+
support-network:
|
|
51
|
+
driver: bridge
|
|
52
|
+
|
|
53
|
+
volumes:
|
|
54
|
+
redis-data:
|
|
55
|
+
prometheus-data:
|