Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Knowledge based agents in AI

  • Last Updated : 18 Jul, 2021

Humans claim that how intelligence is achieved-not by purely reflect mechanisms but by process of reasoning that operate on internal representation of knowledge. In AI this techniques for intelligence are present in Knowledge Based Agents.

Knowledge-based agents have explicit representation of knowledge that can be reasoned. They maintain internal state of knowledge, reason over it, update it  and perform actions accordingly. These agents act intelligently according to requirements.

Attention reader! Don’t stop learning now. Get hold of all the important Machine Learning Concepts with the Machine Learning Foundation Course at a student-friendly price and become industry ready.



Knowledge based agents give the current situation in the form of sentences. They have complete knowledge of current situation of mini-world and its surroundings. These agents manipulate knowledge to infer new things at “Knowledge level”.



A knowledge-based system has following features :

Knowledge base (KB): It is the key component of a knowledge-based agent. These deal with real facts of world. It is a mixture of sentences which are explained in knowledge representation language.

Inference Engine(IE): It is knowledge-based system engine used to infer new knowledge in the system.

Actions performed by an agent:

Inference System is used when we want to update some information (sentences) in Knowledge-Based System  and to know the already present information. This mechanism is done by TELL and ASK operations. They include inference i.e. producing new sentences from old. Inference must accept needs when one asks a question to KB and answer should follow from what has been Told to KB. Agent also has a KB, which initially has some background Knowledge. Whenever, agent program is called, it performs some actions.

Actions done by KB Agent:

  1. It TELLS  what it recognized from the environment and what it needs to know to the knowledge base.
  2. It ASKS what actions to do? and gets answers from the knowledge base.
  3. It TELLS the  which action is selected , then agent will execute that action.

Algorithm :

function KB_AGENT (percept) returns an action

KB : knowledge base

t : time ( counter initially 0)

TELL(KB, MAKE_PERCEPT_SENTENCE (percept,t) )

action = ASK(KB, MAKE_ACTION_QUERY (t) )

TELL(KB, MAKE_ACTION_SENTENCE (action,t) )

t = t + 1

return action

If a percept is given, agent adds it to  KB, then it will ask KB for the best action and then tells KB that it has in fact taken that action.

Knowledge Based Agents

A Knowledge based system behavior can be designed in following approaches:-

Declarative Approach: In this  beginning from an empty knowledge base, the agent can TELL sentences one after another till the agent has knowledge of how to work with its environment. This is known as the declarative approach. It stores required information in empty knowledge-based system.

Procedural Approach: This converts required behaviors directly into program code in empty knowledge-based system. It is a contrast approach when compared to Declarative approach. In this by coding behavior of system is designed .

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!