skillfed

tom-swe

Theory of Mind modeling for Software Engineering assistants

tom-swe v1.0.3 9.2M downloads/30d#1,555 on PyPI118
Permissive license MIT Abandoned released

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-swe

uv

uv add tom-swe

poetry

poetry add tom-swe

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Topic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Software Development :: Libraries :: Python Modules

Tags

user modeling for AI agentstheory of mind software engineeringpersonalized agent behavioruser preference learning agentsadaptive SWE agent frameworkLLM user psychology analysisagent consultation system
user-modelingagent-frameworkllm-integration

More Python Modules packages

Further reading