Memory, traces, and feedback loops for agents you can actually trust at work.
Auxten Wang · Technical Director @ ClickHouse · 16 Sep 2026
@auxten · auxten.com
What I bought was not code. It was six expensive lessons.
My agent once wrote a social reply that earned 50+ likes. I understood every word.
I had no idea why people loved it.
Change one import. Existing pandas code should behave the same—while ClickHouse does the heavy work underneath.
# before
import pandas as pd
# after
import chdb.datastore as pd
result = (
pd.read_parquet("sales.parquet")
.query("amount > 1000")
.groupby("region")
.sum()
)
A test fails because row order differs. The fastest way to green?
actual.sort_values(...)
expected.sort_values(...)
assert_equal(actual, expected)
The incompatible behavior is now hidden.
Never normalize away a difference. Fix it—or mark an explicit, reviewed XFAIL.
Knows the history. Knows every workaround. Eventually learns to step around every rough edge.
No project context. Asked to be critical, rational, and evidence-driven. Sees what insiders stopped seeing.
Creators and reviewers need different context.
Agents write artifacts to disk. The next agent reads only what it needs.
APPROVE · REJECT · ESCALATE are structured—not guessed from prose.
Keep the right knowledge across runs.
Record what happened and why.
Turn failures into better behavior.
Every lesson survived a switch of agent framework.
Days of architecture decisions, rejected ideas, naming rules, and weird edge cases…
Then the next agent starts from a README.
# Things to remember
- User likes vegetarian food
- Use Firebase for new apps
- Never use approach B
- Prefer short reports
- Temporary workaround...
- Another exception...
- Another rule...
becomes a permanent identity: “the user never eats meat.”
keeps returning in every architecture review.
Working memory · current task state
Episodic memory · what happened and when
Semantic memory · reviewed facts and decisions
Think of it as SQLite for analytical data: one package, no database server.
pip install chdb
memory = recall(task, project, user)
Bugs, deployments, scheduled jobs, reports—everything landed in one chat.
No run record. No owner. No final state.
Before any model call, persist the task and return an acknowledgement.
Every run ends as success, failure, timeout, or cancelled.
Microsoft Foundry tracing, Application Insights, or Langfuse. Debug one run.
Agent 365 + Entra Agent ID. Inventory, access, activity, lifecycle.
Your own SQL and evaluations. Find patterns across thousands of runs.
Instrument once.
Choose the views you need.
I opened one bad run and saw the missing context, failed tool call, retries, latency, and token cost.
Then I stopped debugging one run at a time.
SELECT tool, countIf(status='error')
FROM spans GROUP BY tool;
SELECT skill, sum(tokens)
FROM spans GROUP BY skill;
SELECT quantile(0.95)(latency_ms)
FROM spans WHERE name='memory.recall';
Columnar storage makes repetitive span attributes cheap.
Keep hot detail. Aggregate older runs. Apply explicit TTLs.
Remove secrets, credentials, and personal data before export.
Collect traces and outcomes.
Hallucinations, loops, weak decisions.
Rules, skills, tests, prompts.
Periodic, evidence-driven, reviewable.
The supervisor catches laziness, hallucinations, and fake tests—but never approves irreversible actions for itself.
One read-only agent checks ads, analytics, subscriptions, releases, and model errors.
Its real job is to tell me whether to panic.
3 medium anomalies.
engagedSessions ↓72%
but sessions, users, and events are normal.
Likely a tracking artifact—not an outage.
Did the answer follow evidence?
Did policy hold under pressure?
Did the actual task succeed?
One rule classified install timestamps as a no-op before the catch-all restart rule.
Rules and skills change only through reviewable diffs.
Each agent gets its own identity and least privilege.
A solo setup is not a 5,000-agent tenant design.
Do this before adding another agent.
Memory needs retrieval, lifecycle, and provenance.
Every run needs identity, spans, and a final state.
Failures should become evaluations and reviewed changes.
Prompt engineering is the entry ticket.
System engineering is the moat.
@auxten · auxten.com