Best Practices
Well-designed agents are easier to build, maintain, and extend in Weaver. Adopting smart habits saves debugging time, avoids runaway token costs, and keeps your workflows reliable in production.
Quick Rule of Thumb
Why Best Practices Matter
Every extra token consumed is a cost, and every hidden bug becomes harder to track down later. By following best practices, you’ll spend less time firefighting and more time building agents that work as expected.
1. Build and Test Habits
- Add One Skill at a Time: If something fails, you instantly know the source.
- Test Early with Debug Mode: Keep Debug Mode active until all blocks run green. Learn more about enabling it in the Weaver Interface.
- Rerun in Sections: Use multi-select to rerun parts of a workflow without restarting the whole build.
- Deploy in Stages: Push to staging or a dev endpoint first. A small break in staging is easier to catch than in production.
2. Design Modular Workflows
Breaking complex goals into small, focused skills makes agents easier to debug and extend.
- One Skill, One Purpose: Keep tasks specific. For example, one block to “Extract Keywords” and another to “Summarise Text.”
- Use Ordered Lists in Prompts: Weaver parses numbered lists cleanly, which helps it generate modular plans.
- Remix Instead of Rebuild: Adapt from the Prompt Library or clone a working agent and adjust only what you need.
Why Modularity Helps
3. Naming and Consistency
Consistent names help teammates and your future self understand workflows quickly.
Item | Naming Pattern | Example |
---|---|---|
Agent | Verb + Outcome | Generate SEO Article |
Skill | Action + Object | Extract Keywords |
Inputs | snake_case | max_results |
4. Manage Performance and Cost
Efficient agents are cheaper and faster to run.
Optimise | How |
---|---|
Choose models wisely | Use GPT-4o mini for most steps; reserve full GPT-4o for complex reasoning. |
Control loops | Insert a Sleep component in loops to avoid rate limits. |
Scope prompts | Constrain outputs with instructions like “Return JSON only” or “Limit to 200 words.” |
Pro Tip
5. Prevent Errors and Debug Smarter
- Inspect Inputs and Outputs regularly to catch miswired or malformed data.
- Apply Fix with AI when components fail, you can read Debugging with Weaver for step-by-step guidance.
- Maintain Test Inputs: Keep a small set of real-world test prompts you can reuse when iterating.
- Watch Status Colours: Green = working, Yellow = waiting, Red = failed. These act as a live error map.
6. Deploy with Confidence
- Stage First, Then Production: Always test in a staging environment before exposing agents to end users.
- Log and Monitor: Use Agent Logs to review execution history and spot slow or failing steps.
- Rollback Timeline: If a recent change introduces instability, use rollback to return to the last working version.
Avoid Hotfix Fatigue