Agent Has No Secret
Table of Contents
I’m PsiACE. My recent work focuses on Agent and RAG: less metaphysics, more getting the feedback loop working, making systems that can explain themselves clearly, run stably, and be replayed and switched.
- Agent is not a new religion. It’s still engineering practice with events, queues, and CRUD, plus a layer of model collaboration.
- Share one EventBus, connect
agent.*
andhuey.*
events; print every event immediately; finally use a Cascade tree to review causality and timing. - Single-file demo, run immediately: first see events, then see causality, finally see results.
-
I don’t want to discuss “how to draw a complex Agent architecture diagram” anymore. I care more about “how to make systems explain themselves clearly, fail gracefully, and review transparently”.
-
This article comes with a single-file demo: shared bus, strict ReACT, causality and timing combined, immediate observability. Ready to use.
-
Shared EventBus: Agent, ToolExecutor, Storage all publish to the same bus.
-
Strict ReACT: Thought → Action → Action Input → Observation → Final Answer.
-
Causality + Timing: Each user input advances
tick
; each Observation advancestick
;Action → huey.* → Observation
is linked through parent-child relationships. -
Immediate Observability: Print every event in real-time; finally use tree-shaped Cascade Viewer for time-based review.
huey.queue.* / huey.data.*
- No difference: Events, queues, CRUD were already there; just connected models as collaborators.
- No hype: No design that fails when the word “intelligent” is removed; it’s reliable, explainable, and easier to implement.
class EventureMemoryStorage(MemoryStorage): def __init__(self, event_bus: EventBus): def enqueue(self, data, priority=None): super().enqueue(data, priority=priority) self.bus.publish("huey.queue.enqueue", {
def tool_echo(params: dict) -> dict: """Echo back text. Args: {"text": string} Returns: {"ok": bool, "echo": string}""" return {"ok": True, "echo": str(params.get("text", ""))}
resp = client.chat.completions.create(model=model, messages=history) assistant = resp.choices[0].message.content or "" call = extract(assistant) bus.publish("agent.action", {"id": action_id, **call}) # wait for agent.observation(id==action_id) and append as Observation
- Feedback loop first, fancy features later: Get “events → queue → state changes → ReACT” working before optimization.
- Causality and timing are first-class citizens in engineering: tick expresses update cycles; parent-child expresses trigger chains.
- Observability first: When systems can explain themselves, optimization has a foundation.
- Replaceable: Bus is stable, backend can be swapped (memory → Redis), models can be swapped (vendor/version).
Check the code at PsiACE/psiace to get the latest version in demo
folder.
Running Steps
- Configure
.env
(OpenRouter recommended; OpenAI also works) -
python agent_has_no_secret.py
What You’ll See
-
Real-time event stream (with colors):
user.input
,agent.thought
,agent.action
,huey.data.*
,agent.observation
… - A green Final Answer panel
- A tree-shaped Cascade Viewer grouped by tick: under
agent.action
you can see the parent-child hierarchy ofhuey.data.*
andagent.observation
Final Thoughts
I admire engineers who can “explain clearly and make things work”. Agent has no mystery:
- Get the feedback loop working first, then consider fancy features;
- Make causality and costs visible first, then talk about “smarter”.