@bluefly/openstandardagents 0.2.5-RC → 0.2.8
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/.devfile.yaml +1 -1
- package/.env.example +1 -1
- package/.github/ISSUE_TEMPLATE/bug_report.yml +63 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +40 -0
- package/.github/workflows/dependabot-comment.yml +34 -0
- package/.github/workflows/pr-comment.yml +33 -0
- package/.husky/pre-commit +5 -0
- package/.kiro/config.json +21 -0
- package/.kiro/settings/mcp.json +61 -0
- package/.kiro/specs/scripts-migration-api-first/design.md +883 -0
- package/.kiro/specs/scripts-migration-api-first/requirements.md +165 -0
- package/.kiro/specs/scripts-migration-api-first/tasks.md +539 -0
- package/.kiro/specs/{website-design-audit → website-brand-identity}/design.md +381 -0
- package/.kiro/specs/{website-design-audit → website-brand-identity}/requirements.md +88 -0
- package/.kiro/specs/website-brand-identity/tasks.md +981 -0
- package/.version.json +2 -2
- package/.wiki-config.json +24 -0
- package/CHANGELOG.md +34 -18
- package/CODEOWNERS +75 -0
- package/CONTRIBUTING.md +1 -1
- package/README.md +176 -239
- package/bin/ossa-dev +42 -0
- package/bin/ossa-export +32 -0
- package/bin/ossa-generate +60 -0
- package/bin/ossa-health +40 -0
- package/bin/ossa-init +26 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/repositories/schema.repository.d.ts +6 -1
- package/dist/repositories/schema.repository.d.ts.map +1 -1
- package/dist/repositories/schema.repository.js +63 -36
- package/dist/repositories/schema.repository.js.map +1 -1
- package/dist/services/github-sync/github-client.d.ts +14 -0
- package/dist/services/github-sync/github-client.d.ts.map +1 -0
- package/dist/services/github-sync/github-client.js +41 -0
- package/dist/services/github-sync/github-client.js.map +1 -0
- package/dist/services/github-sync/gitlab-client.d.ts +17 -0
- package/dist/services/github-sync/gitlab-client.d.ts.map +1 -0
- package/dist/services/github-sync/gitlab-client.js +42 -0
- package/dist/services/github-sync/gitlab-client.js.map +1 -0
- package/dist/services/github-sync/schemas.d.ts +46 -0
- package/dist/services/github-sync/schemas.d.ts.map +1 -0
- package/dist/services/github-sync/schemas.js +36 -0
- package/dist/services/github-sync/schemas.js.map +1 -0
- package/dist/services/github-sync/sync.service.d.ts +27 -0
- package/dist/services/github-sync/sync.service.d.ts.map +1 -0
- package/dist/services/github-sync/sync.service.js +99 -0
- package/dist/services/github-sync/sync.service.js.map +1 -0
- package/dist/services/migration.service.d.ts +4 -3
- package/dist/services/migration.service.d.ts.map +1 -1
- package/dist/services/migration.service.js +11 -10
- package/dist/services/migration.service.js.map +1 -1
- package/dist/services/release-automation/release.service.js +1 -1
- package/dist/services/release-automation/release.service.js.map +1 -1
- package/dist/services/release-automation/schemas/release.schema.js +1 -1
- package/dist/services/runtime/claude/capability-mapper.d.ts +84 -0
- package/dist/services/runtime/claude/capability-mapper.d.ts.map +1 -0
- package/dist/services/runtime/claude/capability-mapper.js +245 -0
- package/dist/services/runtime/claude/capability-mapper.js.map +1 -0
- package/dist/services/runtime/claude/claude-adapter.d.ts +80 -0
- package/dist/services/runtime/claude/claude-adapter.d.ts.map +1 -0
- package/dist/services/runtime/claude/claude-adapter.js +287 -0
- package/dist/services/runtime/claude/claude-adapter.js.map +1 -0
- package/dist/services/runtime/claude/manifest-parser.d.ts +77 -0
- package/dist/services/runtime/claude/manifest-parser.d.ts.map +1 -0
- package/dist/services/runtime/claude/manifest-parser.js +169 -0
- package/dist/services/runtime/claude/manifest-parser.js.map +1 -0
- package/dist/services/runtime/claude/types.d.ts +115 -0
- package/dist/services/runtime/claude/types.d.ts.map +1 -0
- package/dist/services/runtime/claude/types.js +6 -0
- package/dist/services/runtime/claude/types.js.map +1 -0
- package/dist/services/validation.service.d.ts.map +1 -1
- package/dist/services/validation.service.js +12 -1
- package/dist/services/validation.service.js.map +1 -1
- package/dist/spec/v0.2.4/ossa-0.2.4.schema.json +85 -208
- package/dist/spec/v0.2.6/CHANGELOG.md +401 -0
- package/dist/spec/v0.2.6/README.md +72 -0
- package/dist/spec/v0.2.6/migrations/v0.2.3-to-v0.2.4.md +599 -0
- package/dist/spec/v0.2.6/migrations/v0.2.5-RC-to-v0.2.6.md +65 -0
- package/dist/spec/{v0.2.4/ossa-0.2.4-dev.schema.json → v0.2.6/ossa-0.2.6.schema.json} +128 -38
- package/dist/spec/v0.2.6/ossa-0.2.6.yaml +581 -0
- package/dist/spec/v0.2.6-dev/CHANGELOG.md +164 -0
- package/dist/spec/v0.2.6-dev/README.md +75 -0
- package/dist/spec/v0.2.6-dev/migrations/v0.2.2-to-v0.2.3.md +343 -0
- package/dist/spec/v0.2.6-dev/migrations/v0.2.3-to-v0.2.4.md +599 -0
- package/dist/spec/v0.2.6-dev/ossa-0.2.5.yaml +581 -0
- package/dist/spec/v0.2.6-dev/ossa-0.2.6-dev.yaml +448 -0
- package/dist/spec/v0.2.7/core/agentgraph.md +324 -0
- package/dist/spec/v0.2.7/resources/agentgraph.yaml +135 -0
- package/dist/spec/v0.2.8/CHANGELOG.md +401 -0
- package/dist/spec/v0.2.8/README.md +72 -0
- package/dist/spec/v0.2.8/migrations/v0.2.3-to-v0.2.4.md +599 -0
- package/dist/spec/v0.2.8/migrations/v0.2.5-RC-to-v0.2.6.md +65 -0
- package/dist/spec/v0.2.8/migrations/v0.2.6-to-v0.2.8.md +81 -0
- package/dist/spec/v0.2.8/ossa-0.2.8.schema.json +3153 -0
- package/dist/spec/v0.2.8/ossa-0.2.8.yaml +581 -0
- package/dist/types/index.d.ts +3 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +6 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/version.d.ts +68 -0
- package/dist/utils/version.d.ts.map +1 -0
- package/dist/utils/version.js +156 -0
- package/dist/utils/version.js.map +1 -0
- package/docs/brand-guide/01-brand-overview.md +37 -0
- package/docs/brand-guide/02-logo-usage.md +43 -0
- package/docs/brand-guide/03-color-palette.md +70 -0
- package/docs/brand-guide/04-typography.md +82 -0
- package/docs/brand-guide/05-voice-and-tone.md +108 -0
- package/docs/brand-guide/06-visual-elements.md +137 -0
- package/docs/brand-guide/07-application-examples.md +153 -0
- package/docs/brand-guide/OssaLogo/OssA_Logo.svg +21 -0
- package/docs/brand-guide/OssaLogo/brand.af +0 -0
- package/docs/brand-guide/README.md +107 -0
- package/docs/comparison.md +315 -0
- package/docs/operations/automation-roadmap.md +245 -0
- package/docs/operations/github-sync-strategy.md +357 -0
- package/eslint-report.json +1 -0
- package/examples/adk-integration/code-review-workflow.yml +1 -1
- package/examples/adk-integration/customer-support.yml +1 -1
- package/examples/adk-integration/data-pipeline.yml +1 -1
- package/examples/advanced/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/anthropic/claude-assistant.ossa.json +5 -4
- package/examples/autogen/multi-agent.ossa.json +6 -4
- package/examples/claude-code/code-reviewer.ossa.yaml +78 -0
- package/examples/claude-code/ossa-validator.ossa.yaml +80 -0
- package/examples/common_npm/agent-router.ossa.yaml +1 -0
- package/examples/common_npm/agent-router.v0.2.2.ossa.yaml +1 -1
- package/examples/crewai/research-team.ossa.json +14 -5
- package/examples/cursor/code-review-agent.ossa.json +21 -6
- package/examples/drupal/gitlab-ml-recommender.ossa.yaml +1 -0
- package/examples/drupal/gitlab-ml-recommender.v0.2.2.ossa.yaml +1 -1
- package/examples/extensions/drupal-v1.yml +1 -1
- package/examples/extensions/kagent-v1.yml +1 -1
- package/examples/getting-started/hello-world-complete.ossa.yaml +1 -1
- package/examples/integration-patterns/agent-to-agent-orchestration.ossa.yaml +4 -4
- package/examples/kagent/compliance-validator.ossa.yaml +1 -1
- package/examples/kagent/cost-optimizer.ossa.yaml +1 -1
- package/examples/kagent/documentation-agent.ossa.yaml +1 -1
- package/examples/kagent/k8s-troubleshooter-v1.ossa.yaml +1 -0
- package/examples/kagent/k8s-troubleshooter-v1.v0.2.2.ossa.yaml +1 -1
- package/examples/kagent/k8s-troubleshooter.ossa.yaml +1 -1
- package/examples/kagent/security-scanner.ossa.yaml +1 -1
- package/examples/langchain/chain-agent.ossa.json +21 -5
- package/examples/langflow/workflow-agent.ossa.json +2 -3
- package/examples/langgraph/state-machine-agent.ossa.json +2 -3
- package/examples/llamaindex/rag-agent.ossa.json +2 -3
- package/examples/migration-guides/from-langchain-to-ossa.yaml +4 -4
- package/examples/multi-agent/README.md +74 -0
- package/examples/multi-agent/conditional-router.ossa.yaml +42 -0
- package/examples/multi-agent/parallel-execution.ossa.yaml +54 -0
- package/examples/multi-agent/sequential-pipeline.ossa.yaml +45 -0
- package/examples/openai/basic-agent.ossa.yaml +1 -1
- package/examples/openai/multi-tool-agent.ossa.json +33 -10
- package/examples/openai/swarm-agent.ossa.json +18 -5
- package/examples/production/document-analyzer-openai.yml +1 -1
- package/examples/quickstart/support-agent.ossa.yaml +1 -1
- package/examples/spec-examples/audit-agent.yml +1 -1
- package/examples/spec-examples/chat-agent.yml +1 -1
- package/examples/spec-examples/compliance-agent.yml +1 -1
- package/examples/spec-examples/monitoring-agent.yml +1 -1
- package/examples/spec-examples/workflow-agent.yml +1 -1
- package/examples/templates/ossa-compliance.yaml +1 -1
- package/examples/vercel/edge-agent.ossa.json +5 -4
- package/gl-code-quality-report.json +62 -0
- package/llms-ctx-full.txt +39 -0
- package/llms-ctx.txt +39 -0
- package/llms.txt +47 -0
- package/openapi/github-sync.yaml +115 -0
- package/package.json +26 -4
- package/scripts/README.md +103 -0
- package/scripts/auto-rebase-mrs.ts +106 -0
- package/scripts/batch-dependabot.sh +57 -0
- package/scripts/configure-gitlab-branch-protection.ts +95 -0
- package/scripts/create-issue-helper.ts +238 -0
- package/scripts/create-milestone-issue.ts +73 -0
- package/scripts/eslint-to-codequality.cjs +34 -0
- package/scripts/fix-schema-formats.js +82 -0
- package/scripts/generate-agents-catalog.ts +77 -0
- package/scripts/generate-api-docs.ts +218 -0
- package/scripts/generate-cli-docs.ts +410 -0
- package/scripts/generate-config-docs.ts +109 -0
- package/scripts/generate-errors-docs.ts +76 -0
- package/scripts/generate-examples-docs.ts +99 -0
- package/scripts/generate-llms-ctx.sh +17 -0
- package/scripts/generate-schema-docs.ts +317 -0
- package/scripts/generate-types-docs.ts +48 -0
- package/scripts/lowercase-docs.ts +43 -0
- package/scripts/manage-milestone-mrs.ts +279 -0
- package/scripts/rebase-all-mrs.sh +75 -0
- package/scripts/sync-github-pr.sh +48 -0
- package/scripts/sync-version.js +32 -0
- package/scripts/sync-wiki.sh +50 -0
- package/scripts/validate-all.js +127 -0
- package/scripts/validate-schema.ts +2 -1
- package/spec/v0.2.4/ossa-0.2.4.schema.json +85 -208
- package/spec/v0.2.6/CHANGELOG.md +401 -0
- package/spec/v0.2.6/README.md +72 -0
- package/spec/v0.2.6/migrations/v0.2.3-to-v0.2.4.md +599 -0
- package/spec/v0.2.6/migrations/v0.2.5-RC-to-v0.2.6.md +65 -0
- package/spec/{v0.2.4/ossa-0.2.4-dev.schema.json → v0.2.6/ossa-0.2.6.schema.json} +128 -38
- package/spec/v0.2.6/ossa-0.2.6.yaml +581 -0
- package/spec/v0.2.6-dev/CHANGELOG.md +164 -0
- package/spec/v0.2.6-dev/README.md +75 -0
- package/spec/v0.2.6-dev/migrations/v0.2.2-to-v0.2.3.md +343 -0
- package/spec/v0.2.6-dev/migrations/v0.2.3-to-v0.2.4.md +599 -0
- package/spec/v0.2.6-dev/ossa-0.2.5.yaml +581 -0
- package/spec/v0.2.6-dev/ossa-0.2.6-dev.yaml +448 -0
- package/spec/v0.2.7/core/agentgraph.md +324 -0
- package/spec/v0.2.7/resources/agentgraph.yaml +135 -0
- package/spec/v0.2.8/CHANGELOG.md +401 -0
- package/spec/v0.2.8/README.md +72 -0
- package/spec/v0.2.8/migrations/v0.2.3-to-v0.2.4.md +599 -0
- package/spec/v0.2.8/migrations/v0.2.5-RC-to-v0.2.6.md +65 -0
- package/spec/v0.2.8/migrations/v0.2.6-to-v0.2.8.md +81 -0
- package/spec/v0.2.8/ossa-0.2.8.schema.json +3153 -0
- package/spec/v0.2.8/ossa-0.2.8.yaml +581 -0
- package/test-results/junit.xml +299 -0
- package/.kiro/specs/agent-buildkit-templates/design.md +0 -495
- package/.kiro/specs/agent-buildkit-templates/requirements.md +0 -165
- package/.kiro/specs/kiro-ide-supercharger/README.md +0 -202
- package/.kiro/specs/kiro-ide-supercharger/design.md +0 -1005
- package/.kiro/specs/kiro-ide-supercharger/requirements.md +0 -141
- package/.kiro/specs/kiro-ide-supercharger/tasks.md +0 -507
- package/bin/validate-ossa-0.2.5-RC.ts +0 -244
- package/docs/issue-19-completion-summary.md +0 -648
- package/docs/issue-19-validation.md +0 -351
- package/scripts/lib/exec.ts +0 -37
- package/scripts/lib/file-ops.ts +0 -58
- package/scripts/lib/version.ts +0 -83
- package/website/.lighthouserc.ts +0 -24
- package/website/.prettierrc +0 -10
- package/website/Dockerfile +0 -30
- package/website/app/about/page.tsx +0 -295
- package/website/app/blog/[slug]/page.tsx +0 -208
- package/website/app/blog/page.tsx +0 -249
- package/website/app/design-guide/page.tsx +0 -511
- package/website/app/docs/[[...slug]]/page.tsx +0 -847
- package/website/app/docs/core-concepts/project-structure/page.tsx +0 -349
- package/website/app/ecosystem/page.tsx +0 -375
- package/website/app/examples/page.tsx +0 -133
- package/website/app/globals.scss +0 -135
- package/website/app/layout.tsx +0 -106
- package/website/app/license/page.tsx +0 -183
- package/website/app/not-found.tsx +0 -18
- package/website/app/page.tsx +0 -474
- package/website/app/playground/page.tsx +0 -487
- package/website/app/robots.ts +0 -19
- package/website/app/rss.xml/route.ts +0 -74
- package/website/app/schema/page.tsx +0 -1001
- package/website/app/sitemap.ts +0 -56
- package/website/app/specification/page.tsx +0 -287
- package/website/components/InstallCommand.tsx +0 -96
- package/website/components/Logo.tsx +0 -97
- package/website/components/StructuredData.tsx +0 -65
- package/website/components/docs/DocsSearch.tsx +0 -104
- package/website/components/docs/DocsSidebar.tsx +0 -155
- package/website/components/docs/MarkdownContent.tsx +0 -401
- package/website/components/docs/VersionSelector.tsx +0 -105
- package/website/components/examples/ExamplesViewer.tsx +0 -293
- package/website/components/layout/Footer.tsx +0 -116
- package/website/components/layout/Header.tsx +0 -168
- package/website/components/schema/SchemaComponentsAccordion.tsx +0 -84
- package/website/components/schema/SchemaExplorer.tsx +0 -213
- package/website/content/blog/OpenAPI-AI-Agents-Standard.md +0 -285
- package/website/content/blog/Why-Formal-Standards-Matter-Now.md +0 -198
- package/website/content/blog/gitlab-kubernetes-agent-ecosystem.md +0 -286
- package/website/content/blog/introducing-ossa-framework.md +0 -328
- package/website/content/blog/ossa-production-results.md +0 -279
- package/website/content/blog/welcome-to-ossa.md +0 -43
- package/website/content/blog/why-ai-agents-need-open-standard.md +0 -98
- package/website/content/docs/00-HOME.md +0 -153
- package/website/content/docs/AIFlow-Framework-Integration-with-OSSA.md +0 -107
- package/website/content/docs/Examples.md +0 -71
- package/website/content/docs/OpenAPI-Extensions.md +0 -934
- package/website/content/docs/adapters/openai-adapter.md +0 -693
- package/website/content/docs/architecture/execution-flow.md +0 -335
- package/website/content/docs/architecture/multi-agent-systems.md +0 -737
- package/website/content/docs/architecture/overview.md +0 -121
- package/website/content/docs/architecture/stack-integration.md +0 -461
- package/website/content/docs/changelog.md +0 -246
- package/website/content/docs/contributing.md +0 -599
- package/website/content/docs/core-concepts/Project-Structure.md +0 -348
- package/website/content/docs/ecosystem/framework-support.md +0 -819
- package/website/content/docs/ecosystem/overview.md +0 -366
- package/website/content/docs/examples/AIFlow-Framework-Integration-with-OSSA.md +0 -107
- package/website/content/docs/examples/Migration-Guides.md +0 -214
- package/website/content/docs/for-audiences/Architects.md +0 -224
- package/website/content/docs/for-audiences/Developers.md +0 -220
- package/website/content/docs/for-audiences/Enterprises.md +0 -256
- package/website/content/docs/for-audiences/Students-Researchers.md +0 -122
- package/website/content/docs/getting-started/5-Minute-Overview.md +0 -85
- package/website/content/docs/getting-started/First-Agent.md +0 -196
- package/website/content/docs/getting-started/Hello-World.md +0 -184
- package/website/content/docs/getting-started/Installation.md +0 -155
- package/website/content/docs/getting-started/index.md +0 -92
- package/website/content/docs/getting-started/running-agents.md +0 -309
- package/website/content/docs/getting-started.md +0 -91
- package/website/content/docs/integrations/aiflow.md +0 -104
- package/website/content/docs/integrations/drupal.md +0 -105
- package/website/content/docs/migration-guides/00-INDEX.md +0 -76
- package/website/content/docs/migration-guides/README.md +0 -133
- package/website/content/docs/migration-guides/agent-schema-comparison.md +0 -232
- package/website/content/docs/migration-guides/anthropic-mcp-to-ossa.md +0 -1750
- package/website/content/docs/migration-guides/crewai-to-ossa.md +0 -274
- package/website/content/docs/migration-guides/drupal-eca-to-ossa.md +0 -2017
- package/website/content/docs/migration-guides/general-agent-schema.yml +0 -247
- package/website/content/docs/migration-guides/index.md +0 -133
- package/website/content/docs/migration-guides/langchain-to-ossa.md +0 -1714
- package/website/content/docs/migration-guides/langflow-to-ossa.md +0 -2075
- package/website/content/docs/migration-guides/migration-manifest.json +0 -64
- package/website/content/docs/migration-guides/openai-to-ossa.md +0 -1202
- package/website/content/docs/openapi-extensions/examples.md +0 -550
- package/website/content/docs/openapi-extensions/index.md +0 -551
- package/website/content/docs/openapi-extensions/operation-extensions.md +0 -457
- package/website/content/docs/openapi-extensions/root-extensions.md +0 -410
- package/website/content/docs/ossa-compliant-badge.md +0 -251
- package/website/content/docs/pre-release/index.md +0 -175
- package/website/content/docs/quick-reference.md +0 -17
- package/website/content/docs/readme.md +0 -35
- package/website/content/docs/schema-reference/agent-spec.md +0 -406
- package/website/content/docs/schema-reference/autonomy.md +0 -568
- package/website/content/docs/schema-reference/constraints.md +0 -543
- package/website/content/docs/schema-reference/index.md +0 -176
- package/website/content/docs/schema-reference/llm-config.md +0 -445
- package/website/content/docs/schema-reference/observability.md +0 -654
- package/website/content/docs/schema-reference/ossa-manifest.md +0 -309
- package/website/content/docs/schema-reference/taxonomy.md +0 -509
- package/website/content/docs/schema-reference/tools.md +0 -628
- package/website/content/docs/templates/blog-post.md +0 -43
- package/website/content/docs/use-cases/00-index.md +0 -395
- package/website/content/docs/use-cases/cicd-code-review.md +0 -1236
- package/website/content/docs/use-cases/customer-support.md +0 -1234
- package/website/content/docs/use-cases/enterprise-compliance.md +0 -1208
- package/website/content/docs/use-cases/research-multi-agent.md +0 -1161
- package/website/content/docs/versioning.md +0 -288
- package/website/lib/version.ts +0 -35
- package/website/lib/versions.json +0 -78
- package/website/next.config.ts +0 -18
- package/website/nginx.conf +0 -32
- package/website/package-lock.json +0 -9679
- package/website/package.json +0 -59
- package/website/postcss.config.mjs +0 -9
- package/website/scripts/fetch-versions.js +0 -166
- package/website/scripts/generate-examples-index.js +0 -163
- package/website/scripts/merge-docs-to-wiki.ts +0 -207
- package/website/scripts/sync-version.js +0 -72
- package/website/scripts/sync-wiki.ts +0 -322
- package/website/scripts/upload-wiki.ts +0 -199
- package/website/styles/_variables.scss +0 -36
- package/website/tailwind.config.ts +0 -136
- /package/dist/spec/v0.2.4/{ossa-0.2.4-dev.yaml → ossa-0.2.4.yaml} +0 -0
- /package/spec/v0.2.4/{ossa-0.2.4-dev.yaml → ossa-0.2.4.yaml} +0 -0
|
@@ -1,693 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "OpenAI Adapter"
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# OpenAI Adapter
|
|
6
|
-
|
|
7
|
-
The OpenAI adapter enables OSSA agents to run using OpenAI's function calling API, supporting GPT-4, GPT-3.5, and other OpenAI models.
|
|
8
|
-
|
|
9
|
-
## Overview
|
|
10
|
-
|
|
11
|
-
The OpenAI adapter:
|
|
12
|
-
- Converts OSSA manifests to OpenAI function calling format
|
|
13
|
-
- Manages conversation history and context
|
|
14
|
-
- Executes tool calls with custom handlers
|
|
15
|
-
- Supports OpenAI-specific extensions
|
|
16
|
-
- Handles streaming and token limits
|
|
17
|
-
|
|
18
|
-
## Quick Start
|
|
19
|
-
|
|
20
|
-
### 1. Set API Key
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
export OPENAI_API_KEY=sk-your-key-here
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
### 2. Create Agent Manifest
|
|
27
|
-
|
|
28
|
-
```yaml
|
|
29
|
-
apiVersion: ossa/v0.2.4
|
|
30
|
-
kind: Agent
|
|
31
|
-
metadata:
|
|
32
|
-
name: my-agent
|
|
33
|
-
version: 1.0.0
|
|
34
|
-
spec:
|
|
35
|
-
role: You are a helpful assistant
|
|
36
|
-
llm:
|
|
37
|
-
provider: openai
|
|
38
|
-
model: gpt-4o-mini
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### 3. Run Agent
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
ossa run my-agent.ossa.yaml
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Configuration
|
|
48
|
-
|
|
49
|
-
### Model Selection
|
|
50
|
-
|
|
51
|
-
The adapter selects the model in this priority order:
|
|
52
|
-
|
|
53
|
-
1. **OpenAI Extension** (highest priority)
|
|
54
|
-
2. **LLM Config**
|
|
55
|
-
3. **Default** (`gpt-4o-mini`)
|
|
56
|
-
|
|
57
|
-
#### Using OpenAI Extension
|
|
58
|
-
|
|
59
|
-
```yaml
|
|
60
|
-
extensions:
|
|
61
|
-
openai_agents:
|
|
62
|
-
model: gpt-4-turbo
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
#### Using LLM Config
|
|
66
|
-
|
|
67
|
-
```yaml
|
|
68
|
-
spec:
|
|
69
|
-
llm:
|
|
70
|
-
provider: openai
|
|
71
|
-
model: gpt-3.5-turbo
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
#### Default Model
|
|
75
|
-
|
|
76
|
-
If no model is specified, the adapter uses `gpt-4o-mini`.
|
|
77
|
-
|
|
78
|
-
### System Prompt
|
|
79
|
-
|
|
80
|
-
The adapter selects the system prompt in this priority order:
|
|
81
|
-
|
|
82
|
-
1. **OpenAI Extension Instructions** (highest priority)
|
|
83
|
-
2. **Spec Role**
|
|
84
|
-
|
|
85
|
-
#### Using OpenAI Extension
|
|
86
|
-
|
|
87
|
-
```yaml
|
|
88
|
-
extensions:
|
|
89
|
-
openai_agents:
|
|
90
|
-
instructions: |
|
|
91
|
-
You are a specialized customer support agent.
|
|
92
|
-
Always be polite and helpful.
|
|
93
|
-
Escalate complex issues to human agents.
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
#### Using Spec Role
|
|
97
|
-
|
|
98
|
-
```yaml
|
|
99
|
-
spec:
|
|
100
|
-
role: You are a helpful assistant
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
### LLM Parameters
|
|
104
|
-
|
|
105
|
-
Configure temperature, max tokens, and other parameters:
|
|
106
|
-
|
|
107
|
-
```yaml
|
|
108
|
-
spec:
|
|
109
|
-
llm:
|
|
110
|
-
provider: openai
|
|
111
|
-
model: gpt-4-turbo
|
|
112
|
-
temperature: 0.8
|
|
113
|
-
maxTokens: 2000
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
**Parameters:**
|
|
117
|
-
- `temperature` (0.0-2.0): Controls randomness. Default: `0.7`
|
|
118
|
-
- `maxTokens`: Maximum tokens in response. Default: model's maximum
|
|
119
|
-
|
|
120
|
-
## Tools and Function Calling
|
|
121
|
-
|
|
122
|
-
### Tool Mapping
|
|
123
|
-
|
|
124
|
-
The OpenAI adapter converts OSSA tools to OpenAI function calling format using the `tools_mapping` extension.
|
|
125
|
-
|
|
126
|
-
#### Basic Tool Mapping
|
|
127
|
-
|
|
128
|
-
```yaml
|
|
129
|
-
extensions:
|
|
130
|
-
openai_agents:
|
|
131
|
-
tools_mapping:
|
|
132
|
-
- ossa_capability: search
|
|
133
|
-
openai_tool_name: web_search
|
|
134
|
-
description: Search the web for information
|
|
135
|
-
parameters:
|
|
136
|
-
type: object
|
|
137
|
-
properties:
|
|
138
|
-
query:
|
|
139
|
-
type: string
|
|
140
|
-
description: The search query
|
|
141
|
-
required: [query]
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
#### Multiple Tools
|
|
145
|
-
|
|
146
|
-
```yaml
|
|
147
|
-
extensions:
|
|
148
|
-
openai_agents:
|
|
149
|
-
tools_mapping:
|
|
150
|
-
- ossa_capability: search
|
|
151
|
-
openai_tool_name: web_search
|
|
152
|
-
description: Search the web
|
|
153
|
-
parameters:
|
|
154
|
-
type: object
|
|
155
|
-
properties:
|
|
156
|
-
query:
|
|
157
|
-
type: string
|
|
158
|
-
required: [query]
|
|
159
|
-
|
|
160
|
-
- ossa_capability: calculate
|
|
161
|
-
openai_tool_name: calculator
|
|
162
|
-
description: Perform mathematical calculations
|
|
163
|
-
parameters:
|
|
164
|
-
type: object
|
|
165
|
-
properties:
|
|
166
|
-
expression:
|
|
167
|
-
type: string
|
|
168
|
-
description: Mathematical expression to evaluate
|
|
169
|
-
required: [expression]
|
|
170
|
-
|
|
171
|
-
- ossa_capability: get_weather
|
|
172
|
-
openai_tool_name: weather_api
|
|
173
|
-
description: Get current weather for a location
|
|
174
|
-
parameters:
|
|
175
|
-
type: object
|
|
176
|
-
properties:
|
|
177
|
-
location:
|
|
178
|
-
type: string
|
|
179
|
-
description: City name or coordinates
|
|
180
|
-
units:
|
|
181
|
-
type: string
|
|
182
|
-
enum: [celsius, fahrenheit]
|
|
183
|
-
default: celsius
|
|
184
|
-
required: [location]
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
### Tool Parameters
|
|
188
|
-
|
|
189
|
-
Tool parameters follow the JSON Schema format:
|
|
190
|
-
|
|
191
|
-
```yaml
|
|
192
|
-
parameters:
|
|
193
|
-
type: object
|
|
194
|
-
properties:
|
|
195
|
-
param_name:
|
|
196
|
-
type: string | number | boolean | array | object
|
|
197
|
-
description: Parameter description
|
|
198
|
-
enum: [value1, value2] # Optional: restrict to specific values
|
|
199
|
-
default: default_value # Optional: default value
|
|
200
|
-
required: [param1, param2] # Optional: required parameters
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
**Supported types:**
|
|
204
|
-
- `string` - Text values
|
|
205
|
-
- `number` - Numeric values (integers or floats)
|
|
206
|
-
- `boolean` - True/false values
|
|
207
|
-
- `array` - Lists of values
|
|
208
|
-
- `object` - Nested objects
|
|
209
|
-
|
|
210
|
-
### Tool Naming
|
|
211
|
-
|
|
212
|
-
If `openai_tool_name` is not provided, the adapter uses `ossa_capability` as the tool name:
|
|
213
|
-
|
|
214
|
-
```yaml
|
|
215
|
-
extensions:
|
|
216
|
-
openai_agents:
|
|
217
|
-
tools_mapping:
|
|
218
|
-
- ossa_capability: my_tool
|
|
219
|
-
# openai_tool_name defaults to "my_tool"
|
|
220
|
-
description: My tool
|
|
221
|
-
parameters:
|
|
222
|
-
type: object
|
|
223
|
-
properties: {}
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
### Spec Tools
|
|
227
|
-
|
|
228
|
-
The adapter also supports tools defined in `spec.tools`:
|
|
229
|
-
|
|
230
|
-
```yaml
|
|
231
|
-
spec:
|
|
232
|
-
tools:
|
|
233
|
-
- type: function
|
|
234
|
-
name: simple_tool
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
These are converted to OpenAI functions with default parameters.
|
|
238
|
-
|
|
239
|
-
## Conversation Management
|
|
240
|
-
|
|
241
|
-
### Initialization
|
|
242
|
-
|
|
243
|
-
The adapter initializes conversations with a system message:
|
|
244
|
-
|
|
245
|
-
```typescript
|
|
246
|
-
adapter.initialize();
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
This sets up the conversation with:
|
|
250
|
-
1. System message (from instructions or role)
|
|
251
|
-
2. Empty message history
|
|
252
|
-
|
|
253
|
-
### Message History
|
|
254
|
-
|
|
255
|
-
The adapter maintains full conversation history:
|
|
256
|
-
|
|
257
|
-
```
|
|
258
|
-
[System] You are a helpful assistant
|
|
259
|
-
[User] What is the weather?
|
|
260
|
-
[Assistant] [Tool Call: get_weather]
|
|
261
|
-
[Tool] Weather: Sunny, 72°F
|
|
262
|
-
[Assistant] The weather is sunny and 72°F
|
|
263
|
-
[User] What about tomorrow?
|
|
264
|
-
[Assistant] ...
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
### Chat Method
|
|
268
|
-
|
|
269
|
-
Send messages and get responses:
|
|
270
|
-
|
|
271
|
-
```typescript
|
|
272
|
-
const response = await adapter.chat('Hello', {
|
|
273
|
-
verbose: true,
|
|
274
|
-
maxTurns: 10
|
|
275
|
-
});
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
**Options:**
|
|
279
|
-
- `verbose` (boolean): Show tool calls and execution details
|
|
280
|
-
- `maxTurns` (number): Maximum tool call iterations (default: 10)
|
|
281
|
-
|
|
282
|
-
## Tool Execution
|
|
283
|
-
|
|
284
|
-
### Default Behavior
|
|
285
|
-
|
|
286
|
-
Without custom handlers, tools return placeholder responses:
|
|
287
|
-
|
|
288
|
-
```
|
|
289
|
-
Tool 'tool_name' executed with args: {"param": "value"}
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
### Custom Tool Handlers
|
|
293
|
-
|
|
294
|
-
Register custom handlers for tool execution:
|
|
295
|
-
|
|
296
|
-
```typescript
|
|
297
|
-
import { OpenAIAdapter } from '@bluefly/openstandardagents';
|
|
298
|
-
|
|
299
|
-
const adapter = new OpenAIAdapter(manifest);
|
|
300
|
-
adapter.initialize();
|
|
301
|
-
|
|
302
|
-
// Register handler
|
|
303
|
-
adapter.registerToolHandler('web_search', async (args) => {
|
|
304
|
-
const { query } = args;
|
|
305
|
-
// Perform actual search
|
|
306
|
-
const results = await searchWeb(query);
|
|
307
|
-
return JSON.stringify(results);
|
|
308
|
-
});
|
|
309
|
-
|
|
310
|
-
// Use the agent
|
|
311
|
-
const response = await adapter.chat('Search for OSSA');
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
### Error Handling
|
|
315
|
-
|
|
316
|
-
Tool execution errors are caught and returned to the agent:
|
|
317
|
-
|
|
318
|
-
```typescript
|
|
319
|
-
adapter.registerToolHandler('risky_tool', async (args) => {
|
|
320
|
-
throw new Error('Something went wrong');
|
|
321
|
-
});
|
|
322
|
-
|
|
323
|
-
// Agent receives: "Error executing risky_tool: Something went wrong"
|
|
324
|
-
```
|
|
325
|
-
|
|
326
|
-
### Unknown Tools
|
|
327
|
-
|
|
328
|
-
If a tool is called but not registered:
|
|
329
|
-
|
|
330
|
-
```
|
|
331
|
-
Error: Tool 'unknown_tool' not found
|
|
332
|
-
```
|
|
333
|
-
|
|
334
|
-
## Advanced Features
|
|
335
|
-
|
|
336
|
-
### Guardrails
|
|
337
|
-
|
|
338
|
-
Configure safety limits and constraints:
|
|
339
|
-
|
|
340
|
-
```yaml
|
|
341
|
-
extensions:
|
|
342
|
-
openai_agents:
|
|
343
|
-
guardrails:
|
|
344
|
-
enabled: true
|
|
345
|
-
max_tool_calls: 10
|
|
346
|
-
timeout_seconds: 300
|
|
347
|
-
```
|
|
348
|
-
|
|
349
|
-
**Note:** Guardrails are defined in the manifest but enforcement depends on the implementation.
|
|
350
|
-
|
|
351
|
-
### Memory Configuration
|
|
352
|
-
|
|
353
|
-
Configure conversation memory:
|
|
354
|
-
|
|
355
|
-
```yaml
|
|
356
|
-
extensions:
|
|
357
|
-
openai_agents:
|
|
358
|
-
memory:
|
|
359
|
-
enabled: true
|
|
360
|
-
type: session
|
|
361
|
-
max_messages: 50
|
|
362
|
-
```
|
|
363
|
-
|
|
364
|
-
**Memory types:**
|
|
365
|
-
- `session` - In-memory for the current session
|
|
366
|
-
- `persistent` - Saved across sessions (requires implementation)
|
|
367
|
-
|
|
368
|
-
### Max Turns
|
|
369
|
-
|
|
370
|
-
Prevent infinite loops with max turns:
|
|
371
|
-
|
|
372
|
-
```bash
|
|
373
|
-
ossa run agent.ossa.yaml --max-turns 20
|
|
374
|
-
```
|
|
375
|
-
|
|
376
|
-
When max turns is reached:
|
|
377
|
-
```
|
|
378
|
-
Max turns reached without completion
|
|
379
|
-
```
|
|
380
|
-
|
|
381
|
-
## API Integration
|
|
382
|
-
|
|
383
|
-
### OpenAI SDK
|
|
384
|
-
|
|
385
|
-
The adapter uses the official OpenAI SDK:
|
|
386
|
-
|
|
387
|
-
```typescript
|
|
388
|
-
import OpenAI from 'openai';
|
|
389
|
-
|
|
390
|
-
const client = new OpenAI({
|
|
391
|
-
apiKey: process.env.OPENAI_API_KEY
|
|
392
|
-
});
|
|
393
|
-
```
|
|
394
|
-
|
|
395
|
-
### API Calls
|
|
396
|
-
|
|
397
|
-
Each chat interaction makes one or more API calls:
|
|
398
|
-
|
|
399
|
-
1. **Initial call** - Send user message
|
|
400
|
-
2. **Tool calls** - If the model requests tools
|
|
401
|
-
3. **Follow-up call** - Send tool results back
|
|
402
|
-
4. **Repeat** - Until response or max turns
|
|
403
|
-
|
|
404
|
-
### Rate Limits
|
|
405
|
-
|
|
406
|
-
Be aware of OpenAI rate limits:
|
|
407
|
-
- Requests per minute (RPM)
|
|
408
|
-
- Tokens per minute (TPM)
|
|
409
|
-
- Tokens per day (TPD)
|
|
410
|
-
|
|
411
|
-
Use `--max-turns` to limit API calls.
|
|
412
|
-
|
|
413
|
-
## Examples
|
|
414
|
-
|
|
415
|
-
### Basic Chat Agent
|
|
416
|
-
|
|
417
|
-
```yaml
|
|
418
|
-
apiVersion: ossa/v0.2.4
|
|
419
|
-
kind: Agent
|
|
420
|
-
metadata:
|
|
421
|
-
name: chat-agent
|
|
422
|
-
version: 1.0.0
|
|
423
|
-
spec:
|
|
424
|
-
role: You are a friendly chat assistant
|
|
425
|
-
llm:
|
|
426
|
-
provider: openai
|
|
427
|
-
model: gpt-4o-mini
|
|
428
|
-
temperature: 0.9
|
|
429
|
-
```
|
|
430
|
-
|
|
431
|
-
### Customer Support Agent
|
|
432
|
-
|
|
433
|
-
```yaml
|
|
434
|
-
apiVersion: ossa/v0.2.4
|
|
435
|
-
kind: Agent
|
|
436
|
-
metadata:
|
|
437
|
-
name: support-agent
|
|
438
|
-
version: 1.0.0
|
|
439
|
-
spec:
|
|
440
|
-
role: You are a customer support agent
|
|
441
|
-
llm:
|
|
442
|
-
provider: openai
|
|
443
|
-
model: gpt-4-turbo
|
|
444
|
-
temperature: 0.7
|
|
445
|
-
extensions:
|
|
446
|
-
openai_agents:
|
|
447
|
-
instructions: |
|
|
448
|
-
You are a customer support agent for TechCorp.
|
|
449
|
-
Help customers with orders, shipping, and returns.
|
|
450
|
-
Always be polite and professional.
|
|
451
|
-
tools_mapping:
|
|
452
|
-
- ossa_capability: order_lookup
|
|
453
|
-
openai_tool_name: get_order
|
|
454
|
-
description: Look up order by ID
|
|
455
|
-
parameters:
|
|
456
|
-
type: object
|
|
457
|
-
properties:
|
|
458
|
-
order_id:
|
|
459
|
-
type: string
|
|
460
|
-
required: [order_id]
|
|
461
|
-
|
|
462
|
-
- ossa_capability: shipping_status
|
|
463
|
-
openai_tool_name: get_shipping
|
|
464
|
-
description: Get shipping status
|
|
465
|
-
parameters:
|
|
466
|
-
type: object
|
|
467
|
-
properties:
|
|
468
|
-
tracking_number:
|
|
469
|
-
type: string
|
|
470
|
-
required: [tracking_number]
|
|
471
|
-
```
|
|
472
|
-
|
|
473
|
-
### Code Assistant
|
|
474
|
-
|
|
475
|
-
```yaml
|
|
476
|
-
apiVersion: ossa/v0.2.4
|
|
477
|
-
kind: Agent
|
|
478
|
-
metadata:
|
|
479
|
-
name: code-assistant
|
|
480
|
-
version: 1.0.0
|
|
481
|
-
spec:
|
|
482
|
-
role: You are a helpful coding assistant
|
|
483
|
-
llm:
|
|
484
|
-
provider: openai
|
|
485
|
-
model: gpt-4-turbo
|
|
486
|
-
temperature: 0.3
|
|
487
|
-
maxTokens: 4000
|
|
488
|
-
extensions:
|
|
489
|
-
openai_agents:
|
|
490
|
-
model: gpt-4-turbo
|
|
491
|
-
instructions: |
|
|
492
|
-
You are an expert programming assistant.
|
|
493
|
-
Help users write, debug, and optimize code.
|
|
494
|
-
Provide clear explanations and examples.
|
|
495
|
-
tools_mapping:
|
|
496
|
-
- ossa_capability: execute_code
|
|
497
|
-
openai_tool_name: run_python
|
|
498
|
-
description: Execute Python code safely
|
|
499
|
-
parameters:
|
|
500
|
-
type: object
|
|
501
|
-
properties:
|
|
502
|
-
code:
|
|
503
|
-
type: string
|
|
504
|
-
description: Python code to execute
|
|
505
|
-
required: [code]
|
|
506
|
-
|
|
507
|
-
- ossa_capability: search_docs
|
|
508
|
-
openai_tool_name: search_documentation
|
|
509
|
-
description: Search programming documentation
|
|
510
|
-
parameters:
|
|
511
|
-
type: object
|
|
512
|
-
properties:
|
|
513
|
-
query:
|
|
514
|
-
type: string
|
|
515
|
-
language:
|
|
516
|
-
type: string
|
|
517
|
-
enum: [python, javascript, typescript, java]
|
|
518
|
-
required: [query, language]
|
|
519
|
-
```
|
|
520
|
-
|
|
521
|
-
### Multi-Tool Agent
|
|
522
|
-
|
|
523
|
-
```yaml
|
|
524
|
-
apiVersion: ossa/v0.2.4
|
|
525
|
-
kind: Agent
|
|
526
|
-
metadata:
|
|
527
|
-
name: multi-tool-agent
|
|
528
|
-
version: 1.0.0
|
|
529
|
-
spec:
|
|
530
|
-
role: You are a versatile assistant with multiple capabilities
|
|
531
|
-
llm:
|
|
532
|
-
provider: openai
|
|
533
|
-
model: gpt-4o
|
|
534
|
-
extensions:
|
|
535
|
-
openai_agents:
|
|
536
|
-
model: gpt-4o
|
|
537
|
-
tools_mapping:
|
|
538
|
-
- ossa_capability: web_search
|
|
539
|
-
description: Search the web
|
|
540
|
-
parameters:
|
|
541
|
-
type: object
|
|
542
|
-
properties:
|
|
543
|
-
query:
|
|
544
|
-
type: string
|
|
545
|
-
required: [query]
|
|
546
|
-
|
|
547
|
-
- ossa_capability: calculator
|
|
548
|
-
description: Perform calculations
|
|
549
|
-
parameters:
|
|
550
|
-
type: object
|
|
551
|
-
properties:
|
|
552
|
-
expression:
|
|
553
|
-
type: string
|
|
554
|
-
required: [expression]
|
|
555
|
-
|
|
556
|
-
- ossa_capability: weather
|
|
557
|
-
description: Get weather information
|
|
558
|
-
parameters:
|
|
559
|
-
type: object
|
|
560
|
-
properties:
|
|
561
|
-
location:
|
|
562
|
-
type: string
|
|
563
|
-
required: [location]
|
|
564
|
-
|
|
565
|
-
- ossa_capability: translate
|
|
566
|
-
description: Translate text
|
|
567
|
-
parameters:
|
|
568
|
-
type: object
|
|
569
|
-
properties:
|
|
570
|
-
text:
|
|
571
|
-
type: string
|
|
572
|
-
target_language:
|
|
573
|
-
type: string
|
|
574
|
-
required: [text, target_language]
|
|
575
|
-
guardrails:
|
|
576
|
-
enabled: true
|
|
577
|
-
max_tool_calls: 15
|
|
578
|
-
timeout_seconds: 300
|
|
579
|
-
memory:
|
|
580
|
-
enabled: true
|
|
581
|
-
type: session
|
|
582
|
-
max_messages: 100
|
|
583
|
-
```
|
|
584
|
-
|
|
585
|
-
## Troubleshooting
|
|
586
|
-
|
|
587
|
-
### API Key Issues
|
|
588
|
-
|
|
589
|
-
**Problem:** `OPENAI_API_KEY environment variable not set`
|
|
590
|
-
|
|
591
|
-
**Solution:**
|
|
592
|
-
```bash
|
|
593
|
-
export OPENAI_API_KEY=sk-your-key-here
|
|
594
|
-
```
|
|
595
|
-
|
|
596
|
-
### Invalid API Key
|
|
597
|
-
|
|
598
|
-
**Problem:** `401 Unauthorized`
|
|
599
|
-
|
|
600
|
-
**Solution:** Check that your API key is valid and has not expired.
|
|
601
|
-
|
|
602
|
-
### Rate Limit Errors
|
|
603
|
-
|
|
604
|
-
**Problem:** `429 Too Many Requests`
|
|
605
|
-
|
|
606
|
-
**Solution:**
|
|
607
|
-
- Wait before retrying
|
|
608
|
-
- Reduce `--max-turns`
|
|
609
|
-
- Use a lower-tier model
|
|
610
|
-
- Upgrade your OpenAI plan
|
|
611
|
-
|
|
612
|
-
### Model Not Found
|
|
613
|
-
|
|
614
|
-
**Problem:** `404 Model not found`
|
|
615
|
-
|
|
616
|
-
**Solution:** Check that the model name is correct:
|
|
617
|
-
- `gpt-4o-mini` ✓
|
|
618
|
-
- `gpt-4-turbo` ✓
|
|
619
|
-
- `gpt-3.5-turbo` ✓
|
|
620
|
-
- `gpt-4` ✓
|
|
621
|
-
|
|
622
|
-
### Tool Call Loops
|
|
623
|
-
|
|
624
|
-
**Problem:** `Max turns reached without completion`
|
|
625
|
-
|
|
626
|
-
**Solution:**
|
|
627
|
-
- Increase `--max-turns`
|
|
628
|
-
- Improve tool descriptions
|
|
629
|
-
- Add better system instructions
|
|
630
|
-
- Check tool handler logic
|
|
631
|
-
|
|
632
|
-
### Token Limit Exceeded
|
|
633
|
-
|
|
634
|
-
**Problem:** `This model's maximum context length is...`
|
|
635
|
-
|
|
636
|
-
**Solution:**
|
|
637
|
-
- Reduce `maxTokens`
|
|
638
|
-
- Use a model with larger context
|
|
639
|
-
- Implement conversation summarization
|
|
640
|
-
- Clear conversation history
|
|
641
|
-
|
|
642
|
-
## Best Practices
|
|
643
|
-
|
|
644
|
-
### 1. Model Selection
|
|
645
|
-
|
|
646
|
-
- Use `gpt-4o-mini` for simple tasks (faster, cheaper)
|
|
647
|
-
- Use `gpt-4-turbo` for complex reasoning
|
|
648
|
-
- Use `gpt-4o` for balanced performance
|
|
649
|
-
|
|
650
|
-
### 2. Temperature Settings
|
|
651
|
-
|
|
652
|
-
- `0.0-0.3` - Deterministic, factual responses
|
|
653
|
-
- `0.4-0.7` - Balanced creativity and consistency
|
|
654
|
-
- `0.8-1.0` - Creative, varied responses
|
|
655
|
-
- `1.0+` - Highly creative (use with caution)
|
|
656
|
-
|
|
657
|
-
### 3. Tool Design
|
|
658
|
-
|
|
659
|
-
- Keep tool descriptions clear and concise
|
|
660
|
-
- Use descriptive parameter names
|
|
661
|
-
- Provide parameter descriptions
|
|
662
|
-
- Mark required parameters
|
|
663
|
-
- Use enums for restricted values
|
|
664
|
-
|
|
665
|
-
### 4. Error Handling
|
|
666
|
-
|
|
667
|
-
- Always handle tool execution errors
|
|
668
|
-
- Return meaningful error messages
|
|
669
|
-
- Log errors for debugging
|
|
670
|
-
- Implement retry logic for transient failures
|
|
671
|
-
|
|
672
|
-
### 5. Cost Optimization
|
|
673
|
-
|
|
674
|
-
- Use `gpt-4o-mini` when possible
|
|
675
|
-
- Set reasonable `maxTokens` limits
|
|
676
|
-
- Limit `max_tool_calls` in guardrails
|
|
677
|
-
- Monitor API usage
|
|
678
|
-
|
|
679
|
-
### 6. Security
|
|
680
|
-
|
|
681
|
-
- Never expose API keys in code
|
|
682
|
-
- Use environment variables
|
|
683
|
-
- Validate tool inputs
|
|
684
|
-
- Sanitize tool outputs
|
|
685
|
-
- Implement rate limiting
|
|
686
|
-
|
|
687
|
-
## See Also
|
|
688
|
-
|
|
689
|
-
- [ossa run Command](/docs/cli/run-command) - CLI reference
|
|
690
|
-
- [Running Agents](/docs/getting-started/running-agents) - Getting started guide
|
|
691
|
-
- [Manifest Reference](/docs/schema-reference/ossa-manifest) - Complete schema
|
|
692
|
-
- [OpenAI Documentation](https://platform.openai.com/docs) - Official OpenAI docs
|
|
693
|
-
- [Migration from OpenAI Swarm](/docs/migration-guides/openai-to-ossa) - Migration guide
|