itsmostafa/llm-engineering-skills/agents
- community
Checking that the SKILL.md file is still in the repository.
Patterns and architectures for building AI agents and workflows with LLMs. Use when designing systems that involve tool use, multi-step reasoning, autonomous decision-making, or orchestration of LLM-driven tasks.
Install
npx vskill@latest install itsmostafa/llm-engineering-skills/agentsSKILL.md
Building Agents
Agents are systems where LLMs dynamically direct their own processes and tool usage. This skill covers when to use agents vs workflows, common architectural patterns, and practical implementation guidance.
Table of Contents
- Agents vs Workflows
- Workflow Patterns
- Agent Architectures
- ReAct Pattern
- Tool Design
- External Context Protocols
- Best Practices
- References
Agents vs Workflows
| Aspect | Workflows | Agents | |
|---|---|---|---|
| Control flow | Predefined code paths | LLM determines next step | |
| Predictability | High - deterministic steps | Lower - dynamic decisions | |
| Complexity | Simpler to debug and test | More complex, harder to predict | |
| Best for | Well-defined, repeatable tasks | Open-ended, adaptive problems |
Key principle: Start with the simplest solution. Use workflows when the task is predictable; use agents when flexibility is required.
Workflow Patterns
1. Prompt Chaining
Decompose tasks into sequential LLM calls, where each step's output feeds the next.
Use when: Tasks naturally decompose into fixed sequential steps.
2. Routing
Classify inputs and direct them to specialized handlers.
Use when: Different input types need fundamentally different processing.
3. Parallelization
Run multiple LLM calls concurrently for independent subtasks.
Variants:
- Sectioning: Break task into parallel subtasks
- Voting: Run same prompt multiple times, aggregate results
4. Orchestrator-Workers
Central LLM decomposes tasks and delegates to worker LLMs.
Use when: Tasks require dynamic decomposition that can't be predetermined.
5. Evaluator-Optimizer
One LLM generates, another evaluates and requests improvements.
Use when: Output quality is critical and can be objectively evaluated.
Agent Architectures
Autonomous Agent Loop
Agents operate in a loop: observe, think, act, repeat.
Human-in-the-Loop
Pause for human approval at critical checkpoints.
ReAct Pattern
ReAct (Reasoning and Acting) alternates between thinking and taking actions.
Advantages:
- Explicit reasoning traces aid debugging
- More interpretable decision-making
- Better handling of complex multi-step tasks
Tool Design
Principles
- Self-contained: Tools return complete, usable information
- Scoped: Each tool does one thing well
- Descriptive: Clear names and descriptions guide the LLM
- Error-robust: Return informative errors, not exceptions
Tool Definition Pattern
Tool Interface Guidelines
- Prefer text inputs/outputs over complex structured data
- Include usage examples in descriptions for ambiguous tools
- Return truncated results when output could be large
- Provide clear feedback on what the tool did
External Context Protocols
Model Context Protocol (MCP) standardizes how agents discover tools, prompts, and resources from external systems. Prefer a protocol boundary when multiple agents, apps, or runtimes need the same integration.
Use MCP-style boundaries when:
- The integration exposes reusable tools or data resources
- You need consistent auth and permission handling outside the agent loop
- Tool metadata should be discoverable rather than hard-coded into prompts
Keep tool schemas tight:
- Use narrow parameters with explicit enums where possible
- Return structured summaries before raw payloads
- Include stable resource IDs so the agent can fetch details on demand
- Keep destructive actions behind explicit approval or dry-run modes
Best Practices
- Start simple: Begin with the simplest architecture that could work. Add complexity only when it demonstrably improves outcomes.
- Maintain transparency: Ensure the agent's planning steps are visible. This aids debugging and builds user trust.
- Design for failure: Agents will make mistakes. Include guardrails, retries, and graceful degradation.
- Test extensively: Use sandboxed environments. Test edge cases and failure modes, not just happy paths.
- Limit tool proliferation: More tools means more confusion. Keep the tool set focused and well-documented.
- Implement checkpoints: For long-running tasks, save state periodically to enable recovery.
- Set resource limits: Cap iterations, token usage, and tool calls to prevent runaway agents.
- Log everything: Record all LLM calls, tool executions, and decisions for debugging and improvement.
- Handle ambiguity: When uncertain, have the agent ask for clarification rather than guessing.
- Measure outcomes: Track task completion rates, accuracy, and efficiency to guide improvements.
- Separate integration boundaries: Use MCP or equivalent tool/resource servers when integrations need auth, shared state, or reuse across agents.
References
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/agents/SKILL.md
Popularity
- Repository stars
- 17
- 7-day trend score
- 14
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 22 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/itsmostafa/llm-engineering-skills/agents)