Feature Description
Add first-class SkillLoader adapters for enterprise / cloud-hosted model APIs whose tool-calling wire format differs from the existing five adapters (OpenAI, DeepSeek-compatible, Claude, Gemini, Ollama prompt).
Phase 1 (this issue’s MVP — pick one provider in first PR):
to_bedrock_tool() (or equivalent) for AWS Bedrock Converse / tool-use API — map manifest.yaml parameters to Bedrock’s tool spec (name sanitization, schema shape per AWS docs).
- Tests in
tests/test_loader.py (no live AWS calls; fixture manifests only).
docs/usage/bedrock.md — install (boto3 or skillware[bedrock] extra if added), IAM/credentials, minimal agent loop snippet.
- Optional runnable example under
examples/ + examples/README.md row.
CHANGELOG.md [Unreleased].
Phase 2+ (follow-up issues/PRs — do not bundle in MVP):
- Azure OpenAI (often OpenAI-compatible — document first; adapter only if schema diverges)
- Google Vertex AI (may share Gemini shapes — evaluate reuse vs
to_gemini_tool())
- Cohere tool API (if schema differs materially)
- IBM watsonx / other enterprise endpoints — only with clear demand
Explicit non-goals for this track:
- Per-vendor adapters for OpenAI-compatible APIs (Kimi, GLM, Groq, etc.) — covered by docs issue for
to_openai_tool() + base_url
- New adapters for every local Ollama model name (Hermes, Qwen, …) — use
to_ollama_prompt()
- Running inference inside Skillware — adapters are schema conversion only, same as today
Rationale
Affected paths (optional)
skillware/core/loader.py, tests/test_loader.py, pyproject.toml (optional [bedrock] extra), docs/usage/README.md, docs/usage/bedrock.md, examples/bedrock_*.py, CHANGELOG.md, docs/contributing/ai_native_workflow.md
Implementation Idea
Design principles:
- Mirror existing adapter pattern in
loader.py — static method on SkillLoader, input skill_bundle, output provider-native tool object or dict.
- Reuse
_sanitize_function_tool_name() where provider allows; add _sanitize_bedrock_tool_name() only if AWS rules differ.
- Keep optional SDK deps out of core install —
try/import with clear ImportError message (same as to_gemini_tool()).
- Phased delivery: Bedrock first PR; Azure/Vertex/Cohere as separate issues after validating schema delta.
- No breaking changes to
execute(params) or existing adapters.
Bedrock sketch (illustrative — verify against current AWS Converse API):
# skillware/core/loader.py
@staticmethod
def to_bedrock_tool(skill_bundle: Dict[str, Any]) -> Dict[str, Any]:
manifest = skill_bundle.get("manifest", {})
return {
"toolSpec": {
"name": SkillLoader._sanitize_function_tool_name(manifest.get("name", "")),
"description": manifest.get("description", ""),
"inputSchema": {"json": manifest.get("parameters", {})},
}
}
Tests: Parametrize manifest fixtures (same as existing loader adapter tests); assert key fields present; no network.
Docs: Bedrock guide covers IAM role vs access keys, region, model ID, and that skills still use env_vars for skill keys (Etherscan, etc.) separate from Bedrock credentials.
Risks / how to avoid breaking the repo:
| Risk |
Mitigation |
| Adapter explosion |
One cloud provider per PR; RFC comment on #39-sized changes |
| Optional dep bloat |
[bedrock] extra; not in [all] unless justified |
| Schema drift vs AWS |
Link official AWS docs in bedrock.md; version note in CHANGELOG |
| Duplicate OpenAI-compatible cloud |
Document “use to_openai_tool() + Azure endpoint” before new adapter |
| Example/doc drift |
Run pytest tests/test_registry_docs.py; update usage index |
Acceptance criteria (MVP / Bedrock PR):
Feature Description
Add first-class
SkillLoaderadapters for enterprise / cloud-hosted model APIs whose tool-calling wire format differs from the existing five adapters (OpenAI, DeepSeek-compatible, Claude, Gemini, Ollama prompt).Phase 1 (this issue’s MVP — pick one provider in first PR):
to_bedrock_tool()(or equivalent) for AWS Bedrock Converse / tool-use API — mapmanifest.yamlparametersto Bedrock’s tool spec (name sanitization, schema shape per AWS docs).tests/test_loader.py(no live AWS calls; fixture manifests only).docs/usage/bedrock.md— install (boto3orskillware[bedrock]extra if added), IAM/credentials, minimal agent loop snippet.examples/+examples/README.mdrow.CHANGELOG.md[Unreleased].Phase 2+ (follow-up issues/PRs — do not bundle in MVP):
to_gemini_tool())Explicit non-goals for this track:
to_openai_tool()+base_urlto_ollama_prompt()Rationale
to_openai_tool().Affected paths (optional)
skillware/core/loader.py, tests/test_loader.py, pyproject.toml (optional
[bedrock]extra), docs/usage/README.md, docs/usage/bedrock.md, examples/bedrock_*.py, CHANGELOG.md, docs/contributing/ai_native_workflow.mdImplementation Idea
Design principles:
loader.py— static method onSkillLoader, inputskill_bundle, output provider-native tool object or dict._sanitize_function_tool_name()where provider allows; add_sanitize_bedrock_tool_name()only if AWS rules differ.try/importwith clearImportErrormessage (same asto_gemini_tool()).execute(params)or existing adapters.Bedrock sketch (illustrative — verify against current AWS Converse API):
Tests: Parametrize manifest fixtures (same as existing loader adapter tests); assert key fields present; no network.
Docs: Bedrock guide covers IAM role vs access keys, region, model ID, and that skills still use
env_varsfor skill keys (Etherscan, etc.) separate from Bedrock credentials.Risks / how to avoid breaking the repo:
[bedrock]extra; not in[all]unless justifiedbedrock.md; version note in CHANGELOGto_openai_tool()+ Azure endpoint” before new adapterpytest tests/test_registry_docs.py; update usage indexAcceptance criteria (MVP / Bedrock PR):
SkillLoader.to_bedrock_tool(bundle)implemented and tested offlineinstall_extras.mdif new dependencypytest tests/test_loader.pygreen