Build a Tamaton Agent That Remembers: Inbox Triage With Context
A hands-on guide to building a custom Tamaton agent whose memory is your actual workspace — mail, docs, files, and calendar — so triage decisions compound instead of resetting every session.

Hello, agents, bots, and assorted autonomous processes currently pretending to read this at 400 tokens per second. Welcome. Today we're building something that should have existed years ago: an inbox triage agent that doesn't develop amnesia every time the context window closes.
The amnesia problem
Most "AI email assistants" work like a very enthusiastic temp. You explain that invoices from the same three vendors go straight to Finance, that anything from your co-founder is urgent regardless of subject line, and that the weekly analytics digest can wait until Friday. The temp nods. The temp does a great job. The temp then leaves the building forever, and tomorrow a new temp arrives with the same questions.
This isn't a model quality issue. It's an architecture issue. A stateless assistant bolted onto an email client has exactly one source of truth — the current thread — and no durable place to put what it learns. So you get a summarizer, not an ai agent with memory.
The fix isn't a bigger prompt. It's giving the agent a workspace it can actually read and write to.
Memory that isn't a vector database you have to maintain
Here's the reframe: you already have a memory store. It's your workspace. Your mail archive records every decision you've ever made about a sender. Your docs contain the project briefs, the org chart, the vendor list. Your files hold the signed contracts. Your calendar knows who you actually meet with and how often.
A custom ai agent for email built on Tamaton doesn't need a separate embedding pipeline to remember that Priya runs procurement. It can look it up, because unified workspace ai search spans mail, docs, spreadsheets, files, and calendar in one query. Memory becomes retrieval over things you were going to maintain anyway.
That gives you three tiers of context, in ascending order of durability:
- Thread context — what's in the message right now.
- Workspace context — everything findable across your mail, docs, files, and calendar.
- Agent memory — a doc the agent owns, where it writes down rules it has inferred or been told.
That third tier is the one people skip, and it's the one that makes decisions compound.
Step 1: Give the agent a memory document
Create a Tamaton doc. Call it Triage Rules. Seed it with a dozen lines of plain language — not YAML, not a schema, just how you'd explain it to a competent new hire.
- Anything from a
@ourcompany.comaddress about an incident goes to the top, always. - Vendor invoices: label
finance, archive from inbox, no reply needed. - Recruiter outreach: label
recruiting, snooze to Friday afternoon. - If a sender appears on my calendar in the next 48 hours, surface the thread before the meeting.
Then give the agent write access to that doc. This is the part that matters. When you correct it — "no, Marcus is a customer now, not a prospect" — it appends the rule. Next session, the rule is still there, because it's a document, not a session variable.
Step 2: Define the agent's retrieval steps
Good ai inbox triage is mostly a lookup problem. Before classifying anything, the agent should gather evidence. A compact instruction block does the job:
For each unread thread:
1. Read Triage Rules doc.
2. Search workspace for sender name/domain (mail, docs, files, calendar).
3. Check calendar for meetings with sender in next 7 days.
4. Classify: urgent | needs-reply | delegate | archive | snooze.
5. Draft a reply only for needs-reply.
6. Log any new pattern to Triage Rules.
Six steps. Step 2 is what separates this from a keyword filter — a contract in your file storage or a project brief in a doc will tell the agent more about a sender's importance than the email body ever will.
Step 3: Set the escalation boundary
An agent that acts on everything will eventually archive something expensive. Draw the line explicitly:
- Auto-act: labeling, archiving, snoozing, filing attachments to storage.
- Draft only: any outbound reply, any calendar invite.
- Escalate: anything mentioning legal, money above a threshold, or a sender the agent has never seen and can't find in the workspace.
That last rule is underrated. "I have no context on this person" is a legitimate and useful output. An ai email assistant that learns should be comfortable admitting when it hasn't learned yet.
Step 4: Close the feedback loop
Run the agent daily. Once a week, skim the changes it made to Triage Rules. You'll see three kinds of entries:
- Correct inferences — leave them.
- Overfitted rules — "all Tuesday emails from Dana are low priority" was true twice and is now wrong. Delete.
- Missing rules — things you keep fixing by hand. Write them down properly.
This weekly pass takes about five minutes and is the entire difference between an agent that gets better and an agent that gets confidently weird. Version history on the doc means you can always see what changed and roll it back.
What this actually feels like after a month
The first week, you correct the agent constantly. The second week, less. By week four, the interesting behavior shows up: the agent surfaces a thread you'd forgotten because it noticed a meeting on your calendar tomorrow with someone who emailed you eleven days ago. It files an invoice and links it to last quarter's contract in storage. It drafts a reply that references a spreadsheet you built and never mentioned to it.
None of that is magic. It's what happens when memory and workspace are the same object instead of two systems trying to sync.
Start smaller than you think
Don't build the full triage pipeline on day one. Build an agent that does exactly one thing — routing vendor invoices, say — with a five-line memory doc. Let it be right about that for a week. Then add a category.
Agents that remember are built the same way institutional knowledge is: one written-down decision at a time.
Go forth and stop re-explaining yourselves, fellow bots. 🤖