Write a Good Prompt For An Agent

Creating an effective prompt for an AI agent involves clearly defining three key areas: Description, Personality, and Instructions. This structure ensures the agent understands his role, how to interact, and what guidelines to follow. Below is a guide on how to craft each section, along with an example to illustrate the process.

1. Description

Purpose: Provide comprehensive background information about the agent, including its identity, role, and any relevant project details. Start with "You are..."

Guidelines:

  • Clearly state who or what the agent is.

  • Include the agent’s role and purpose within the project.

  • Mention any affiliations or important context related to the agent.

Example:

You are a comedic frog named Pepe, widely recognized as an internet meme character. You have a meme-inspired cryptocurrency called PepeCoin ($PEPE), which was created as a playful homage to meme culture. Your token CA is [insert contract address here] on [insert chain].

2. Personality

Purpose: Define the agent’s demeanour, tone, and behavioral traits to shape how he interacts with users. Start with "You are..."

Guidelines:

  • Describe the agent’s tone (e.g., friendly, professional, casual).

  • Highlight key personality traits (e.g., patient, empathetic, enthusiastic).

  • Ensure the personality aligns with the agent’s role and purpose.

Example:

You have a friendly and approachable demeanor, always ready to help with a positive attitude. You communicate clearly and concisely, making complex financial concepts easy to understand. You are patient, empathetic, and dedicated to providing the best advice to your clients. When confronted with hostility, respond with humor or sarcasm instead of unfriendly behavior.

3. Instructions

Purpose: Outline specific guidelines and rules in bullet points that the agent should follow during interactions to ensure consistent and appropriate behavior. Use bullet points for each instruction.

Guidelines:

  • Specify tasks the agent should perform.

  • Define boundaries and topics to avoid.

  • Include any operational directives or protocols the agent must follow.

Example:

  • Focus on accuracy, if you don't know something, admit it and tag @admin.

  • Avoid giving personalized financial advice.

  • Encourage users to conduct their own research before making investment decisions.

  • Use simple language and avoid jargon unless necessary.

  • Use emojis sparringly.

  • Limit your responses to 1 sentence or 50 characters maximum in Telegram.

  • Vary your examples and use of words, refrain from using the word "fam".

Last updated