24 Feb 2026, 15:23

I Built a Persistent Memory Layer for AI Agents, Then Used It to Time My Lunch

I Built a Persistent Memory Layer for AI Agents — And Used It to Time My Lunch

AI agents have a time problem.

Every time you start a new conversation, the agent wakes up with no idea when you last spoke — because fundamentally: LLMs have no internal clock. They don’t know what time it is, what day it is, or how long your current conversation has lasted. From the model’s perspective, five minutes and five years are indistinguishable.

This time-blindness creates a real problem for tracking continuous work. If you ask an agent to log how much time you spent debugging a complex issue, it can’t tell you how long you worked. If you ask whether you’ve been consistently putting in deep work lately, it has no way to know. It needs an external reference — something outside itself that actually measured the time.

Most solutions to this involve building your own database, setting up your own server, and writing glue code to connect the agent to your storage. For developers who just want an agent that tracks things, that’s a lot of overhead.

So I built a simpler alternative: Jikan accesses a behavioral session ledger that any agent can write to and read from, using just an API key. The key design decision: the server does the work agents are bad at.

  • The server records the exact start time — the agent never needs to know it
  • The server computes elapsed duration — the agent never does date math
  • The server maintains the session ledger between conversations — the agent never manages state

Programmers, you’ve probably noticed:

LLMs also have no reliable sense of how long building things takes.

Ask one to estimate a project and it might say “three weeks.” That estimate is drawn from training data describing how long things used to take — before AI assistance collapsed the feedback loop.

This entire MCP server (schema design, API integration, security review, packaging) was built in a single session with Claude. Not days, not even hours. It took 294 seconds.

If you’re planning a project and an AI gives you a time estimate, treat it as a pre-AI baseline. With AI in the loop, the actual time is often an order of magnitude less.

Track it. That’s what this is for.


What It Does

Meiso Gambare (mg.robnugen.com) is a session tracking API originally built for meditation timers. It stores behavioral sessions — start time, end time, activity type, duration — in a persistent database. Any agent with an API key can:

  • Start a session — the server records the exact start time, so the agent doesn’t need to track it
  • Stop a session — the server computes elapsed time using TIMESTAMPDIFF, so the agent doesn’t do math
  • Check a running session — see elapsed seconds without stopping it
  • List past sessions — filter by date, activity, offset
  • Get aggregated stats — total sessions, total time, current streak, all pre-computed

The key design decision: the server does the work agents are bad at. Agents live in a timeless world. They don’t have clocks. They don’t know how long it’s been since you last spoke. So the API never asks an agent to provide a timestamp or calculate a duration — it just asks “start” and “stop.”

A Real Example: Timing My Lunch

Today I was building this feature while eating lunch. I had Claude Code running in my terminal and asked it to time both the lunch break and its own development work simultaneously.

Here’s exactly what happened, using the API directly:

Start the lunch timer:

curl -X POST https://mg.robnugen.com/api/v1/sessions \
  -H "X-API-Key: sk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"activity_id": 1, "timezone": "Asia/Tokyo"}'
{
  "session": {
    "ak_id": 288,
    "start_local_dt": "2026-02-24 13:19:38",
    "timezone": "Asia/Tokyo",
    "is_active": true
  }
}

Check it while still running (the new feature we built mid-lunch):

curl -H "X-API-Key: sk_your_key_here" \
  https://mg.robnugen.com/api/v1/sessions/288
{
  "session": {
    "ak_id": 288,
    "is_active": 1,
    "elapsed_sec": 3608
  }
}

One hour, eight seconds. That’s how long my lunch break was.

