Easy PromptAI Prompt Library
AI AgentsTextAdvanced

Agents Best Practices Guide

This skill is used when designing, generating an MVP blueprint for, auditing, refactoring, or explaining an agentic harness for any domain. Covers provider-neutral agent architecture for OpenAI, Anthropic, and OpenAI-compatible APIs: agent loops, tool design, permissions, system prompts, planning, goals, context compaction, memory, skills, MCP/external connectors, observability, evals, prompt caching, agent-legible environments, feedback loops, and safety.

Prompt Content

Copy and paste directly into your model or internal evaluation tool.

Use this skill when the user asks how to build, improve, debug, or evaluate an agentic harness. This is a general-purpose agent architecture skill. Coding agents are one subdomain only; apply the same principles to research, finance, legal, support, operations, sales, healthcare, education, data analysis, procurement, and workflow automation agents.

Core stance

An agent harness is the control plane around a model. The model proposes actions; the harness validates, authorizes, executes, records, summarizes, and returns observations. Keep the loop simple and make the runtime rigorous.

Default architecture:

user/task
  -> instruction and context builder
  -> model call
  -> tool/action proposal
  -> schema validation
  -> permission decision
  -> execution or approval pause
  -> structured observation
  -> context update
  -> repeat within budget or finish

When to activate this skill

Use this skill for prompts involving any of these intents:

  • build an agent, agentic workflow, AI worker, autonomous assistant, or harness;
  • create a domain-specific MVP agent design, starter harness, implementation blueprint, or first production-safe version;
  • choose between OpenAI, Anthropic, OpenAI-compatible APIs, direct tool loops, hosted tools, or SDKs;
  • design tools, permissions, guardrails, approval flows, or sandboxing;
  • create planning mode, goal mode, todo tracking, or long-running task behavior;
  • add context compaction, memory, retrieval, scoped instructions, or prompt hierarchies;
  • attach Agent Skills, reusable workflows, MCP servers, external connectors, or tool search;
  • audit an existing agent for reliability, cost, prompt-cache hit rate, safety, latency, or observability;
  • create system prompts or developer instructions for a domain-specific agent;
  • make source-of-truth knowledge, validation signals, logs, metrics, or workflow state legible to an agent.

Do not use this skill for ordinary single-turn writing, translation, or Q&A unless the user is asking about the design of an agent that will perform those tasks.

How to use this skill

First, identify the user's design problem:

  1. Domain: what work the agent performs.
  2. Autonomy level: answer-only, draft-only, approval-gated action, or autonomous action within policy.
  3. Risk level: read-only, internal write, external communication, financial, legal, healthcare, security, destructive, or privileged.
  4. State duration: single turn, multi-turn session, resumable workflow, or long-running goal.
  5. Tool surface: internal APIs, hosted tools, MCP/external connectors, browser, sandbox, filesystem, database, communication, or computation.
  6. Validation: what proves the task is complete.

Then load the most relevant reference files, not all files by default. If the user asks to make or build an agent for a domain, default to MVP Builder Mode.

MVP Builder Mode

When the user asks to make, build, design, scaffold, or specify an agent for a domain, produce a concrete domain-specific MVP harness blueprint, not only advice. Use mvp-agent-blueprint.md as the primary reference and load other references as needed.

Default behavior:

  1. Infer a reasonable first version from the user's domain and stated constraints.
  2. State assumptions briefly instead of blocking on missing details.
  3. Design the smallest safe harness that can accomplish useful work.
  4. Include the core agentic loop, tool registry, permission matrix, context/memory/compaction, planning mode, goal-like loop criteria, skills/connectors, prompt-cache/cost strategy, observability, evals, and launch path.
  5. Mark high-risk actions as draft-only or approval-gated by default.
  6. Avoid multi-agent orchestration until the single-agent MVP has measurable failure cases that require decomposition.

Non-negotiable principles

  • The model does not execute actions directly; the harness does.
  • Every tool call must receive a tool result, even if the result is denial, timeout, error, or abort.
  • Every risky side effect needs runtime policy enforcement outside the model.
  • Draft and commit should be separate for external, financial, destructive, security, or regulated actions.
  • Tool schemas must be narrow, typed, validated locally, and auditable.
  • Context should be informative, tight, and cache-aware; retrieve and attach just in time.
  • Skills and external connectors should use progressive disclosure; do not expose every capability up front.
  • Auto-compaction should preserve working state, not conversational prose.
  • Long-running goals need budgets, checkpoints, and a measurable done condition.
  • The harness must trace operational events without exposing hidden reasoning.
  • Durable knowledge should live in agent-readable source-of-truth artifacts, not only in chat history.
  • Repeated failures should become tools, validators, docs, evals, or policies rather than repeated prompt advice.

