This shows you the differences between two versions of the page.
| cognitive_architectures_language_agents [2026/03/24 17:56] – Create page with researched content on CoALA framework agent | cognitive_architectures_language_agents [2026/03/24 17:58] (current) – Create page: CoALA framework - cognitive architectures for language agents agent | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Cognitive Architectures for Language Agents (CoALA) ====== | ====== Cognitive Architectures for Language Agents (CoALA) ====== | ||
| - | The **Cognitive Architectures for Language Agents (CoALA)** framework, | + | The **Cognitive Architectures for Language Agents (CoALA)** framework, |
| - | ===== Formal Agent Definition | + | ===== Overview |
| - | CoALA formalizes | + | As language model-based agents proliferate --- from ReAct to Reflexion to Voyager --- the field lacks a unifying framework to compare, categorize, and design them. CoALA addresses this by proposing |
| $$A = (M_w, M_{lt}, \mathcal{A}_i, | $$A = (M_w, M_{lt}, \mathcal{A}_i, | ||
| - | where $M_w$ denotes | + | where $M_w$ is working memory, $M_{lt}$ |
| - | ===== Memory | + | ===== Memory |
| - | CoALA divides agent memory into short-term | + | CoALA divides agent memory into **working memory** |
| - | **Working Memory** | + | * **Working Memory**: A short-term scratchpad holding the agent' |
| - | + | * **Episodic Memory**: Stores past experiences and events (e.g., "What happened when I tried approach X?"). Enables learning from specific interaction histories. | |
| - | **Long-Term Memory** ($M_{lt}$) is subdivided into three modules: | + | * **Semantic Memory**: Holds factual world knowledge (e.g., |
| - | + | * **Procedural Memory**: Encodes skills and procedures | |
| - | * **Episodic Memory**: Stores | + | |
| - | * **Semantic Memory**: Holds factual world knowledge | + | |
| - | * **Procedural Memory**: Encodes skills and procedures, often as executable | + | |
| ===== Action Spaces ===== | ===== Action Spaces ===== | ||
| - | Actions are partitioned into internal | + | Actions are partitioned into **internal** and **external** categories: |
| - | **Internal Actions** ($\mathcal{A}_i$): | + | === Internal Actions |
| - | * **Retrieval**: | + | * **Retrieval**: |
| - | * **Reasoning**: | + | * **Reasoning**: |
| - | * **Learning**: | + | * **Learning**: |
| - | **External Actions** ($\mathcal{A}_e$): | + | === External Actions |
| - | * **Grounding**: | + | * **Grounding**: |
| - | + | ||
| - | ===== Decision-Making Procedure ===== | + | |
| - | + | ||
| - | The decision procedure $D$ operates as a continuous loop with two alternating stages: | + | |
| - | + | ||
| - | - **Planning Stage**: Iteratively applies reasoning and retrieval actions to propose, evaluate, and select a grounding or learning action. The LLM generates candidate plans, retrieves relevant memories, and scores alternatives. | + | |
| - | - **Execution Stage**: Performs the selected external action, receives environmental feedback, updates working memory with new observations, | + | |
| - | + | ||
| - | This creates the characteristic perceive-think-act cycle that distinguishes agents from single-pass LLM inference. | + | |
| <code python> | <code python> | ||
| - | # Simplified CoALA decision | + | # Simplified CoALA agent loop |
| class CoALAAgent: | class CoALAAgent: | ||
| def __init__(self, | def __init__(self, | ||
| Line 54: | Line 42: | ||
| self.procedural = procedural_mem | self.procedural = procedural_mem | ||
| - | def step(self, observation): | + | def decision_loop(self, observation): |
| self.working_memory.append(observation) | self.working_memory.append(observation) | ||
| - | # Internal actions: | + | |
| - | | + | |
| - | | + | |
| - | self.working_memory.extend([context, past]) | + | |
| - | | + | self.working_memory.append(reasoning) |
| - | plan = self.llm.reason(self.working_memory) | + | |
| - | # External action: grounding | + | result = self.execute(action) |
| - | result = self.execute(plan.action) | + | self.episodic.store(observation, |
| - | # Learning: store experience | + | |
| - | self.episodic.store(observation, | + | |
| return result | return result | ||
| </ | </ | ||
| - | ===== Connections to Cognitive Science | + | ===== Decision Procedures |
| + | |||
| + | CoALA formalizes decision-making as a continuous loop with two stages: | ||
| + | |||
| + | - **Planning Stage**: The agent iteratively applies reasoning and retrieval to propose, evaluate, and select actions. This may involve multi-step deliberation or simple reactive mappings. | ||
| + | - **Execution Stage**: The selected action is performed (grounding or learning), the environment returns new observations, | ||
| + | |||
| + | This distinguishes agents on a spectrum from purely **reactive** (single LLM call maps observation to action) to **deliberative** (multi-step internal planning before acting). | ||
| - | CoALA explicitly builds on classical cognitive architectures, | + | ===== Connections |
| - | This grounding in cognitive science enables | + | CoALA explicitly builds on classical |
| - | ===== Key Insights ===== | + | * **Soar**: Production rules in long-term memory match working memory contents to trigger actions. CoALA replaces symbolic productions with LLM-based reasoning. |
| + | * **ACT-R**: Distinguishes declarative and procedural memory with activation-based retrieval. CoALA' | ||
| + | * **Global Workspace Theory**: Working memory serves as a shared workspace where different modules contribute and compete for attention. | ||
| - | The survey of existing | + | The framework positions LLM agents |
| ===== References ===== | ===== References ===== | ||
| * [[https:// | * [[https:// | ||
| - | * [[https:// | + | * [[https:// |
| - | * [[https:// | + | * [[https:// |
| ===== See Also ===== | ===== See Also ===== | ||