Examples
OSSA OpenAPI Extensions - Examples
Complete working examples demonstrating OSSA OpenAPI extensions.
Example Specifications
[object Object]
Basic example showing:
- Root-level
x-ossaandx-agentextensions - Single operation with
x-ossa-capability,x-ossa-autonomy, andx-ossa-llm - Minimal configuration for a simple greeting agent
Use Case: Starting point for new OSSA-compliant agents
[object Object]
Comprehensive worker agent example showing:
- Full
x-ossa-metadatawith governance and compliance - All operation-level extensions (capability, autonomy, constraints, tools, llm)
- Parameter extensions (
X-OSSA-Agent-ID,X-OSSA-Version) - Schema extensions (
x-ossa-capability-schema) - Real-world scenario: Kubernetes troubleshooting agent
Use Case: Production-ready worker agent with full OSSA compliance
[object Object]
Advanced orchestrator agent showing:
- Multi-agent coordination patterns
- Workflow execution capabilities
- Complex input/output schemas
- Orchestrator-specific autonomy and constraints
Use Case: Coordinating multiple specialized agents
Validating Examples
All examples can be validated using the OSSA CLI:
# Validate a specific example ossa validate examples/openapi-extensions/worker-agent-api.openapi.yml --openapi --verbose # Or validate all examples for spec in examples/openapi-extensions/*.openapi.yml; do echo "Validating $spec..." ossa validate "$spec" --openapi done
Integration with OSSA Manifests
These OpenAPI specs complement OSSA agent manifests (.ossa.yaml files):
- OSSA Manifest - Declarative agent definition with full configuration
- OpenAPI Spec with Extensions - API interface with agent metadata
Together they provide a complete picture of agent behavior and external interfaces.
See Also: OpenAPI-Extensions · Quick-Reference