<!-- source: https://deepwiki.com/MervinPraison/PraisonAI/1.2-key-concepts -->

# Key Concepts

- README.md
- api.md
- src/praisonai/README.md

## Purpose and Scope

This document introduces the fundamental concepts and terminology used throughout the PraisonAI framework. It covers the five core building blocks: **Agents**, **Tasks**, **Workflows**, **Tools**, and **Memory**, explaining how these components work together to create autonomous AI systems.

For architectural details about how these components are implemented and interconnected, see [Architecture Overview](/MervinPraison/PraisonAI/1.1-architecture-overview). For detailed implementation specifics, see [Core Agent System](/MervinPraison/PraisonAI/2-core-agent-system), [Execution and Control](/MervinPraison/PraisonAI/3-execution-and-control), [Memory and Knowledge Systems](/MervinPraison/PraisonAI/4-memory-and-knowledge-systems), and [Tool Systems](/MervinPraison/PraisonAI/5-tool-systems).

## Core Component Hierarchy

The following diagram shows how the five core concepts relate to each other and maps them to their primary code implementations:

```

```

**Sources:** [README.md26](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L26-L26) [README.md522-551](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L522-L551) [api.md22-169](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/api.md?plain=1#L22-L169)

## Agent

An **Agent** is an autonomous entity that can reason, use tools, and maintain memory to accomplish goals. It is the primary execution unit in PraisonAI.

### Agent Definition

### Agent Lifecycle

```

```

**Sources:** [README.md522-534](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L522-L534) [api.md31-93](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/api.md?plain=1#L31-L93) [src/praisonai-agents/praisonaiagents/agent/agent.py1-100](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/src/praisonai-agents/praisonaiagents/agent/agent.py#L1-L100)

### Agent Types

**Sources:** [api.md26-169](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/api.md?plain=1#L26-L169) [README.md580-652](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L580-L652)

### Basic Usage Example

```

```

**Sources:** [README.md522-534](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L522-L534) [README.md536-551](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L536-L551)

## Task

A **Task** represents a single unit of work to be accomplished by an agent. Tasks define what needs to be done, the expected output format, and dependencies on other tasks.

### Task Structure

```

```

**Sources:** [api.md214-222](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/api.md?plain=1#L214-L222) [src/praisonai-agents/praisonaiagents/task/task.py1-50](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/src/praisonai-agents/praisonaiagents/task/task.py#L1-L50)

### Task Properties

**Sources:** [README.md1019-1036](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L1019-L1036) [api.md214-222](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/api.md?plain=1#L214-L222)

### Task Execution Flow

Tasks build context from previous task outputs, execute using the assigned agent, and return structured results:

```

```

**Sources:** [README.md779-802](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L779-L802) [README.md1019-1036](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L1019-L1036)

## Workflow

A **Workflow** orchestrates multiple agents and tasks into a coordinated execution pipeline. It supports sequential, parallel, conditional, and looping patterns.

### Workflow Patterns

```

```

**Sources:** [api.md206-226](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/api.md?plain=1#L206-L226) [README.md774-877](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L774-L877)

### Workflow Components

**Sources:** [api.md206-226](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/api.md?plain=1#L206-L226) [README.md811-877](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L811-L877)

### Workflow Definition

```

```

**Sources:** [README.md774-877](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L774-L877) [README.md813-856](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L813-L856)

### YAML Workflow Configuration

Workflows can be defined in YAML files with full feature parity:

**Sources:** [README.md879-1042](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L879-L1042) [README.md1332-1405](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L1332-L1405)

## Tools

**Tools** are functions that agents can call to interact with external systems or perform specific operations. PraisonAI provides 100+ built-in tools and supports custom tool creation.

### Tool Definition

```

```

**Sources:** [api.md172-203](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/api.md?plain=1#L172-L203) [src/praisonai-agents/praisonaiagents/tools/](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/src/praisonai-agents/praisonaiagents/tools/)

### Tool Types Comparison

**Sources:** [api.md172-203](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/api.md?plain=1#L172-L203) [README.md1411-1523](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L1411-L1523)

### Creating Custom Tools

```

```

**Sources:** [api.md172-203](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/api.md?plain=1#L172-L203) [README.md1411-1523](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L1411-L1523)

### MCP Protocol Integration

MCP (Model Context Protocol) enables agents to use external tool servers:

```

```

**Sources:** [README.md1407-1482](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L1407-L1482) [api.md516-526](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/api.md?plain=1#L516-L526)

## Memory

**Memory** enables agents to maintain context across interactions through four distinct memory tiers: short-term, long-term, entity, and episodic memory.

### Memory Architecture

```

```

**Sources:** [api.md236-272](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/api.md?plain=1#L236-L272) [README.md653-709](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L653-L709)

### Memory Tiers

**Sources:** [README.md674-678](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L674-L678) [src/praisonai-agents/praisonaiagents/memory/memory.py1-100](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/src/praisonai-agents/praisonaiagents/memory/memory.py#L1-L100)

### Memory Usage

```

```

**Sources:** [README.md653-709](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L653-L709) [api.md244-272](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/api.md?plain=1#L244-L272)

### Memory Backends

**Sources:** [README.md702-709](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L702-L709) [src/praisonai-agents/praisonaiagents/memory/](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/src/praisonai-agents/praisonaiagents/memory/)

## Knowledge

**Knowledge** is the document ingestion and retrieval system that powers RAG (Retrieval-Augmented Generation). It handles document processing, chunking, embedding, and retrieval.

### Knowledge System Components

```

```

**Sources:** [api.md274-342](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/api.md?plain=1#L274-L342) [README.md274-286](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L274-L286)

### Knowledge vs RAG vs Memory

**Sources:** [README.md270-286](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L270-L286) [api.md236-342](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/api.md?plain=1#L236-L342)

### Knowledge Usage

```

```

**Sources:** [README.md274-286](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L274-L286) [api.md274-305](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/api.md?plain=1#L274-L305)

### RAG Pipeline

The RAG (Retrieval-Augmented Generation) system combines document retrieval with LLM generation:

```

```

**Sources:** [api.md307-342](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/api.md?plain=1#L307-L342) [src/praisonai-agents/praisonaiagents/rag/pipeline.py1-50](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/src/praisonai-agents/praisonaiagents/rag/pipeline.py#L1-L50)

## Integration: How Components Work Together

The following diagram shows a complete execution flow combining all five core concepts:

```

```

**Sources:** [README.md774-877](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L774-L877) [api.md1-530](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/api.md?plain=1#L1-L530)

### Complete Example

This example demonstrates all five concepts working together:

```

```

**Sources:** [README.md774-802](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L774-L802) [README.md522-551](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L522-L551) [README.md653-709](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L653-L709)

### Configuration Resolution

PraisonAI uses a unified parameter resolution system that accepts multiple input formats:

**Sources:** [src/praisonai-agents/praisonaiagents/config/](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/src/praisonai-agents/praisonaiagents/config/) [README.md8](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L8-L8)

## Summary Table: Core Concepts

**Sources:** [api.md1-530](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/api.md?plain=1#L1-L530) [README.md1-2800](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L1-L2800)
