Add closed loop agent observability tests
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
from active_runtime.app.agent_observability_hooks import AgentObservabilityHooks
|
||||
|
||||
|
||||
def test_agent_observability_closed_loop():
|
||||
hooks = AgentObservabilityHooks()
|
||||
started = hooks.start("user1", "group1", "openclaw")
|
||||
execution_id = started["execution_id"]
|
||||
hooks.delegate(execution_id, "hermes")
|
||||
hooks.delegate(execution_id, "codex")
|
||||
hooks.tokens(execution_id, 100, 200)
|
||||
result = hooks.finish(execution_id)
|
||||
|
||||
record = result["record"]
|
||||
assert record["used_hermes"] is True
|
||||
assert "codex" in record["path"]
|
||||
assert record["total_tokens"] == 300
|
||||
Reference in New Issue
Block a user