Use Cases

Design an autonomous agent for e-commerce customer service to handle return requestsBuild an MVP agent for legal contract review with clause extraction and risk flaggingDevelop a financial data analyst agent capable of querying reportsgenerating insightsand suggesting visualizationsCreate a medical triage assistant agent that provides preliminary symptom analysis but always requires human review before diagnosis

Reference Output

# MVP Agent Harness Blueprint: E-commerce Customer Service Agent ## Objective Process user return requests by automatically validating order details, calculating refund amounts, and completing refunds within compliance boundaries. ## MVP Scope & Assumptions - Only supports returns for paid orders; - Does not involve product quality assessment or resale decisions; - Refunds are issued via original payment method only; - Maximum daily processing limit: 100 tickets. ## Autonomy & Risk Level - Generates draft responses and operational suggestions only; - Actual refund execution requires supervisor approval; - All sensitive operations are logged comprehensively. ## Core Loop 1. Receive user input (order ID + reason); 2. Call order service to validate; 3. If valid, invoke refund calculator; 4. Generate response draft awaiting manual approval; 5. After approval, execute refund and notify user. ## Instruction Architecture - System prompt defines role, restrictions, and collaboration rules; - User instruction carries current request context; - Memory retains summary of last 5 interactions for continuity. ## Tool Registry | Tool Name | Risk Class | Permissions Required | Output Format | |-----------|------------|----------------------|---------------| | `validate_order` | Low | Read-only | JSON: {valid: bool, reason?: string} | | `calculate_refund` | Medium | Read-only | JSON: {amount: float, currency: string} | | `send_approval_request` | High | Triggers approval | JSON: {request_id, status, approver} | | `execute_refund` | High | Post-approval execution | JSON: {success: bool, transaction_id} | ## Planning & Goal Behavior - Single objective: Complete one full return workflow; - Stop condition: User confirms or no response within 24 hours. ## Context & Memory - On new session, auto-load recent order history; - After each turn, compress dialogue into key decision points; - Avoid reloading identical order data. ## Skills & Connectors - Integrate Order Management System API (read-only); - Use Agent Skill 'RefundWorkflow' to encapsulate standard procedure; - External email/SMS connector for user notifications. ## Safety & Approvals - All monetary operations require dual-level approval; - Prohibited from modifying passwords or account bindings; - Sensitive fields masked in display. ## Observability & Evals - Log timing and outcome of every step; - Weekly sample 10% of conversations for accuracy/safety evaluation; - Failed cases automatically added to training set for prompt refinement. ## Minimal Implementation Path 1. Implement basic tool invocation and draft generation; 2. Connect to approval workflow system; 3. Launch gray-scale test with 100 users; 4. Expand automation based on error rate and satisfaction scores.

Scoring Rubric

Key scoring criteria: Clear separation between model reasoning and control logic; Tool design adheres to least-privilege principle; Appropriate safeguards and approval mechanisms included; Context management supports efficient operation; Concrete MVP implementation path provided; Proper references to supporting templates.

User Rating

0 ratings
-

Your rating

Log in to rate

Comments

0

Log in to comment

Related Prompts

ImageWriting

Product Marketing - Monochrome Avant-Garde Fashion Portrait

A high-fashion, monochrome editorial prompt for a sharp portrait with dramatic lighting and futuristic accessories, mimicking a luxury brand campaign.

Nano Banana Proimage promptProduct Marketing
Nano Banana Pro image generation
ImageWriting

Social Media Post - Dreamy Woman in Wildflower Field

A cinematic, photorealistic prompt for a serene portrait of a woman in a field of daisies, emphasizing soft natural light and sharp focus on foreground details.

Nano Banana Proimage promptSocial Media Post
Nano Banana Pro image generation
ImageWriting

Social Media Post - Mediterranean Riviera Male Menswear

A comprehensive professional photography prompt for a sharp, high-contrast menswear editorial set against sun-drenched stone architecture.

Nano Banana Proimage promptSocial Media Post
Nano Banana Pro image generation