tom-swe
Theory of Mind modeling for Software Engineering assistants
What it is and what it does
TOM-SWE is a Theory of Mind package that augments software engineering agents with user understanding capabilities. It analyzes user behavior, preferences, and working styles through LLM-powered consultation, building a three-tier memory system from session data to user profiles. The package integrates with OpenHands and similar SWE agent frameworks, allowing agents to provide personalized guidance and adapt their behavior based on learned user intent.
The package depends on jinja2, json-repair, litellm, pydantic, python-dotenv, tiktoken, and tqdm to handle templating, LLM communication, configuration, and progress tracking. It requires an external LLM API (configured via litellm credentials) to perform the psychological analysis and consultation generation that drives its core functionality.
Use it for:
- Enhance OpenHands or other SWE agents with automatic user preference learning and personalized task guidance.
- Analyze user session data to extract behavioral patterns and working style insights for agent adaptation.
- Provide consultation recommendations to agents based on learned user psychology and preferences.
- Build user profiles from cleaned session data to enable long-term personalization across multiple interactions.
- Integrate Theory of Mind reasoning into autonomous coding agents for improved task performance.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adds Theory of Mind capabilities to software engineering agents, enabling them to understand and adapt to individual user preferences, working styles, and intent through LLM-powered user modeling and consultation.
No. The repository is archived and marked abandoned, indicating no active maintenance or support. While the package itself has low install friction and a permissive MIT license, the lack of ongoing development creates risk for bug fixes, security updates, and compatibility with evolving dependencies. Use only if you are willing to maintain a fork or accept the possibility of unresolved issues.
Install
tom-swe on PyPI
pip
pip install tom-sweuv
uv add tom-swepoetry
poetry add tom-sweInstalling tom-swe
Before you install
Low friction installation as a pure Python wheel. Maintenance is a concern: the repository is archived and marked abandoned as of the fact sheet date, with no active development despite recent release dates in the metadata.
License in practice
MIT license permits commercial and private use with minimal restrictions, making it freely usable in most contexts.
Quickstart
pip install tom-swe
from tom_swe.tom_module import TomModule
import asyncio
async def demo():
tom = TomModule()
consultation = await tom.consult(
user_id="demo_user",
current_context="User wants to implement a new feature"
)
print(consultation)
asyncio.run(demo())
Requires Python 3.10 or later. Requires LLM API credentials (litellm key and endpoint) configured via .env file to function.
Verify before relying
- Whether the archived repository status means the package is no longer maintained or supported.
- How the three-tier memory system (sessions → analyses → profiles) performs with real user data at scale.
- Compatibility details with specific OpenHands versions or other SWE agent frameworks beyond OpenHands.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 7 — jinja2, json-repair, litellm, pydantic, python-dotenv, tiktoken, tqdm |
| Maintenance | abandoned — 261 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 9,189,321/month — #1,555 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: tom_swe-1.0.3-py3-none-any.whl
Keywords: ai-assistant, llm, psychology, rag, software-engineering, theory-of-mind, user-modeling
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
inspect-sweInspect SWE provides a suite of software…
permissive · top 15,000 on PyPI
mem0aiMem0 adds a persistent, searchable memory layer…
permissive · top 5,000 on PyPI
livekit-plugins-rimeIntegrates Rime speech recognition into…
permissive · top 15,000 on PyPI
mini-swe-agentAn AI agent that solves software engineering…
permissive · top 5,000 on PyPI
openhands-aciProvides tools and interfaces for AI agents to…
permissive · top 5,000 on PyPI
livekit-plugins-anthropicIntegrates Anthropic's Claude models into…
permissive · top 5,000 on PyPI
deepagentsDeep Agents is an opinionated agent harness…
permissive · top 5,000 on PyPI
agent-framework-mem0Integrates Mem0 persistent memory into…
permissive · top 15,000 on PyPI
agentlightningAgent Lightning optimizes AI agents using…
unclear · top 15,000 on PyPI
openhands-workspaceProvides Python and REST APIs for building…
unclear · top 15,000 on PyPI