Where to plug in new behavior, in order of increasing depth.
Most common extension. Two edits:
- A line in
getSkills(src/skills.metta) so the LLM knows the skill exists. - A
(= (my-skill $arg) ...)definition, either pure MeTTa or apy-call/translatePredicate.
Full walkthrough: tutorial-03-writing-a-custom-skill.md.
Same as above, but the body delegates to src/agentverse.py:
(= (my-remote-skill $arg)
(py-call (agentverse.my_remote_skill $arg)))Full walkthrough: tutorial-06-remote-agentverse-skills.md.
Three touch points:
- New Python module
channels/myadapter.pyimplementingstart_*,getLastMessage,send_message. - A new branch in
initChannels,(receive), and(send $msg)insrc/channels.metta. - New parameters declared via
(= (MY_*) (empty))and bound byconfigure.
Full walkthrough: tutorial-04-adding-a-channel.md.
In src/loop.metta, the main dispatch is:
(if (== (provider) OpenAI)
(useGPT ...)
(if (== (provider) Anthropic)
(py-call (lib_llm_ext.useClaude $send))
(if (== (provider) ASICloud)
(py-call (lib_llm_ext.useMiniMax $send))
(py-call (lib_llm_ext.useAsi1 $send)))))To add a provider:
- Implement a call function in
lib_llm_ext.py(or a new module). - Add a branch to the
ifchain. - Use the new provider name in the
configure provider ...line or via command-lineprovider=....
The agent's identity and values are in memory/prompt.txt. The run-time prompt template that sandwiches it is in getContext in src/loop.metta. Edit carefully — the output-format instruction is what keeps the LLM producing valid skill s-expressions.
In src/memory.metta, the embed function dispatches on embeddingprovider:
(= (embed $str)
(if (== (embeddingprovider) Local)
(py-call (lib_llm_ext.useLocalEmbedding (string-safe $str)))
(useGPTEmbedding (string-safe $str))))To add a new backend, add a branch and implement the Python function.
lib_nal.metta and lib_pln.metta are plain MeTTa files loaded by lib_omegaclaw.metta. Add new rule definitions directly, or swap in a different logic library entirely — the only required surface is whatever operator the LLM invokes through (metta ...).
- reference-internals-loop.md — the loop is the host for all of the above.
- reference-python-bridges.md — bridge conventions.