Micro-Agent

by fdueblabVerified

A lightweight AI agent framework for vertical domain applications | 面向垂域应用的轻量级 AI Agent 框架

101
Stars
18
Forks
Python
Language
8/24/2026
Added
View on GitHubDownload ZIP

⚠️ Third-Party Software Notice

This skill is third-party open-source software developed and hosted independently on GitHub. SkillTip is an informational directory and does not control or maintain the underlying repository. Any security checks displayed are automated and limited in scope. Review the source code before installing.

Read the Terms of Service

Installation

Add to your Claude Code skills directory:

# Add to your Claude Code skills
git clone https://github.com/fdueblab/Micro-Agent

Getting Started

Guides for using skills like Micro-Agent.

Security Report

Verified

Last scanned: —

{
  "status": "PASSED",
  "issues": []
}

README.md

Micro-Agent

Python License LiteLLM MCP

中文 | English


为什么选择 Micro-Agent

如果你需要为特定行业快速构建一个专业 Agent 并以 API 服务形式交付,Micro-Agent 是最短路径。

能力Micro-AgentLangGraphAutoGen¹OpenClaw
开箱即用 API 服务
垂域知识注入 (Skills)
内置 RAG 检索增强生态扩展
MCP 集成
流式 SSE 输出需自建
多 LLM Profile 配置
轻量(核心 <3K 行)

¹ AutoGen 已进入维护模式,新项目建议使用 Microsoft Agent Framework

各框架定位: Micro-Agent 面向垂域专业 Agent 服务交付 · LangGraph 面向复杂多步工作流编排 · AutoGen 面向多角色智能体协作 · OpenClaw 面向个人自主 AI 助手

架构

Architecture

核心组件:

  • LLM Layer — 通过 litellm 统一接口,一套代码切换 OpenAI / DeepSeek / Claude / Ollama 等任意模型
  • Agent Core — ReAct 执行引擎(Think → Act → Observe 循环),支持 SubAgent 子任务分发与 REPL 沙箱执行
  • Memory — 会话记忆系统,支持短期记忆、文件持久化、跨会话恢复
  • Skills — 将领域规范、编码标准等知识注入 Agent 的 system prompt,使其具备专业能力
  • RAG — 从领域知识库中检索相关文档,为推理提供上下文
  • MCP / Tools — 通过 Model Context Protocol 连接外部工具和数据源

快速开始

环境要求

  • Python ≥ 3.11
  • 任意 LLM API Key(OpenAI / DeepSeek / Claude / Ollama / OpenRouter 等)

安装

git clone https://github.com/fdueblab/Micro-Agent.git
cd Micro-Agent

pip install -e ".[dev]"

配置

cp .env.example .env

编辑 .env,填入 API Key:

LLM_MODEL=deepseek/deepseek-chat
LLM_API_KEY=sk-xxx

支持任何 litellm 兼容的模型格式,如 openai/gpt-4oollama/qwen2.5openrouter/qwen/qwen3-coder-flash 等。

启动

uvicorn api.app:app --host 0.0.0.0 --port 8010 --reload

访问 http://localhost:8010/docs 查看 API 文档。

Docker 部署

docker-compose up -d

定义垂域任务

只需三步,即可将通用 Agent 转化为面向特定领域的专业智能体:

1. 编写 Prompt 模板

