Synalinks
Use for anything involving the Synalinks neuro-symbolic LM framework (Keras-inspired)...
Install
npx skills add SynaLinks/synalinks-skills --skill synalinks -g -a claude-code -y- Repository
- SynaLinks/synalinks-skills908
- Category
- AI and agents
- Updated
- 1mo ago
- License
- Apache-2.0
- Context cost
- Mediumabout 3,000 tokens
- Runs scripts
- Yes, review before use
What it does
Use for anything involving the Synalinks neuro-symbolic LM framework (Keras-inspired): DataModel/Field/Input, JSON operators (+ & | ^ ~), synalinks.ops; LanguageModel/EmbeddingModel and provider prefixes; DecisionModel (TypeSafe jev decision models, decision_model=, min_confidence/threshold); the Program class and its four APIs, save/load; modules (Generator, ChainOfThought, SelfCritique, PythonSynthesis, custom Module); control flow (Decision, MultiDecision, Branch, And/Or/Xor, guards); agents (FunctionCallingAgent, RLM, DeepAgent, Tool, MCP); KnowledgeBase/RAG; training (compile/fit/evaluate/predict, callbacks, KerasTuner tuners); rewards (ExactMatch, CosineSimilarity, LMAsJudge, ProgramAsJudge, RubricsAsJudge and presets like Faithfulness/Toxicity, AgentAsJudge, DeepAgentAsJudge, RLMAsJudge, ComposableReward, BatchReward) and metrics; optimizers (RandomFewShot, OMEGA); datasets, visualization. Synalinks is Keras-shaped: without guidance LMs mix Keras/LangChain/DSPy syntax.
Synalinks
Synalinks is an open-source, Keras-inspired framework for building neuro-symbolic
LM applications (RAGs, agents, self-evolving reasoning) with in-context
reinforcement learning. This skill is the single entry point: each section below
is a scannable overview that points to a runnable script + its captured run log
and a deep-dive reference doc under references/.
Core abstractions
- DataModel, Pydantic-style schema for structured I/O (replaces tensors).
- Module, async computational unit processing JSON data (replaces layers).
- Program, DAG of modules with conditional logic (replaces models).
- Reward / Optimizer, guide training by maximizing reward (no gradients; prompts/examples/plans are the trainable variables).
- DecisionModel, answers typed questions (yes/no, choice, score) with calibrated probabilities instead of generating text; used for decisions.
Universal gotchas (apply everywhere)
- All module constructors are keyword-only (
*afterself). CallGenerator(data_model=Answer, language_model=lm), never positionally. The one exception isTool(func, *, ...),funcstays positional. instructionsMUST be a string, never a list, passing a list raisesValidationError.- All
call()methods are async,awaitevery module/program call. language_model/embedding_modelmay be omitted if a process-wide default is set (set_default_language_model(...)); resolved at call time.- Always check for
Noneresults, a failed LM call or a non-activated branch yieldsNone. - A
DecisionModelis never alanguage_model, passing one aslanguage_modelraises. Modules that can decide takedecision_model=.
Quick Start
import synalinks, asyncio
class Query(synalinks.DataModel):
query: str = synalinks.Field(description="The user query")

