Providers¶
NeuroCore injects an LLMProvider into any skill whose SkillMeta sets
requires_llm=True. You configure the provider once; skills stay
provider-agnostic.
Configuration¶
# neurocore.yaml
llm:
provider: anthropic # see table below
model: claude-sonnet-4-6
api_key_env: ANTHROPIC_API_KEY # name of the env var holding the key
# api_key: "sk-..." # or set the key literally (api_key wins over api_key_env)
# base_url: ... # for openai-compatible / ollama / vllm / litellm
max_tokens: 8192
temperature: 1.0
Per-skill overrides go under skills.<name> in neurocore.yaml or in a
blueprint component’s config.
Supported providers¶
|
Backend |
Install |
Notes |
|---|---|---|---|
|
Claude |
(core dep) |
default |
|
OpenAI |
|
set |
|
Google Gemini |
|
|
|
any OpenAI-wire API |
|
requires |
|
local Ollama |
|
default |
|
local vLLM |
|
default |
|
100+ APIs via LiteLLM |
|
routes by |
|
deterministic test double |
(core dep) |
for tests |
ollama, vllm, and openai-compatible all speak the OpenAI chat-completions
wire format, so they share one implementation and need only the openai SDK.
Local models, zero cloud keys¶
llm:
provider: ollama
model: llama3.2
base_url: http://localhost:11434/v1
api_key_env: OLLAMA_API_KEY # Ollama ignores it; any non-empty value works
pip install "neurocore-ai[local]"
ollama serve & ; ollama pull llama3.2
neurocore run blueprints/chat.flow.yaml --data query="Hello"
Using the provider in a skill¶
from neurocore import AsyncSkill, SkillMeta
from neurocore.llm.provider import LLMMessage
class ChatSkill(AsyncSkill):
skill_meta = SkillMeta(name="chat", version="0.1.0",
requires_llm=True, consumes=["query"], provides=["answer"])
async def process(self, context):
resp = await self.llm.complete(
[LLMMessage(role="user", content=context.get("query", ""))]
)
context.set("answer", resp.content)
return context