Skip to main content

What are Resources?

Resources are documents that your AI agent can access and reference during conversations - like a knowledge library.

Think of it as:

Reference materials your agent can look up - product catalogs, policies, FAQs, guides

Why Resources Matter

Accurate Information

Agent provides facts, not guesses

Consistent Answers

Same info every time

Easy Updates

Update knowledge without changing code

Scalable Knowledge

Add unlimited reference materials

What to Put in Resources

Product Information

Resource: Product Catalog 2024

Our complete product line:

Laptops:
- UltraBook Pro: $1299
  • 16GB RAM, 512GB SSD
  • Best for professionals
  • 2-year warranty

- Student Laptop: $599
  • 8GB RAM, 256GB SSD
  • Perfect for students
  • 1-year warranty

Company Policies

Resource: Return Policy

Returns accepted within 45 days.

Conditions:
- Unused, original packaging
- Receipt required
- Free return shipping on defects

Process:
1. Contact support
2. Get return authorization
3. Ship within 7 days
4. Refund in 3-5 days

FAQs

Resource: Shipping FAQ

Q: How long does shipping take?
A: Standard 3-5 days, Express 1-2 days

Q: Do you ship internationally?
A: US and Canada only

Q: Can I track my order?
A: Yes, tracking link sent via email

Troubleshooting Guides

Resource: Login Issues

Can't log in?
1. Verify email is correct
2. Check caps lock
3. Try "Forgot Password"
4. Clear browser cache
5. Try different browser
6. Contact support: [email protected]

How Agents Use Resources

Automatically during conversations:
User: "What's your return policy?"

Agent: [Searches resources]
       [Finds "Return Policy"]
       [Reads content]
       
Response: "We accept returns within 45 days.
The item must be unused in original packaging..."
The agent decides when to search resources based on:
  • Question keywords
  • Context of conversation
  • Relevance to query
  • Semantic similarity

Creating Resources

1

Open Resources Command

lua resources
2

Create New Resource

? What would you like to do? ➕ Create new resource
? Resource name: Product Catalog
3

Write Content

Opens your editor. Write your content:
Our products for 2024...

[Save and close]
4

Test with Agent

lua chat
Ask agent about products, verify it uses the resource

Resource Best Practices

1. Keep Resources Focused

Resource: Everything About Company
- Products
- Policies  
- FAQ
- History
- Contact
[10,000 characters of mixed info]

2. Use Clear Structure

Resource: Electronics Catalog

## Laptops

### UltraBook Pro - $1299
- Specs: 16GB RAM, 512GB SSD
- Best for: Professionals, creators
- Warranty: 2 years

### Student Laptop - $599
- Specs: 8GB RAM, 256GB SSD
- Best for: Students, basic use
- Warranty: 1 year

## Tablets

### Pro Tablet - $899
...

3. Include Timestamps

Resource: Pricing Information
Last Updated: January 15, 2024
Valid Through: March 31, 2024

[This helps track when info needs updating]

4. Update Regularly

  • Time-sensitive promotions
  • Seasonal information
  • Limited-time offers
  • Product availability
  • Pricing updates
  • Policy changes
  • Complete review
  • Archive old resources
  • Reorganize if needed

Resources + Persona

Resources work best when referenced in your persona:
// In lua persona
persona: `
  You are a customer service agent for AcmeCorp.
  
  When answering questions, check your resources:
  - Product questions → Product Catalog
  - Return questions → Return Policy  
  - Shipping questions → Shipping Information
  
  Always provide accurate info from resources.
`

Common Use Cases

Resources:
  • Product Catalog
  • Size Guide
  • Return Policy
  • Shipping Options
  • Gift Services
Agent can answer:
  • “Do you have this in size medium?”
  • “What’s your return policy?”
  • “How long does shipping take?”

Managing Resources

Create

lua resources
Add new knowledge documents

Update

Keep information current

Test

lua chat
Verify agent uses resources

Monitor

Track what users ask about

Quick Tips

Begin with 3-5 core resources:
  • Company overview
  • Main products/services
  • Top FAQ
  • Contact information
  • Key policy
Add more as needed
✅ Product Catalog 2024
✅ Return Policy - Updated Jan 2024
✅ FAQ - Shipping Questions

❌ Doc1
❌ Stuff
❌ Notes
# Add resource
$ lua resources Create

# Test immediately
$ lua chat
💬: "Ask about the new resource topic"
🤖: [Should reference the resource]

Resources vs Tools vs Skills

ConceptPurposeExample
ToolExecute actionsearch_products - Searches catalog
SkillGroup of toolsE-commerce - Search, cart, checkout
ResourceReference infoProduct Catalog - What products exist
How they work together:
  • Resources provide knowledge
  • Tools take actions
  • Skills organize tools
  • Persona defines personality
Example:
User: "Do you have laptops under $1000?"

1. Persona: "Be friendly and helpful"
2. Resource: Agent checks Product Catalog
3. Tool: Calls search_products tool
4. Skill: E-commerce skill coordinates everything
5. Result: "Yes! We have 3 laptops under $1000..."

Next Steps