GOAP - how can you change the state outside of an action?

I know how to make new actions as in having preconditions and effects assigned for each one.
But I’m struggling making a hunger thing where outside of the actions there’s a normal update with a hunger and sleep meter which are running which when they reach a certain value should give the agent a new state of “tired” or “hungry” and then perform the task.

tl;dr, how can you add an effect/ add a state to the agent outside of an action?

I don’t quite understand which bit you’re having problems with… it’s trivial to create a new action of “cook dinner” or “go to bed” when the necessary preconditions of hunger or tiredness are met. Then you re-run the planner to create a new plan for the agent.