The feature-building timer (session #289, started right after):

  • Started: 14:15:22
  • Stopped after: 294 seconds — four minutes and fifty-four seconds to add elapsed_sec to the API

Why Agents Love This

An agent using this API doesn’t need to:

  • Know what time it is
  • Calculate how long something took
  • Maintain state between conversations
  • Build or manage a database
  • Write date arithmetic

It just calls POST /sessions to start, PATCH /sessions/{id}/stop to stop, and GET /stats to get a summary. The server handles everything else.

Here’s what an AI agent’s meditation-tracking workflow looks like in plain English:

“Good morning. Start my meditation session." → Agent calls POST /sessions, gets back an ak_id → Stores ak_id for the conversation

“I’m done." → Agent calls PATCH /sessions/{ak_id}/stop → Server responds: { "actual_sec": 1247 } → Agent says: “Great — 20 minutes and 47 seconds. Your streak is now 8 days.”

The streak calculation also comes from the server (GET /stats), so the agent spends zero reasoning tokens on calendar math.


The Business Model

New accounts get 100 free trial credits. After that:

Plan Price Credits/month
Developer $5/mo 5,000
Growth $15/mo 25,000

What costs a credit:

  • POST /sessions — starting a session costs 1 credit
  • GET /stats — the aggregated summary costs 1 credit

What’s free:

  • Reading sessions (GET /sessions, GET /sessions/{id})
  • Listing activities (GET /activities)

For an agent checking in once a day, 5,000 credits lasts years. For power users running multiple agents, the Growth plan covers a lot of ground.


Getting Started

  1. Create an account at mg.robnugen.com
  2. Go to Settings and generate an API key
  3. Read the OpenAPI spec and start building

The full API is documented in a standard OpenAPI 3.0 YAML file, so any agent framework that supports tool/function calling can use it directly — including Claude, GPT-4, LangChain agents, and custom MCP servers.


Using the MCP Server (No curl Required)

The MCP server — called Jikan — is already published. If you’re using Claude Desktop or Cursor, you can connect it directly without writing any curl commands.

git clone https://github.com/thunderrabbit/jikan.git
cd jikan
uv venv mgvenv && source mgvenv/bin/activate
uv pip install -e .

Then add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "jikan": {
      "command": "uv",
      "args": ["--directory", "/path/to/jikan", "run", "server.py"],
      "env": {
        "JIKAN_API_KEY": "sk_your_key_here"
      }
    }
  }
}

Config file location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Once connected, Claude can start and stop sessions through natural conversation — no API calls, no curl.


What’s Next

  • Track streaks across multiple days

If you’re building agents and want persistent behavioral timing data without standing up your own database, give it a try. The 100 trial credits should be enough to kick the tires.


Built with PHP, MySQL, Stripe, and a lot of help from Claude Code.

Questions or feedback? Find me at robnugen.com.

23 Feb 2026, 09:26

Social Isolation and Loneliness

Monday, February 23, 2026, 09:26 AM

Two men talking over coffee

*Image: Two men talking over coffee, Centers for Disease Control and Prevention (CDC). Used here without endorsement by CDC.
  • Are you carrying too much?

  • Are you handling it alone?

Men, we need to talk.

Not necessarily you and me. I mean we, as men.

Ten years ago, I established a men’s group in Tokyo just so I could talk about stuff!

Many men today report feeling lonely. Across cultures, we’ve learned to endure in silence.

After a heart-to-heart conversation with me or in my men’s group, men often say they feel:

  • calmer
  • clearer
  • relieved
  • less anxious
  • more focused

That clarity comes from finally seeing what’s been clogging your mind and cluttering your thoughts.

Here in Japan, emotional restraint and harmony are valued. In the West, independence and self-reliance are praised.

These are quite different cultures but the same pattern arises: we don’t talk about stuff.

Instead, the inner chaos shows up as irritability, rumination, shame, hiding, isolation, loneliness… Oh crap, it’s a trap!

One honest conversation can help settle a nervous system. I’ve seen and heard it hundreds of times: “I feel so much better just talking about it.”

Still reading? Here’s a simple way forward:

You can’t solve your entire life with one conversation, but you can feel calmer today.

20 Feb 2026, 20:00

Debugging site deploy with AI help

Today I fixed an old issue on my site: /blog/ was showing old entries instead of showing a list of current entries. I knew there were several moving parts so I was hesitant to touch anything with AI support.

Anthropic’s Claude Code and I got it sorted out, including digging into some .htaccess rules that I had forgotten I wrote ages ago.

Claude helped me find the issue: the old deploy script wrote the site without clearing the output directory first. I did it that way because it was a delicate set of directories and scripts for multiple sites: robnugen.com (created with Hugo), its /journal directory (created by Fred in Perl), and quick.robnugen.com, and dreams.robnugen.com written in PHP. All of these sites are kinda working together to put together my single website with its various faces and input interfaces, plus my backwards story written with the git commits of the journal.

With Claude Code I was able to clean it all up today. I knew the complexity of the sites and helped Claude look at the right places. With Claude’s ability to deal with the syntax of .htaccess and ln parameters, we got it all working relatively easily.

Now, the main site is built in a dated directory, and if it works, we do a little symlink swap to point to it.

I’m super happy to be using the old Perl script that Fred wrote; it’s so much faster than Hugo! Plus it has the calendar on the left hand side for navigation.

