Skip to content

Commit f1ddde2

Browse files
Polish ten-moss README (#458)
Rewrites apps/ten-moss/README.md for a cleaner, more professional read. - Replaces the ASCII pipeline diagram with two GitHub-native Mermaid diagrams (architecture flowchart and per-turn sequence diagram), both verified to render. - Adds a stack-at-a-glance table and converts the Moss delta, latency-breakdown fields, simulate-remote values, and configuration into proper tables. Config defaults are sourced from property.json and MossSessionConfig (including the previously undocumented moss_max_context_chars). - Tightens section structure and wording; no technical content changed. <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/usemoss/moss/pull/458?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. --> --------- Co-authored-by: Harsha Nalluru <harsha.nalluru1997@gmail.com>
1 parent ef03a92 commit f1ddde2

7 files changed

Lines changed: 116 additions & 345 deletions

File tree

apps/ten-moss/BENCHMARK.md

Lines changed: 0 additions & 86 deletions
This file was deleted.

apps/ten-moss/README.md

Lines changed: 114 additions & 106 deletions
Large diffs are not rendered by default.

apps/ten-moss/compare.py

Lines changed: 0 additions & 138 deletions
This file was deleted.

apps/ten-moss/tenapp/property.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@
8888
"moss_top_k": 3,
8989
"moss_alpha": 0.8,
9090
"moss_context_header": "Relevant knowledge from Moss:",
91-
"enable_moss": true,
92-
"moss_simulate_remote_ms": 0
91+
"enable_moss": true
9392
}
9493
},
9594
{

apps/ten-moss/tenapp/ten_packages/extension/main_python/config.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,3 @@ class MainControlConfig(MossSessionConfig):
55
"""Main control config: Moss session fields (moss_*) plus the agent greeting."""
66

77
greeting: str = "Hello, I am your AI assistant."
8-
# Speed showcase: >0 adds an artificial delay before retrieval to imitate a
9-
# remote vector-DB round trip, so the latency Moss saves is audible. 0 = off.
10-
moss_simulate_remote_ms: int = 0

apps/ten-moss/tenapp/ten_packages/extension/main_python/extension.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import asyncio
21
import json
32
import time
43
from typing import Literal
@@ -65,7 +64,6 @@ async def on_init(self, ten_env: AsyncTenEnv):
6564
# Load config from runtime properties
6665
config_json, _ = await ten_env.get_property_to_json(None)
6766
self.config = MainControlConfig.model_validate_json(config_json)
68-
self._moss_sim_ms = self.config.moss_simulate_remote_ms
6967

7068
# Open a Moss session for ambient, session-scoped grounding (best-effort:
7169
# if the session can't open, the agent still runs, just without grounding).
@@ -133,10 +131,6 @@ async def _on_asr_result(self, event: ASRResultEvent):
133131
# grounding failure can never drop the user's turn.
134132
try:
135133
t0 = time.perf_counter()
136-
# Speed showcase: optionally imitate a remote vector-DB round
137-
# trip so the latency Moss saves is audible.
138-
if self._moss_sim_ms:
139-
await asyncio.sleep(self._moss_sim_ms / 1000.0)
140134
context = await self.moss.query_context(event.text)
141135
took_ms = (time.perf_counter() - t0) * 1000.0
142136
# The SDK reports the engine retrieval time on the result
@@ -146,7 +140,7 @@ async def _on_asr_result(self, event: ASRResultEvent):
146140
self._retrieval_ms = float(sdk_ms) if sdk_ms is not None else took_ms
147141
self._last_grounding = context
148142
self._last_sdk_ms = sdk_ms
149-
backend = f"remote-sim(+{self._moss_sim_ms}ms)" if self._moss_sim_ms else "moss(in-process)"
143+
backend = "moss(in-process)"
150144
# Shared tag so this lines up 1:1 with the instrumented memU
151145
# example — grep '[retrieval-latency]' in both agents' logs.
152146
self.ten_env.log_info(

apps/ten-moss/tenapp/ten_packages/extension/main_python/manifest.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@
5353
},
5454
"enable_moss": {
5555
"type": "bool"
56-
},
57-
"moss_simulate_remote_ms": {
58-
"type": "int64"
5956
}
6057
}
6158
}

0 commit comments

Comments
 (0)