mirror of
https://github.com/open-jarvis/OpenJarvis.git
synced 2026-07-30 19:02:16 +00:00
Major changes across parallel sessions: - Add orchestrator SFT & GRPO training subpackage (learning/orchestrator/) with episode types, multi-objective reward, prompt registry, policy model, RL environment, and registered learning policies - Add structured THOUGHT/TOOL/INPUT/FINAL_ANSWER mode to OrchestratorAgent - Add 15 channel backends (Discord, Slack, Telegram, Email, Webhook, IRC, Matrix, Teams, WhatsApp, Signal, Mattermost, BlueBubbles, Feishu, Google Chat, Webchat) with channel tools and config - Add LiteLLM engine backend for unified LLM provider access - Add RLM agent and REPL tool - Remove ToolLearningPolicy — learning taxonomy now only targets Intelligence (LM weights/routing) and Agents (logic/ICL/tool strategies) - Rename SFTPolicy to SFTRouterPolicy (backward-compat alias kept) - Remove OpenClaw agent infrastructure (openclaw*.py, openclaw_bridge.py) - Fix async streaming tests (asyncio.run vs deprecated get_event_loop) - Fix server channel route tests (pytest.importorskip for optional fastapi) - Track uv.lock for reproducibility - Update CLAUDE.md and docs to reflect all changes 1676 tests pass, 37 skipped. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
99 lines
2.2 KiB
Markdown
99 lines
2.2 KiB
Markdown
# Learning Module
|
|
|
|
The learning module implements learning policies that improve routing, agent,
|
|
and tool decisions based on historical interaction outcomes. The module provides
|
|
a `LearningPolicy` ABC taxonomy with specialized sub-ABCs for intelligence
|
|
(model routing), agent behavior, and tool selection. It also includes reward
|
|
functions for scoring inference results.
|
|
|
|
## Abstract Base Classes
|
|
|
|
### RouterPolicy
|
|
|
|
::: openjarvis.intelligence._stubs.RouterPolicy
|
|
options:
|
|
show_source: true
|
|
members_order: source
|
|
|
|
### QueryAnalyzer
|
|
|
|
::: openjarvis.intelligence._stubs.QueryAnalyzer
|
|
options:
|
|
show_source: true
|
|
members_order: source
|
|
|
|
### RoutingContext
|
|
|
|
`RoutingContext` is defined in [`core/types.py`](core.md#openjarvis.core.types.RoutingContext).
|
|
|
|
### RewardFunction
|
|
|
|
::: openjarvis.learning._stubs.RewardFunction
|
|
options:
|
|
show_source: true
|
|
members_order: source
|
|
|
|
### LearningPolicy Taxonomy
|
|
|
|
The learning system defines a hierarchy of learning policy ABCs:
|
|
|
|
- **`LearningPolicy`** -- base ABC for all learning policies
|
|
- **`IntelligenceLearningPolicy`** -- specialization for model routing decisions
|
|
- **`AgentLearningPolicy`** -- specialization for agent behavior advice (ICL examples, tool-use strategies)
|
|
|
|
---
|
|
|
|
## Policy Implementations
|
|
|
|
### TraceDrivenPolicy
|
|
|
|
::: openjarvis.learning.trace_policy.TraceDrivenPolicy
|
|
options:
|
|
show_source: true
|
|
members_order: source
|
|
|
|
### classify_query
|
|
|
|
::: openjarvis.learning.trace_policy.classify_query
|
|
options:
|
|
show_source: true
|
|
|
|
### SFTRouterPolicy
|
|
|
|
::: openjarvis.learning.sft_policy.SFTRouterPolicy
|
|
options:
|
|
show_source: true
|
|
members_order: source
|
|
|
|
### AgentAdvisorPolicy
|
|
|
|
::: openjarvis.learning.agent_advisor.AgentAdvisorPolicy
|
|
options:
|
|
show_source: true
|
|
members_order: source
|
|
|
|
### ICLUpdaterPolicy
|
|
|
|
::: openjarvis.learning.icl_updater.ICLUpdaterPolicy
|
|
options:
|
|
show_source: true
|
|
members_order: source
|
|
|
|
### GRPORouterPolicy
|
|
|
|
::: openjarvis.learning.grpo_policy.GRPORouterPolicy
|
|
options:
|
|
show_source: true
|
|
members_order: source
|
|
|
|
---
|
|
|
|
## Reward Functions
|
|
|
|
### HeuristicRewardFunction
|
|
|
|
::: openjarvis.learning.heuristic_reward.HeuristicRewardFunction
|
|
options:
|
|
show_source: true
|
|
members_order: source
|