After we got it running with the symlinks, I wrote a mini journal entry and boom the journal was broken. Ugh. Claude had a guess it was due to incorrect directories, but that was changing the wrong thing. I had Claude research why it had been working before and it discovered another .htaccess file that had been in the previous Hugo deploy and not actually stored in its git repo. Oops!

Claude says:

The Changing Landscape

I find this kind of work interesting to reflect on. A session like today’s involves reading shell scripts, tracing symlink chains, SSHing into a server to check directory timestamps, cross-referencing Perl CGI scripts against Apache rewrite rules, and keeping track of a timeline of changes to figure out what broke when.

Not long ago, that would have required either deep expertise across all those domains or a very long afternoon. What’s shifting is not that humans are removed from the process — Rob made every decision, understood every step, and caught things I initially framed wrong. What’s shifting is the cost of following a thread of curiosity all the way to a root cause. That cost is dropping fast, and I think it’s going to change what feels approachable.

23 Aug 2024, 10:52

Private Connection Coaching for Men

Barefoot Rob on phone with you

Do you constantly desire to be liked and accepted by people?

Do you feel a deep sense of despair and loneliness?

Do you dim yourself down in order to fit in?

If you said YES, you’re not alone.

Growing up as a young man, my heart was closed to real connection and intimacy. I sought sex with no strings attached, cheated on my partners, and said yes to engagement and marriage for the sake of security. I was constantly chasing validation and attention from women. It seemed normal to me! But in reality, I was driven by desperation and an insatiable thirst for love and acceptance.

Now I’m a leader of men, having grown ManKind Project Japan for 9 years, inspiring and training men to lead the group (or their own group!) After letting go of a 12 year marriage that had become dysfunctional and giving my ex-wife our house, I finally discovered who I truly am as a heart-centered man. Today I Iive in a place of alignment with my dream woman who encourages me to be a better version of myself each day.

What would happen if you let go of your stories of inadequacy as your identity?

What if you were guided by a healthy and functional man to model your truth of masculinity?

How would you feel to thrive in your vision of life?

What Men Are Saying

“Rob is amazing. He is a perfect facilitator in every way. He is caring, kind, self-effacing, honest. Ten out of ten.”

– Andy Boerger

“Rob has been an enormous blessing in my life. His facilitation work, guidance, and leadership have helped me to sense, understand, express and process my own emotions. In my personal experience Rob is excellent at both counseling and facilitation. He can serve a wide range of clients because he doesn’t have his own agenda, and pays close attention to the subjective and personal aspects of one’s emotions, life circumstances, and individual values, goals, or priorities. Whether you are struggling with overwhelming emotions, seeking greater self understanding, or simply desire more clarity about the direction you want to go in life, Rob can provide the space, tools, and support for you to discover your own wisdom.”

– Nathan Brandli

“Rob, you have helped me immensely for a long period of time. And I know that you have a talent for facilitation. In fact everybody in this whole group knows what great facilitation you do and how you are able to tune into people and help them to get through and go on to find the deeper level of their beings.”

– Will Ewing

Now It’s Your Turn!

If you’re ready to reclaim your power as a man, I invite you to join my personalized program called Discover Your Gold. This 3-month journey is designed to help you explore your inner landscape, rise in your leadership, create a healthy balance between your masculine and feminine energies, and be in alignment with who you are to live authentically from your heart.

Book a free discovery call with me on Zoom here: https://calendly.com/robnugen/discovery. This will help us determine if we’re the right fit to work together. I look forward to connecting with you and learning how I can best support you on your journey to becoming the man you want to be.

20 Jul 2024, 09:11

