Registry / llm-agents / genagent

genagent

JSON →
library0.4.1pypypi✓ verified 85d ago

A Python library providing utilities for generative agent tasks, including LLM interactions and agent memory. Current version 0.4.1, requires Python >=3.8. Development is active with recent updates.

pip install genagent
INSTALL
IMPORT
SIG · GENAGENT
G
genagent
llm-agentspythonv0.4.1
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.

Agent
from genagent import Agent
from genagent.agent import Agent
Agent is exported from the top-level package, not a submodule.
LLMClient
from genagent import LLMClient
LLMClient is a top-level export.
Memory
from genagent import Memory
from genagent.memory import Memory
Memory is exported from the top-level package.

Initialize a generative agent with an LLM client and memory, then run a query.

from genagent import Agent, LLMClient, Memory memory = Memory() client = LLMClient(api_key=os.environ.get('OPENAI_API_KEY', '')) agent = Agent(client=client, memory=memory) response = agent.run("What is the capital of France?") print(response)
Debug
Known issues
breakingIn version 0.4.0, the 'Agent' class was moved from genagent.agent to the top-level package. Code using 'from genagent.agent import Agent' will break.
fix
Use 'from genagent import Agent' instead.
affects: >=0.4.0
gotchaThe Memory class is not automatically persisted. If you need long-term memory, you must implement your own persistence layer or use the optional persistence feature with a file path.
fix
Pass a persistence file: Memory(persistence_file='/path/to/memory.json')
affects: all
deprecatedThe 'genagent.tools' module is deprecated since 0.4.0 and will be removed in a future release. Use the top-level 'genagent.tools' as a package instead.
fix
Migrate to using 'from genagent import tools'.
affects: 0.4.0+
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'genagent.agent'
Importing from submodule 'genagent.agent' which was removed in 0.4.0.
fix
Change import to 'from genagent import Agent'
AttributeError: 'Memory' object has no attribute 'save'
Trying to save memory manually, but Memory does not have a save method; use persistence_file at initialization.
fix
Initialize Memory with persistence_file='/path/to/memory.json' and it will auto-save.
TypeError: __init__() got an unexpected keyword argument 'api_key'
Incorrect initialization of LLMClient; the parameter name might have changed in newer versions.
fix
Check the latest docs: use 'api_token' or 'auth_token' depending on version. In 0.4.1, use 'api_key' as shown.
Upgrade
Version history
0.4.1latest on PyPI · released Dec 17, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
16 hits · last 30 days
node
14
Amazon
1
OpenAI (training)
1
Resources
genagent — pip install genagent · libregistry