Create and Configure an Agent
Learn how to set up an agent in the Heylock dashboard. This guide covers dashboard basics, web crawl, key handling, and prompt writing.
Dashboard Basics
An agent is a bundle of:
- Instructions (how it behaves)
- Optional specific knowledge
- Optional web-crawled knowledge
- A secret agent key
Why Use Multiple Agents?
Keep agents focused. One for chat. One for sorting. One for support. This keeps answers clear and relevant.
How to Create an Agent
- Open the dashboard. Click New Agent.
- Pick a clear name. Example: Support Chat.
- Add Instructions. Start simple. Improve after testing.
- (Optional) Add Specific Knowledge. Paste only what matters.
- (Optional) Set up Web Crawl Knowledge. Enter a base URL and scope.
- Save. Wait for indexing to finish.
- Generate a key. Store it safely. Never share it.
- Test in the dashboard chat. Refine as needed.
Key Handling
- Never put agent keys in public code or git.
- Store keys in server environment variables.
- If a key leaks, regenerate it.
Prompt Engineering
Instructions tell the agent what to do. Clear, short instructions work best.
- Context: Who is this for?
- Objective: What is the main goal?
- Rules: What must/must not happen?
- Examples: Show input and output.
Objective: Give clear, step-by-step help.
Rules:
- Max 120 words.
- If missing info, ask a question.
- Never show internal key storage.
Example:
User: How do I reset a leaked key?
Assistant: 1) Generate a new key. 2) Update your server. 3) Revoke old sessions.
- Role: Who is the agent?
- Action: What should it do?
- Your Goal: What is success?
- Style: How should it sound?
Role: Senior merchandiser.
Action: Rank items.
Your Goal: Order by conversion chance.
Style: JSON array, short reason for each.
Role: [Act as an expert in X]
Context: [Who is this for?]
Objective: [Main goal]
Instructions:
1. [Step 1]
2. [Step 2]
Rules:
- [Rule 1]
- [Rule 2]
Output Format:
- [e.g. JSON object with keys: summary, items]
Weak
Help users and be friendly. Give them what they need. Sometimes ask questions.
Improved
Context: API setup.
Objective: Resolve blockers fast.
Rules:
1. Ask one question if needed.
2. Limit to 100 words.
3. If pricing is asked and not in knowledge, say: "See Pricing in dashboard."
Iterate and Test
- Write short, clear instructions.
- Test 5–10 real prompts.
- Note what goes wrong.
- Fix only the part that failed.
- Repeat until results are solid.
Knowledge Hygiene
Keep knowledge short and factual. Remove old or noisy info. Re-index after big changes.
Before You Integrate
- Wait for indexing to finish.
- Test instructions with real tasks.
- Setup different agents for different jobs.