Current collected state Current
Observed since 20 Oct, 22:51 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Production-ready boilerplate for common agentic AI patterns in Python
A Python framework for building production-ready AI agents using the GAME pattern (Goals, Actions, Memory, Environment).
pip install agent-patterns-py
Or clone to run the examples:
git clone https://github.com/abdul-moiz-cowlar/agent-patterns.git
cd agent-patterns
uv sync
cp .env.example .env # add your API keys
import os
from agent_patterns import (
Agent, Goal,
PythonEnvironment,
AgentFunctionCallingActionLanguage,
PythonActionRegistry,
register_tool,
make_generate_response,
)
@register_tool(tags=["files"])
def list_files() -> list:
"""List files in the current directory."""
return os.listdir(".")
@register_tool(tags=["files"])
def read_file(name: str) -> str:
"""Read a file and return its contents."""
with open(name) as f:
return f.read()
@register_tool(tags=["system"], terminal=True)
def terminate(message: str) -> str:
"""End the session with a final message."""
return message
agent = Agent(
goals=[
Goal(1, "Explore", "List and read files in the current directory."),
Goal(2, "Terminate", "Call terminate with a summary when done."),
],
agent_language=AgentFunctionCallingActionLanguage(),
action_registry=PythonActionRegistry(tags=["files", "system"]),
generate_response=make_generate_response("openai/gpt-4o"),
environment=PythonEnvironment(),
)
memory = agent.run("What Python files are here and what do they do?")
MIT
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.2.0 | 11 Apr 2026 | 7 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 22:51 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:0ec81b159a55a42f8f1476ca256d944504eeabdfb1a1c3b36c479bdbbbbe4676