genagent
Python utilities for generative agent tasks, including LLM interactions and agent memory.
What it is and what it does
GenAgent is a Python library that wraps interactions with multiple large language model providers—OpenAI, Anthropic, and Cerebras—behind a unified interface. It simplifies common LLM tasks like text generation, prompt engineering, and structured output extraction. The package also provides agent utilities: memory storage and retrieval, chat session management with system prompts, and modular instruction-based generation for extracting multiple fields from a single LLM call.
The library depends on eight runtime packages, including pydantic for validation, numpy for numerical work, tqdm for progress bars, and python-dotenv for environment configuration. It is designed for developers building agent-like applications that need to maintain context across multiple LLM calls and retrieve relevant memories based on queries. Configuration is handled via environment variables, allowing you to set a default provider and model once rather than passing them to every function call.
Use it for:
- Building chatbot or assistant applications that maintain conversation history and retrieve relevant memories.
- Extracting structured data from unstructured text using modular instruction templates.
- Running parallel LLM experiments using the parallelization utilities.
- Prototyping multi-provider LLM applications without rewriting code for each API.
- Implementing agent systems that need semantic memory search across stored facts.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
GenAgent provides utilities for building applications with large language models, including integrations with OpenAI and Anthropic, agent memory management, chat sessions, and structured output generation.
Yes, with conditions. GenAgent is useful for rapid prototyping of LLM-based agents and offers a clean abstraction over multiple providers. However, maintenance is aging (240 days since last release), the license treatment is unclear in the metadata, and you will need active API keys for OpenAI or Anthropic. Install it if you are building a prototype or internal tool and can tolerate potential lag on dependency updates; avoid it for production systems requiring long-term support guarantees.
Install
genagent on PyPI
pip
pip install genagentuv
uv add genagentpoetry
poetry add genagentInstalling genagent
Before you install
Low install friction with a pure-Python wheel. Maintenance status is aging—last release was 240 days ago—so expect limited active development and potential lag on dependency updates.
License in practice
License treatment is unclear; the description mentions MIT but the metadata lacks SPDX confirmation. Verify the actual license file before relying on this package in proprietary or copyleft contexts.
Quickstart
pip install genagent
from genagent import gen, Agent, ChatSession
response = gen("Tell me a concise joke.")
my_agent = Agent(name="MyAgent")
my_agent.add_memory("The capital of France is Paris.")
chat_session = ChatSession(agent=my_agent, system_prompt="You are helpful.")
assistant_response = chat_session.chat("What is Paris?")
Requires API keys for OpenAI and/or Anthropic; set OPENAI_API_KEY and ANTHROPIC_API_KEY environment variables, or configure DEFAULT_PROVIDER and DEFAULT_MODEL via .env.
Verify before relying
- Whether the MIT license claim in the description is enforced in the actual LICENSE file.
- Current state of repository and whether it is actively maintained or archived.
- Compatibility of pinned versions of openai, anthropic, and cerebras-cloud-sdk with your target Python version.
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 8 — openai, anthropic, cerebras-cloud-sdk, pydantic, numpy, python-dotenv, tqdm, frozendict |
| Maintenance | aging — 240 days since the last release |
| First released | |
| Downloads | 243,043/month — #8,830 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: genagent-0.4.1-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
langmemLangMem provides memory management tools for…
permissive · top 15,000 on PyPI
aider-chatAider is an AI pair programming tool that runs…
permissive · top 5,000 on PyPI
llmLLM is a CLI tool and Python library for…
permissive · top 15,000 on PyPI
opentelemetry-util-genaiProvides standardized instrumentation utilities…
permissive · top 5,000 on PyPI
gllm-inference-binaryProvides inference components and utilities for…
unclear · top 15,000 on PyPI
npmai-agentsAutonomous AI agent framework that executes…
permissive · top 15,000 on PyPI
pyritPyRIT is a framework for security professionals…
permissive · top 15,000 on PyPI
mem0aiMem0 adds a persistent, searchable memory layer…
permissive · top 5,000 on PyPI
pydantic-aiPydantic AI is a Python framework for building…
permissive · top 5,000 on PyPI