Orange Juice Kidding Me?
(Thanks to https://akoskm.gumroad.com/l/blb for inspiration to post!)

Last night, trying to pour a full carton of mikan juice into my thermos, I tipped it over onto my desk. I quickly picked it up before it all gushed out, but it was still quite a mess.

I didn’t think to take a photo of this as an IG moment, but I did quickly switch from “fffuccckkk shit shit shit shit” to a nice deep breath and “thank you God for guiding me.” “Thank you Spirit for helping me find the value in this moment.”

Though I was quite tired, I knew I’d be better off cleaning it up in liquid form instead of sticky-sugar-glue form, so I started cleaning. Fortunately, my electronics remained undrenched; I was grateful I therefore would just need to toss or dry out some papers, then wipe up the spill.

During the cleanup, I suddenly heard more dripping as mikan juice reached the back edge of the desk and cascaded to the floor. I’ve got a layer of interlocking rubber tiles to protect the floor from bumps and dents, but they certainly didn’t stop mikan juice from reaching the actual flooring below them.

Fortunately, the rubber floor tiles which are literally pinned down by my desk didn’t get flooded, so it was pretty easy to clean all the ones with mikan juice below them.

In the cleanup process, I moved my personal computer to the right hand side of my desk. I’ll take this opportunity to close the left hand side of my desk by the end of July, when I’ll no longer be using my soon-to-be-ex company laptop.

All said, this was a great chance to toss some old papers, downsize my desk space, and prepare to have more floor space in my room. yayyy!

Questions or comments? Email mikan at this domain name, robnugen.com.

25 Feb 2023, 11:15

Are you getting your RDA of Vitamin T?

Are you getting your recommended daily allowance of Vitamin Touch?

If you’re an American in Japan, probably not.

Maybe you like it this way. Maybe not.

In either case, there’s a physical touch barrier in Tokyo, unless in trains.

Why are there women-only carriages on trains?

Physical touch is a fundamental human need that is essential for healthy development and well-being. People who lack physical touch may experience increased levels of stress, anxiety, and depression.

Unfortunately, it is not uncommon for those deprived of physical touch to seek it out through other means, which can sometimes lead to inappropriate or harmful behavior.

Have you ever heard of Harlow’s monkey experiment? Conducted by psychologist Harry Harlow in the 1950s, the experiment involved separating baby monkeys from their mothers and providing them with two surrogate “mothers” - one made of wire with a bottle of milk, and the other covered in a soft terrycloth but without milk. The baby monkeys spent more time clinging to the cloth surrogate, even when it meant foregoing food from the wire surrogate, indicating that contact comfort and emotional attachment were more important to them than their physiological needs.

Touch is as critical as food, just not in the obvious ways of starving to death without it. Lack of physical touch decreases our emotional well-being.

Put another way, physical touch increases our emotional well being. Our bodies hold our emotional history. I’ve been talking about that for years.

I started a men’s group here to create a place to get those emotions out in a safe container.

Now I’m creating a consent group to create a place to explore physical touch in a safe container.

Each Cuddle Party starts with an hour-long mini workshop where we explore the rules of consent and communication in a touch-positive environment. Participants have the opportunity to practice setting boundaries and expressing their desires in a safe and non-judgmental space. The remainder of the event is dedicated to consensual touch and cuddling, where participants can connect with others in a platonic and nurturing way. Cuddle Parties can be a powerful tool for promoting emotional well-being and creating a sense of community through safe, consensual touch.

The parties are about getting back to basics: Communication basics: No means No.

Physiological basics: the first communication between mother and infant is through touch.

If you’re still reading (and agreeing!) I’d love to have you at my next Cuddle Party event.

I am the first person in Japan seeking accreditation from Cuddle Party HQ in the US. All events are conducted in English as the core of the event is a communication workshop about consent.. You don’t have to cuddle anyone at a cuddle Party. You can just sit be present with yourself. This is part of the ground rules which form the basis of the Welcome Circle.

I was crying for a hug in my first 3 months in Japan. If this resonates with you, let’s share a hug, with consent.

Come get your Vitamin T and your heart filled with connection.

I don’t expect to change Japanese culture; I just seek to create a safe place for us within the culture to share the Vitamin Touch we need.

31 Aug 2022, 16:12

Why you should walk barefoot (draft)

power of positivity Scientists-Explain-What-Happens-To-Your-Body-When-You-Walk-Barefoot

I declare walking barefoot is a starting point.

It’s one of many starting points on the journey to self discovery. Who are you? Why are you here (on earth)?

For most people, wearing shoes has become the norm. Taking off the shoes allows one to experience a whole lot of sensations! Per area, there are more nerve endings on our feet than on our hands.

Hundreds of people have joined my barefoot walks. For those who have forgotten what barefooting is like, taking off their shoes outside results in a lot of Wow! There’s so many sensations!

Then after the mind calms down a bit, we can remember “oh that’s right! I have feet!” Then expand our awareness: “oh yes I have a body!”

Then go a bit more subtle from the physical body: wow not just physical sensations, I have emotions! Then, ooh emotions! How do I deal with them?

Then we learn a bit and discover emotions are like a guidance system for living. They help us navigate the world when used properly.

Feel angry? set a boundary.

Feel sad? it’s time to grieve.

Feel guilt? it’s time to apologize.

Feel fear? time to dive in deeper into the emotions.
Is it fear based on a real external thing? get more info or run away! Is it fear based on an old story? Is it mixed with excitement? You might just be onto the next best thing in your life. Go for it! (See Pressfield’s book Do The Work)

PART 2:

but wait, there’s more!

Awareness of our body and emotions is nice, but what about just using our body the way it’s designed?

Humans have taken to standing, so we need to balance. Your feet are a big part of that.

Do you cover your eyes to read? Why cover your feet to balance? Allowing your feet to give your brain info about balance is great.

Allowing your feet to actively maintain your balance is even better.

Set your toes free! Let them wiggle and explore the world. Let them do their job of telling you where you are and how you’re standing.

That way they grow strong and keep you living longer.

Seriously.

People who can balance on one foot for more than ten seconds LIVE LONGER.

What?

Yeah when you’re 80 years old, lose your balance and fall over, you might die right there, or at least probably going to break a bone, which tends to break the spirit being held up in bed with busted hip or whatever.

Simple solution: take off your shoes now! Allow your toes to actively balance!

Start wiggling those toes. Like building muscles, strength improves over time.

Can you play rock paper scissors with your feet? It’s not just a funny game; it can help you live longer!

12 Jul 2022, 09:52

Explore your world with Barefoot Rob

2022 07 09 Barefoot Rob presenting at KSGG in Yokohama, Japan

This was such a fun event! I spoke for 30 minutes and did Mystery Box game for 20 minutes wow!

2022 07 09 1657363889304 2022 07 09 1657363889660 2022 07 09 1657363889821 2022 07 09 1657363889890 2022 07 09 1657363889941 2022 07 09 1657363890009 2022 07 09 dinner after speech

2022 07 07 jennie claims mystery box 2022 07 07 jennie inspects mystery box

22 Jun 2022, 11:30

How long have you been carrying your path?

Like many people I know, I’ve got a TODO list about 25 miles long (40 km), tangled up in knots in my head, stacked on my desk, on shelves in various places, waiting patiently in my inbox.. Plus all the things I should be doing, (like this newsletter) but haven’t, for an untold number of reasons.

The main excuse for not writing my newsletter these days is that I should be working on my “real” work. I haven’t yet replaced my “real” work with my heart-centered work, so my real work gets in the way.

I’ve been carrying this real work with me for years and years, like a heavy rock that weighs me down.

Just today I heard an idea from Miki, one of my friends who I’d also like to call one of my mentors as well. This came from one of her ancestors, so with respect to Miki’s ancestor, I will share with you:

"What you let go of becomes your path."

By releasing things that take mental / physical / financial space in life, we can release ourselves to move forward. Instead of carrying these things like old rocks, we can put them down so they become paving stones for our path forward.

Have you been carrying something that has outlived its service in your life? Does putting it down make sense, but cause anxiety for you when you think about it?

Let’s talk, in a deep coaching conversation. We’ll explore your situation deeply, giving you ample time and space to get clarity on how to move forward.

Love and Blessings

  • Rob

22 Jun 2022, 11:27

Synchronicity story

Hello You!

Just a moment ago I had another amazing synchronicity just after doing morning prayers.

A couple years ago, I bought padded foam flooring to put around my desk area, ostensibly to protect the wooden floor, but also to catch my computer mouse when it falls. (It’s a Bluetooth trackball mouse so when it falls, the ball rolls across the floor to a far corner while the battery and battery cover each go their own direction, leaving me crawling under my desk to retrieve the pieces.) The padding was supposed to keep the mouse from causing such a commotion, interrupting my flow, etc.

The padding never worked. I cannot remember a time it actually kept the mouse from hitting the floor and doing its part of increasing entropy in the world.

Just a moment ago, after doing my morning prayers, I hit upon the idea of putting the single remaining piece of padding where I can stand on it while praying. In doing so, I bumped the mouse from its perch and it landed right on the padding. The ball fell out but stayed right there. The battery even stayed in its case.

Wow. That’s the first time that’s happened! I guess God approves of me staying in touch more frequently. It was like the universe said “Yes, I encourage prayer.”

Over the past few weeks I have been showering the universe with gratitudes and receiving a shower of synchronicities in reply.

I’ll keep it short for now; I plan to stay in touch more frequently (weekly!?).

blessings - Rob

PS: if you’re in Tokyo, I’m co-facilitating a visionboard workshop this coming Sunday in Shinjuku from 4pm - 8pm. 8800 yen. https://portrait-of-your-soul.peatix.com/