Registry / llm-agents / ghostos-moss

ghostos-moss

JSON →
library0.3.7pypypi✓ verified 85d ago

GhostOS Moss is a code-driven Python interface for LLMs, agents, and the GhostOS project. It provides a functional reactive programming model for building AI agents with Python code. Current version 0.3.7, requires Python >=3.10. This package is part of the GhostOS ecosystem and is under active development, with frequent releases on PyPI.

pip install ghostos-moss
INSTALL
IMPORT
SIG · GHOSTOS-MOSS
G
ghostos-moss
llm-agentspythonv0.3.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Moss
✓ from ghostos_moss import Moss
✗ from ghostos.moss import Moss

Initialize a Moss instance, create an agent by subclassing MossAgent, and define a respond method.

from ghostos.moss import Moss from ghostos.agent import MossAgent # Create a Moss instance moss = Moss() # Define a simple agent class MyAgent(MossAgent): def respond(self, user_input: str) -> str: return f"Echo: {user_input}" # Instantiate and run agent = MyAgent() print(agent.respond("Hello"))
Debug
Known issues
breakingIn version 0.3.0, the API for defining actions changed: `moss_function` now requires explicit return type annotations. Without them, the function will not be recognized as an action and may silently fail.
fix
Ensure all functions decorated with `@moss_function` have a return type annotation, e.g., `def my_action() -> str:`.
affects: >=0.3.0
deprecatedThe `MossAction` class from `ghostos.moss.actions` is deprecated since 0.2.5 and will be removed in 0.4.0. Use `@moss_function` decorator instead.
fix
Replace `class MyAction(MossAction): ...` with `@moss_function` decorator on a function.
affects: >=0.2.5, <0.4.0
gotchaImport `MossAgent` from `ghostos.agent`, not from `ghostos.moss`. The agent module is separate and contains the base class for agents.
fix
Use `from ghostos.agent import MossAgent`.
affects: all
Upgrade
Version history
0.3.7latest on PyPI · released Mar 8, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
20
OpenAI (training)
1
Resources
ghostos-moss — pip install ghostos-moss · libregistry