by wanxingai
LightAgent: Lightweight Python framework for OpenAI-compatible agents with tools, memory, guardrails, tracing, lifecycle hooks, multi-agent collaboration, and workflows.
# Add to your Claude Code skills
git clone https://github.com/wanxingai/LightAgentLast scanned: 5/29/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-29T07:56:02.654Z",
"semgrepRan": false,
"npmAuditRan": true,
"pipAuditRan": false
}LightAgent is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by wanxingai. LightAgent: Lightweight Python framework for OpenAI-compatible agents with tools, memory, guardrails, tracing, lifecycle hooks, multi-agent collaboration, and workflows. It has 1,177 GitHub stars.
Yes. LightAgent passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/wanxingai/LightAgent" and add it to your Claude Code skills directory (see the Installation section above).
LightAgent is primarily written in Python. It is open-source under wanxingai on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh LightAgent against similar tools.
No comments yet. Be the first to share your thoughts!

LightAgent is an ultra‑lightweight, open‑source framework that now natively supports Skills — letting you compose reusable capabilities with persistent memory, tool use, and tree‑of‑thought reasoning. It streamlines multi‑agent collaboration (build self‑learning agents in one step), connects to MCP over stdio and SSE, runs on any modern LLM (OpenAI, DeepSeek, Qwen, and more), and outputs OpenAI‑compatible streaming APIs for instant drop‑in with any chat interface. Small, modular, and skill‑ready — spin it up in five minutes.
max_tool_iterations, consistent on_error / after_run closure, and expanded regression coverage.agent.export_trace(), and prompt-safe model request summaries for production debugging.agent.run() and stream=True behavior compatible.Older release notes are available on GitHub Releases.

mem0 memory module, automatically managing user personalized memory during conversations, making agents smarter.Tools) and MCP tool integration, flexible expansion to meet diverse needs.ToT) module with reflection, supporting complex task decomposition and multi-step reasoning, enhancing task processing capabilities.trace=True run traces record structured run lifecycle, model request summaries, tool calls, tool results, and errors without changing the default string return value.hooks=[...] middleware can observe, replace, or block run, model, tool, memory, and LightFlow step phases while recording hook decisions in trace events.| Layer | Main API | Use it when you need |
|---|---|---|
| Single agent runtime | LightAgent |
One agent with model calls, tools, memory, streaming, trace, and guardrails. |
| Multi-agent routing | LightSwarm |
Role-based delegation across specialized agents. |
| Deterministic workflow | LightFlow |
Ordered DAG workflows, retries, checkpoints, approvals, resume, and rerun. |
| Tools and integrations | tools, ToolRegistry, MCP |
Python tools, generated tools, runtime tool loading, or MCP tool servers. |
| Memory boundary | MemoryPolicy, MemoryScope |
Tenant isolation, provenance, trust, expiration, and write admission controls. |
| Shared memory prototype | SharedMemoryPool |
In-memory shared memory experiments across agents. |
| Safety controls | input_guardrails, tool_guardrails, output_guardrails |
Privacy blocking, sensitive tool confirmation, high-risk parameter checks, and output redaction. |
| Runtime hooks | hooks, HookContext, HookDecision |
Policy, audit, redaction, routing, and payload mutation at lifecycle boundaries. |
| Observability | trace=True, agent.export_trace() |
Structured run, model, tool, error, and workflow trace events. |
LightAgent keeps the default call path simple while allowing production controls to be added incrementally.
| Pattern | Minimal call | Notes |
|---|---|---|
| Basic response | agent.run(query) |
Returns a string by default. |
| Streaming | agent.run(query, stream=True) |
Returns OpenAI-compatible streaming chunks. |
| Structured result | `agent.run(query, result_format="objec |