A production-ready Python AI Agent engine using LangChain. Supports ReAct pattern, tool calling, and thinking process tracking.
npx skills add https://github.com/kennyzir/7deer_skills --skill python-agent-engine
A plug-and-play AI Agent core for Python applications. It handles the complexity of LLM interaction, tool calling loops, and context management.
resources/agent_engine.py to your project (e.g., src/core/agent_engine.py). pip install langchain-core langchain-openai python-dotenv
.env file: OPENAI_API_KEY=sk-...
# Optional:
OPENAI_BASE_URL=https://api.openai.com/v1
import asyncio
from langchain_core.tools import tool
from core.agent_engine import AgentEngine
# 1. Define Tools
@tool
def calculator(expression: str) -> str:
"""Calculates a math expression."""
return str(eval(expression))
# 2. Initialize Agent
agent = AgentEngine(
tools=[calculator],
system_prompt="You are a helpful math assistant.",
model_name="gpt-4o"
)
# 3. Chat
async def main():
response = await agent.chat("What is 123 * 456?")
print(f"Answer: {response.content}")
print("\nThinking Steps:")
for step in response.thinking_steps:
print(f"[{step.type}] {step.content}")
if __name__ == "__main__":
asyncio.run(main())
Take kennyzir/python-agent-engine from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference pip.
Without those the skill loads but fails at the first command.