Working of Knowledge-Based Agents