python-agent-engine

python-agent-engine is a skill for Claude Code, Codex from kennyzir/7deer_skills. It costs 28 tokens per session (407 once invoked), scanned A, original, MIT.

A reusable Python engine for building AI agents with LangChain, a framework for connecting language models to tools and application code. It manages repeated model conversations, tool calls, and displayed reasoning steps.

In plain words
What is it for?
Use it to build Python agents with tool calling, the ReAct pattern—a cycle of reasoning and actions—and support for OpenAI-compatible model services.
Why use it?
It removes the need to write the loop that sends requests, runs tools, collects results, and continues until an answer is ready.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to build Python agents with tool calling, the ReAct pattern—a cycle of reasoning and actions—and support for OpenAI-compatible model services.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kennyzir/7deer_skills/python-agent-engine
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add kennyzir/7deer_skills --skill python-agent-engine
Clone the repo
git clone --depth 1 https://github.com/kennyzir/7deer_skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for python-agent-engine

README.md
[![agentmods](https://agentmods.dev/badge/skills/kennyzir/7deer_skills/python-agent-engine/github.svg)](https://agentmods.dev/skills/kennyzir/7deer_skills/python-agent-engine)
Your own site
<a href="https://agentmods.dev/skills/kennyzir/7deer_skills/python-agent-engine"><img src="https://agentmods.dev/badge/skills/kennyzir/7deer_skills/python-agent-engine/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for python-agent-engine

Your own site · 80×15
<a href="https://agentmods.dev/skills/kennyzir/7deer_skills/python-agent-engine"><img src="https://agentmods.dev/badge/skills/kennyzir/7deer_skills/python-agent-engine.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 407 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 26
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00028 $0.00407
Opus 5.5 $0.00011 $0.00163
Sonnet 5.5 $0.00006 $0.00081
Haiku 4.5 $0.00003 $0.00041

Measured 1mo ago against content hash f196fcca75e0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

python-agent-engine scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (resources/agent_engine.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

python-agent-engine/SKILL.md · 61 lines

What it actually says

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.

Features

  • ReAct Loop: Automatically handles "Reasoning -> Tool Call -> Result -> Answer" process.
  • Thinking Process: Returns structured "Thinking Steps" for UI visualization.
  • Model Agnostic: Works with OpenAI, DeepSeek, or any OpenAI-compatible API.

Installation

  1. Copy resources/agent_engine.py to your project (e.g., src/core/agent_engine.py).
  2. Install dependencies:
    pip install langchain-core langchain-openai python-dotenv
    
  3. Set Environment Variables in your .env file:
    OPENAI_API_KEY=sk-...
    # Optional:
    OPENAI_BASE_URL=https://api.openai.com/v1
    

Usage Example

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())
Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 61 lines · 28 tokens per session scan A f196fcca75e0

Subscribe to this mod's changes

python-agent-engine is a skill published in the GitHub repository kennyzir/7deer_skills (325 stars, last pushed 19d ago), licensed MIT. It adds 28 tokens to every session and 407 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

port-sacred-terminal-ui-to-python

Take a React Window.tsx (or any sacred component) and produce a terminal CLI screen written in Python that uses Simulacrum's Python mirror in scripts/python/sacredcli/. Simulacrum is the sacred CLI framework — the JavaScript half lives in scripts/cli/lib/, the Python half is a one-to-one snakecase mirror.

internet-development/www-sacred · 0 tokens

python

The Vovk.ts Python client — generating a typed Python package from a Vovk API with vovk-python, the py / pySrc templates, TypedDict shapes, JSON + JSON Lines consumption, client-side validation, and PyPI publishing. Use whenever the user wants a typed Python SDK, ongoing Python integration, or PyPI publishing …

finom/vovk · 261 tokens

openai-agents-sdk

OpenAI Agents SDK (Python) development. Use when building AI agents, multi-agent handoffs, function tools, guardrails, sessions, streaming, or tracing with the openai-agents / agents Python package — including Azure OpenAI via LiteLLM. Triggers on imports from agents, uses of Runner.runsync/Runner.runstreamed…

laguagu/claude-code-nextjs-skills · 125 tokens

pennylane

Builds and differentiates PennyLane quantum circuits, hybrid PyTorch or JAX models, molecular VQE and QAOA workflows. Use for variational quantum algorithms, quantum machine learning, simulator validation, and moving validated circuits to provider plugins. For hardware-specific compilation use qiskit or cirq; for…

K-Dense-AI/scientific-agent-skills · 74 tokens

rocm-kernels

Provides guidance for writing and benchmarking optimized Triton kernels for AMD GPUs (MI355X, R9700) on ROCm, targeting HuggingFace diffusers (LTX-Video, SD3, FLUX) and transformers. Core kernels: RMSNorm, RoPE 3D, GEGLU, AdaLN. Includes XCD swizzle, autotune, diffusers integration patterns, and LTX-Video pipeline…

huggingface/kernels · 93 tokens

holoscan-install-wheel

Install Holoscan SDK Python wheel via pip into a venv. Use for Python installs; not for native C++/apt or Conda installs.

NVIDIA/skills · 37 tokens