Working prototype for the agent ttl