autobot-provider
Skill47 starsChanged 8 months agoMITView on GitHub
Add new LLM providers to Autobot with proper integration
In this repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- docs/llms.txtllms.txt
- autobot-releaseSkill
- autobot-testSkill
- autobot-toolSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
Add a new ProviderSpec to the PROVIDERS list in src/autobot/providers/registry.cr.
- Distinctive: line 22
Ensure keywords and API URL are correctly specified.
- Very specific: line 25
Update src/autobot/config/schema.cr with provider config if needed.
- Very specific: line 30
Test provider registration in registry_spec.cr.
- Distinctive: line 31
Test API integration (mocked).
- Very specific: line 35
Update docs/providers.md - Add to provider comparison.
- Very specific: line 88
Add to PROVIDERS in src/autobot/providers/registry.cr:
- Distinctive: line 119
Use this skill when:
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Adding a New LLM Provider
Files to Create/Modify
- Create provider implementation:
src/autobot/providers/<name>_provider.cr- Inherit from
HttpProvideror implementProviderinterface
- Register provider:
- Add a new
ProviderSpecto thePROVIDERSlist insrc/autobot/providers/registry.cr. - Ensure keywords and API URL are correctly specified.
- Add a new
- Add configuration schema:
- Update
src/autobot/config/schema.crwith provider config if needed. - Most HTTP providers work automatically if they follow OpenAI compatibility.
- Update
- Create tests:
spec/autobot/providers/<name>_provider_spec.cr- Test provider registration in
registry_spec.cr. - Test API integration (mocked).
- Add documentation:
docs/<name>.md- Provider setup guide.- Update
docs/providers.md- Add to provider comparison.
Provider Implementation Template
# src/autobot/providers/<name>_provider.cr
module Autobot
module Providers
class <Name>Provider < HttpProvider
def initialize(
api_key : String,
api_base : String? = nil,
@model : String = "default-model",
@extra_headers = {} of String => String,
provider_name : String? = nil,
)
super(api_key, api_base)
@gateway = Providers.find_gateway(provider_name, api_key, api_base)
end
def chat(
messages : Array(Hash(String, JSON::Any)),
tools : Array(Hash(String, JSON::Any))? = nil,
model : String? = nil,
max_tokens : Int32 = DEFAULT_MAX_TOKENS,
temperature : Float64 = DEFAULT_TEMPERATURE,
) : Response
# Implement API-specific logic here
# Or call super for OpenAI-compatible APIs
super
end
def default_model : String
@model
end
end
end
endAlternative: Non-HTTP Provider
For providers with non-standard APIs (like AWS Bedrock), inherit directly from Provider:
class BedrockProvider < Provider
# Implement abstract methods directly
# See src/autobot/providers/bedrock_provider.cr for full example
endProviderSpec Registration
Add to PROVIDERS in src/autobot/providers/registry.cr:
ProviderSpec.new(
name: "<name>",
keywords: ["<keyword1>", "<keyword2>"],
display_name: "<Display Name>",
api_url: "https://api.<provider>.com/v1/chat/completions",
)Testing Checklist
- Provider registers correctly in registry
- Configuration schema validates properly
- API calls are mocked in tests
- Error handling works (401, 429, 500 responses)
- User-Agent handling (if provider requires specific UA)
- Interactive setup includes new provider
Documentation Requirements
Each provider doc must include:
- API key acquisition instructions
- Supported models list
- Rate limits and pricing notes
- Special features (if any)
- Example configuration
When to Use
Use this skill when:
- Adding support for a new LLM service
- Integrating a new AI provider API
- Testing provider implementations
- Updating provider documentation
Related Skills: autobot-test
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

