By default, the agent do not have any memory of an action succeeding or failing.

In SGOAP, each agents can have its own memory, this is called States.

See here for what states are

States

Adding a state is used in many different ways, the most common would be when an agent picks up an item.

So let's say we have a item that is picked up when the agent touches it.

public class ItemPickUpComponent : MonoBehaviour
{
	public Agent Agent;

	public void OnTriggerEnter(Collider col)
	{
		// Adding a sword
		Agent.States.AddState("Sword", 1);

		// Updating the state and adding or minusing
		Agent.States.ModifyState("Sword", 1);

		// Removing the state
		Agent.States.RemoveState("Sword");
	]
}

Another example could be you if want to see if an agent has completed a certain event before and your game happens to have a boolean in its GameEventController called HasCompletedLevel1.

public class GameEventController : MonoBehaviour
{
	public bool HasCompletedLevel1;
}

// The reason I vote for making a new class is to seperate Agent from App Flow behaviours.
public class AgentEventSystem : MonoBehaviour
{
	public Agent Agent;
	public GameEventController EventController;

	// I don't reccomend using update and instead an Event Driven process but for the sake of easy reading, I've used Update.
	private void Update()
	{
		Agent.States.SetState("CompletedLevel1",EventController.HasCompletedLevel1); 
	}
}

Now in your actions or other classes you can query if an agent has a certain state

var level1Completed = Agent.States.HasState("Completedlevel1");

In a more real world example, I'd make HasCompletedLevel1 more generic

public class GameEventController : MonoBehaviour
{
	public Dictionary<int, bool> LevelStates = new Dictionary<int,bool>();

	public bool LevelCompleted(int level)
	{
		return LevelStates[level];
	}
}

Now your AgentEventSystem code will look more like this.