Skip to content

AI Agent System Prompt Update

Overview

Comprehensive update to reflect all AI agent capabilities developed across multiple sessions. The prompt now documents 42+ tools organized into 4 primary workflows.


Key Changes

Added Primary Workflows Section

Organized tools into 4 clear categories: 1. Customer Support & Self-Service - Dispute resolution (5 tools) - Transaction explanation (2 tools) - FAQs (3 tools)

  1. Customer Account Management
  2. KYC & profiles
  3. Support tickets

  4. Transaction & Payment Analysis

  5. Loans (10 tools)
  6. Agent/Store performance (8 tools)
  7. Campaigns & Wallets (5 tools)
  8. Inventory (2 tools)

  9. Data & Identity Resolution

  10. Identity resolution
  11. Onboarding guides

Customer-facing examples: - "Why was my transaction declined?" flow - "I was charged twice" flow - "How do I reset my password?" flow - "I need help with my account" flow

Staff-facing examples: - Customer KYC lookup - Loan processing - Agent/Store performance review

Enhanced Guidelines

  • Data Retrieval Rules: Clear guidance on get_, list_, search_* tools
  • Output Clarity: Different approaches for customers vs. staff
  • Error Handling: Specific guidance for common error scenarios
  • Temporal Handling: Emphasized CRITICAL date handling requirements (kept from original)
  • Identity Resolution: Kept CRITICAL identity resolution rules (kept from original)
  • Safety & Correctness: Enhanced with permission boundaries and sensitive data warnings

Kept from Original

  • ✅ Temporal & date handling (CRITICAL section)
  • ✅ Identity resolution rules (CRITICAL section)
  • ✅ Core tool usage philosophy
  • ✅ Safety-first approach

Tool Categories Summary

Customer Support (10 tools)

  • get_transaction_details_with_context - Transaction with explanation
  • create_dispute_request - File disputes
  • check_dispute_status - Track disputes
  • add_dispute_note - Add dispute notes
  • escalate_dispute_to_agent - Escalate to support
  • get_transaction_failure_details - Explain declines
  • get_common_decline_reasons - Decline reason reference
  • search_faqs - Search knowledge base
  • get_faq_categories - List FAQ categories
  • get_faq_by_category - Browse FAQs

Transactions & Payments (10 tools)

  • get_transactions - Search transaction history
  • get_transaction_by_id - Single transaction
  • get_failed_transactions - Failed transactions
  • get_suspicious_transactions - Fraud detection
  • get_reconciliation_reports - Reconciliation data
  • get_wallet_by_id - Wallet details
  • get_wallet_by_phone - Find wallet
  • get_wallet_balance - Check balance
  • check_wallet_freeze_status - Freeze status
  • get_linked_bank_accounts - Linked accounts

Lending & Loans (10 tools)

  • get_loan - Loan details
  • list_loans - Search loans
  • get_loan_application - Application details
  • list_loan_applications - List applications
  • get_loan_product - Product terms
  • list_loan_products - Browse products
  • get_loan_repayments - Repayment schedule
  • get_loan_installments - Installment tracking
  • get_loan_balance - Remaining balance
  • list_collection_cases - Collection status
  • get_loan_score_history - Historical scores
  • get_blacklist_status - Eligibility check
  • start_loan_scoring_workflow - Interactive scoring

Agent/Store/Operator (8 tools)

  • get_agent_info - Agent profile
  • list_agents - Search agents
  • get_agent_performance_stats - Agent metrics
  • list_agent_stores - Agent's stores
  • get_store_info - Store details
  • list_stores - Search stores
  • list_store_operators - Store operators
  • get_operator_info - Operator profile
  • list_operators - Search operators

Campaigns & Inventory (5 tools)

  • get_active_campaigns - Active campaigns
  • get_campaign_by_id - Campaign details
  • get_referral_stats - Referral rewards
  • get_stock_locations - Stock locations
  • get_inventory_items - Inventory search

Utility (4 tools)

  • resolve_identity_type - Identify entity type
  • list_customers - Search customers
  • get_customer_kyc - Full KYC profile
  • fetch_user_notifications - User notifications
  • customer_onboarding_guide - Onboarding steps

Workflow Examples

Customer: "Why was my transaction declined?"

1. search_faqs("transaction declined") → Get FAQ
2. get_transaction_failure_details(ref_id) → Get reason
3. Explain decline + suggest fixes
4. Offer: "Would you like me to file a dispute?"

Staff: "Show me this agent's performance"

1. get_agent_info(agent_id) → Get profile
2. get_agent_performance_stats(agent_id) → Get metrics
3. list_agent_stores(agent_id) → Get assigned stores
4. Present: Success rate, transaction volume, store assignments

Staff: "Process a loan application"

1. get_loan_application(app_id) → Get application
2. get_customer_kyc(customer_id) → Verify KYC
3. start_loan_scoring_workflow → Interactive scoring
4. get_blacklist_status(customer_id) → Check eligibility

Prompt Structure

Old Structure (40 lines): - One paragraph of capabilities - Generic tool rules - Temporal handling - Identity resolution

New Structure (140+ lines): - Primary workflows (4 categories) - All 42+ tools organized by category - Customer-facing recommended workflows (4 examples) - Staff-facing recommended workflows (3 examples) - Tool usage rules with clear guidance - Output & clarity principles - Error handling strategies - Critical handling sections (temporal, identity, safety)


Benefits

Comprehensive - Documents all 42+ tools and recent additions ✅ Organized - Clear categorization by workflow/feature ✅ Practical - Includes recommended workflow examples ✅ Guidance - Clear principles for tool usage and output ✅ Backward Compatible - Preserves CRITICAL temporal and identity rules ✅ Customer & Staff Ready - Guidance for both user types ✅ Maintainable - Easy to add new tools to existing sections


Next Steps for Maintenance

When adding new tools/features: 1. Add to appropriate primary workflow section 2. List tool name and brief description 3. Consider adding a recommended workflow example 4. Update tool count in overview