{# task/templates/code_review.md.j2 #}
请对以下代码进行审查,重点关注安全性和性能:

代码路径: {{ code_path }}
审查标准: {{ standards }}

2. 注册任务

# task/builtin.py
register_task(TaskConfig(
    name="code_review",
    prompt_template="code_review.md.j2",
    system_prompt="你是一名资深代码审查工程师。",
    llm_profile="reasoning",
    max_steps=20,
))

3. 调用

curl -X POST http://localhost:8010/api/tasks \
  -H "Content-Type: application/json" \
  -d '{"prompt": "审查 src/main.py", "agent_name": "code_review"}'

多 LLM Profile

为不同场景配置不同的模型策略:

# config/config.toml

[llm.default]
model = "deepseek/deepseek-chat"
temperature = 0.0
max_tokens = 8192

[llm.fast]
model = "deepseek/deepseek-chat"
max_tokens = 4096
timeout = 30

[llm.reasoning]
model = "openai/o1-mini"
max_tokens = 16384
timeout = 120

任务中通过 llm_profile 指定:

register_task(TaskConfig(
    name="my_task",
    llm_profile="reasoning",  # 使用推理模型
    ...
))

内置示例任务

项目内置了多个真实场景的 Agent 任务作为参考实现:

任务说明垂域组件
代码分析上传代码 → 自动分析函数结构Tools
服务封装上传代码 → 自动生成 Docker + MCP 服务Skills + RAG + Memory
算法模型生成描述需求 → 生成算法模型代码Skills + RAG + Memory
MCP 服务测试连接 MCP 服务器 → 自动发现并测试工具MCP
服务评测上传数据 → 自动执行评测并输出报告Tools
AML 模型评测上传数据 → 多指标安全评测(支持数据适配)MCP + Tools

这些任务展示了如何通过组合 Skills、RAG、MCP 等组件,将通用 Agent 打造为垂域专业智能体。你可以参考它们的实现来构建自己的任务。

扩展点

组件接口内置实现可扩展方向
模型litellmOpenAI, DeepSeek, ClaudeOllama, vLLM, 任意 OpenAI 兼容 API
工具Tool ABCBash, MCP, Terminate任意自定义工具
记忆MemoryProviderShortTermMemory, FileMemoryRedis, 向量数据库
检索RetrieverEmbeddingRetrieverFAISS, ChromaDB, Milvus
技能Skill + SkillRegistrySKILL.md 目录发现远程技能市场

项目结构

Micro-Agent/
├── core/                 # Agent 核心引擎
│   ├── agent.py          # ReAct 循环执行引擎
│   ├── llm.py            # LLM 统一调用层 (litellm)
│   ├── config.py         # 配置管理 (TOML + 环境变量)
│   ├── memory/           # 记忆系统 (短期 / 持久化)
│   ├── rag/              # 检索增强 (Embedding)
│   ├── skill/            # 技能系统 (注册 / 发现 / 注入)
│   └── schema.py         # 数据模型 (Event / Message / ToolCall)
├── tool/                 # 工具层
│   ├── base.py           # Tool 抽象接口
│   ├── bash.py           # Bash 命令执行
│   ├── mcp/              # MCP 工具 (stdio / SSE)
│   └── registry.py       # 工具注册表
├── task/                 # 任务定义
│   ├── base.py           # TaskConfig + 模板渲染
│   ├── builtin.py        # 内置任务注册
│   └── templates/        # Jinja2 Prompt 模板
├── api/                  # API 服务层
│   ├── app.py            # FastAPI 入口
│   ├── routes/           # 路由 (任务管理 / Agent 端点)
│   └── services/         # SSE 流 / 文件处理
├── workspace/            # 工作区
│   ├── knowledge/        # RAG 知识库文档
│   └── skills/           # Skill 定义 (SKILL.md)
├── config/               # 配置文件
├── tests/                # 测试
└── deploy/               # Docker 部署

许可

MIT

Frequently Asked Questions

What is Micro-Agent?

Micro-Agent is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by fdueblab. A lightweight AI agent framework for vertical domain applications | 面向垂域应用的轻量级 AI Agent 框架. It has 101 GitHub stars.

Is Micro-Agent safe to use?

Yes. Micro-Agent 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.

How do I install Micro-Agent?

Clone the repository with "git clone https://github.com/fdueblab/Micro-Agent" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is Micro-Agent written in?

Micro-Agent is primarily written in Python. It is open-source under fdueblab on GitHub, so you can review or fork the full source.

Are there alternatives to Micro-Agent?

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 Micro-Agent against similar tools.

Comments (0)

No comments yet. Be the first to share your thoughts!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI Agents
View details

Developers Also Liked

Based on votes and bookmarks from developers who liked this skill

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP Serversapisai-tools
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details