GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - kelbudiul/twagents: twagents is a framework for building and comparing language model agents with different memory architectures in interactive, text-based environments. It is designed to work with TextWorld and focuses on exploring how working, episodic, and semantic memory influence agent behavior, recall, and decision-making.

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
logs
logs
 
 
memgames
memgames
 
 
notebooks
notebooks
 
 
src
src
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
config.py
config.py
 
 
requirements.txt
requirements.txt
 
 
unified_memory_graph.png
unified_memory_graph.png
 
 
unified_memory_graph_extended.pdf.png
unified_memory_graph_extended.pdf.png
 
 
unified_memory_graph_structured.png
unified_memory_graph_structured.png
 
 
unified_memory_graph_structured_v2.png
unified_memory_graph_structured_v2.png
 
 

Repository files navigation

🧠 twagents

twagents is a framework for building and comparing language model agents with different memory architectures in interactive, text-based environments. It is designed to work with TextWorld and focuses on exploring how working, episodic, and semantic memory influence agent behavior, recall, and decision-making.

Rather than relying solely on fixed context windows, twagents introduces structured memory components that support selective recall, strategic planning, and long-term knowledge accumulation.


šŸ¤– Agent Types

šŸ”¹ Baseline Agent

  • Memory: Working memory only (recent state context).
  • Behavior: Acts based solely on the most recent game output.
  • Use Case: Serves as a minimal memory-free baseline.

šŸ”¹ Retrieval Agent

  • Memory: Episodic memory (vector store of past observations).
  • Behavior: Uses similarity-based recall to recover earlier steps.
  • Use Case: Tests recall-based planning over time.

šŸ”¹ LangMem Agent

  • Memory: Episodic + Semantic memory with tool-assisted recall.
  • Behavior: Uses dedicated memory tools in a ReAct-style loop to retrieve structured past knowledge and facts.
  • Use Case: Models higher-level cognitive memory usage and flexible reasoning.

šŸ“ Project Structure

.
ā”œā”€ā”€ config.py                 # Global settings and constants
ā”œā”€ā”€ requirements.txt          # Required Python packages
ā”œā”€ā”€ logs/                     # Game logs and trace data per agent
│
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ agents/               # Agent definitions and control loops
│   ā”œā”€ā”€ memory/               # Memory storage and retrieval logic
│   ā”œā”€ā”€ game/                 # TextWorld interaction wrapper
│   ā”œā”€ā”€ tools/                # Memory and environment tools callable by agents
│   └── utils/                # Utility functions and formatting
│
ā”œā”€ā”€ notebooks/                # Notebooks for running agents and analysis
│   ā”œā”€ā”€ baseline_runner.ipynb
│   ā”œā”€ā”€ retrieval_runner.ipynb
│   ā”œā”€ā”€ langmem_runner.ipynb
│   └── analysis.ipynb

āš™ļø Getting Started

1. Clone the repository

git clone https://github.com/kelbudiul/twagents.git
cd twagents

2. Create a virtual environment (recommended)

python -m venv venv
source venv/bin/activate  # or venv\Scripts\activate on Windows

3. Install dependencies

pip install -r requirements.txt

4. Set environment variables

Create a .env file in the root directory (or set variables manually) with the following:

OPENAI_API_KEY=your_openai_api_key
LANGCHAIN_API_KEY=your_langchain_api_key
LANGCHAIN_PROJECT=twagents
LANGSMITH_API_KEY=your_langsmith_api_key

These are required for interacting with language models and logging tools (e.g., LangSmith).


🧠 Memory System Overview

Memory Type Purpose Used By
Working Memory Short-term buffer of recent steps All agents
Episodic Memory Chronological trace of past interactions Retrieval, LangMem
Semantic Memory General facts, object properties, and affordances LangMem

šŸŽÆ Project Goals

  • Study the role of structured memory in language agent behavior.
  • Benchmark agents on memory-intensive tasks in controlled environments.
  • Build reusable components for long-term LLM reasoning architectures.

šŸ™‹ Contact

For questions, suggestions, or contributions, please open an issue or submit a pull request.

About

twagents is a framework for building and comparing language model agents with different memory architectures in interactive, text-based environments. It is designed to work with TextWorld and focuses on exploring how working, episodic, and semantic memory influence agent behavior, recall, and decision-making.

Topics

game-playing-agentslangchainlanggraphlangmemlanguage-agentstext-based-gametextworld

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Ɨ600. No cookies required.