{"id":27012,"library":"genagent","title":"GenAgent","description":"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.","status":"active","version":"0.4.1","language":"python","source_language":"en","source_url":"https://github.com/genagent/genagent","tags":["generative-agents","llm","memory","agent-framework"],"install":[{"cmd":"pip install genagent","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Agent is exported from the top-level package, not a submodule.","wrong":"from genagent.agent import Agent","symbol":"Agent","correct":"from genagent import Agent"},{"note":"LLMClient is a top-level export.","symbol":"LLMClient","correct":"from genagent import LLMClient"},{"note":"Memory is exported from the top-level package.","wrong":"from genagent.memory import Memory","symbol":"Memory","correct":"from genagent import Memory"}],"quickstart":{"code":"from genagent import Agent, LLMClient, Memory\n\nmemory = Memory()\nclient = LLMClient(api_key=os.environ.get('OPENAI_API_KEY', ''))\nagent = Agent(client=client, memory=memory)\nresponse = agent.run(\"What is the capital of France?\")\nprint(response)","lang":"python","description":"Initialize a generative agent with an LLM client and memory, then run a query."},"warnings":[{"fix":"Use 'from genagent import Agent' instead.","message":"In 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.","severity":"breaking","affected_versions":">=0.4.0"},{"fix":"Pass a persistence file: Memory(persistence_file='/path/to/memory.json')","message":"The 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.","severity":"gotcha","affected_versions":"all"},{"fix":"Migrate to using 'from genagent import tools'.","message":"The '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.","severity":"deprecated","affected_versions":"0.4.0+"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Change import to 'from genagent import Agent'","cause":"Importing from submodule 'genagent.agent' which was removed in 0.4.0.","error":"ModuleNotFoundError: No module named 'genagent.agent'"},{"fix":"Initialize Memory with persistence_file='/path/to/memory.json' and it will auto-save.","cause":"Trying to save memory manually, but Memory does not have a save method; use persistence_file at initialization.","error":"AttributeError: 'Memory' object has no attribute 'save'"},{"fix":"Check the latest docs: use 'api_token' or 'auth_token' depending on version. In 0.4.1, use 'api_key' as shown.","cause":"Incorrect initialization of LLMClient; the parameter name might have changed in newer versions.","error":"TypeError: __init__() got an unexpected keyword argument 'api_key'","affected_versions":">=0.4.0"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}