wiring-jev-into-a-local-agent
Educational email agent where Jev picks each message's label, reply need and family flag before drafting.
Overview
This repository is companion code for episode 001 of the Old Nain YouTube series. It is a small local email agent that reads new mail, labels each message, decides whether it needs a reply, and drafts one if so; messages from friends or relatives are flagged instead, because the owner writes those herself. It never sends anything.
The point of the episode is that an agent's judgment calls should not be made by the model that writes replies. Three decisions go to Jev in one request: a Choice for the label from a fixed set, a Noul for whether a reply is needed (compared against a threshold you set), and a Noul for whether the sender is a friend, neighbour or relative. Code combines them, and the drafting model only runs for messages that pass the gate. The README also stresses that state comes first: the agent skips handled messages and answered threads before Jev is asked anything. It is Apache-2.0 and explicitly educational.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Choice | Which label from the fixed set fits this email? | — |
| Yes / no | Does this message need a reply? | yes · no |
| Yes / no | Is this message from a friend, neighbour or relative? | yes · no |
How it works
- Check state: skip handled messages and threads with drafts or replies.
- Ask Jev three questions in one request.
- Code combines answers: flag family, draft replies above threshold.
- A person reviews and sends.
Strengths
- Separates judgment from generation.
- Never sends mail automatically.
- Clear lesson on handling state before decisions.
Caveats
- Educational only; not hardened or tested on real mail.
- Requires a TypeSafe key.
At a glance
- Type
- Project
- Status
- prototype
- Language
- Python
- Runtime
- local agent script
- Has code
- yes
- License
- Apache-2.0
Use cases and integrations
How curated lists describe it
Companion code for Old Nain episode 001: wiring Jev, TypeSafe.
wh000wh000/awesome-jev-live
Frequently asked questions
What does Jev decide?
The email's label, whether it needs a reply, and whether it is from family or friends.
Does it send replies?
No, it only drafts; a person always sends.
Is it production-ready?
No, it is educational code for a video episode.
Related projects
Free Claude Code skill where Jev sorts and Claude writes: classify, pre-route items so Claude reads only unsure ones, and gate tool calls.
ProjectbetaPythonMac app with AI bots running business ops on cloud computers, using TypeSafe for small yes/no calls like risk and which bot takes a job.
ProjectproductionFree 12-notebook course building 13 agent tools with Jev as the fast decider and an LLM as the slow writer, for under $0.20.
ProjectproductionPythonExample of Jev as a before-tool-call risk gate in a Google ADK agent, blocking tools when P(risky) passes a threshold.
ProjectprototypePythonGuide and small prototype for using Jev with Herdr to route tasks to coding agents like Claude, Codex and Hermes under code-owned policy.
ProjectprototypeTwo beginner Python apps using Jev: a message sorter and a support ticket router that send uncertain items to human review.
ProjectprototypePython