Seu agente só responde? (Precisa CONSULTAR)
Orca Security: Natural language queries (sem SQL). Seu agente? Só responde. Como consultar dados (orders, customers) via chat natural.
Equipe OpenClaw · Time de Engenharia & Produto
A Equipe OpenClaw é formada por engenheiros, designers e especialistas em IA dedicados a construir a melhor plataforma de agentes conversacionais para negócios brasileiros. Combinamos expertise…
Seu agente só responde? (Precisa CONSULTAR)
Notícia: Orca Security + Amazon Bedrock lançaram natural language queries (analista pergunta em português, system retorna resposta = sem SQL, sem expertise técnica). O quê: Antes: "Mostre buckets S3 não criptografados" = analista precisa conhecer: (1) AWS query language, (2) model names (S3Bucket, encryption settings, etc), (3) nested relationships. Agora: Mesmo em natural language: "Quais buckets estão desprotegidos?" → Agent entende → Query executa → Resposta volta. Implicação: Se Orca consegue fazer isso com dados AWS complexos = seu agente WhatsApp tá deixando dinheiro na mesa (tá só respondendo, não consultando). Realidade: Seu agente: Customer pergunta "Qual meu saldo?" → Agent responde "Preciso de ID". Deveria: Consultar database → Responder com número. Urgência: Natural language queries = padrão novo (agents que consultam > agents que só falam).
Realidade: **
THE PROBLEM (YOUR AGENT ONLY RESPONDS):
WHAT'S HAPPENING:
Your agent workflow (response-only): ├─ Step 1: Customer asks │ └─ "What's my order status?" │ ├─ Step 2: Agent understands │ └─ Intent = "GET_ORDER_STATUS" │ ├─ Step 3: Agent responds │ ├─ Option A: "I don't have access to your data" │ ├─ Option B: "An agent will help you soon" │ └─ Option C: Generic response (no data lookup) │ ├─ Step 4: Customer frustrated │ └─ "But I just want to know if my order arrived!" │ └─ Result: Agent = useless (just talks, doesn't help)
Real-world impact: ├─ Company A (response-only agent): │ ├─ Customer: "Order status?" │ ├─ Agent: "I'll connect you to a human" │ ├─ Actual: Waits 10 min, human checks, replies │ ├─ Customer satisfaction: Low (slow) │ ├─ Cost: Human time (€30-50 per query) │ ├─ Scale: Limited (humans can handle ~100/day) │ └─ NPS: 30 (frustrated customers) │ ├─ Company B (query-enabled agent): │ ├─ Customer: "Order status?" │ ├─ Agent: Queries database → "Your order is on the way, arriving tomorrow" │ ├─ Actual: Instant response (2 seconds) │ ├─ Customer satisfaction: High (immediate) │ ├─ Cost: Zero (API call ~$0.001) │ ├─ Scale: Infinite (no human bottleneck) │ └─ NPS: 60+ (delighted customers) │ └─ Difference: Response-only vs Query-enabled = 20x cost difference
Why response-only agents fail: ├─ Problem 1: No data access │ ├─ Agent knows: "Customer wants order status" │ ├─ Agent doesn't know: "What IS the order status?" │ ├─ Result: Can't help (needs human to check) │ └─ Customer: Frustrated (why does agent exist?) │ ├─ Problem 2: Data requires expertise │ ├─ Before Orca: "Get S3 buckets" = need SQL-like query language │ ├─ Before Bedrock: Security analyst had to learn AWS query syntax │ ├─ Problem: Only experts could query (small group) │ ├─ Your agent: Same problem (only tech can integrate?) │ └─ Solution: Natural language = anyone can query │ ├─ Problem 3: Slow resolution │ ├─ Response-only: Customer → Agent → (wait) → Human reviews → (wait) → Response │ ├─ Time: 10-30 minutes │ ├─ Query-enabled: Customer → Agent queries DB → Instant response │ ├─ Time: 2-5 seconds │ └─ Difference: 100-500x faster │ └─ Problem 4: Scale impossible ├─ Response-only: 1000 queries/day → need 10 humans (€500k/year) ├─ Query-enabled: 1000 queries/day → €10 infrastructure cost ├─ Difference: 50,000x cheaper at scale └─ Result: Response-only dies, query-enabled thrives
Why Orca's approach changes everything: ├─ Problem it solved: │ ├─ Before: "Show non-encrypted S3 buckets" = need to know: │ │ ├─ AWS model names (S3Bucket, not "bucket") │ │ ├─ Field names (EncryptionStatus, not "encrypted") │ │ ├─ Relationships (Bucket → Objects → Encryption) │ │ ├─ Query syntax (nested filters, boolean logic) │ │ └─ Result: Only experts can query │ │ │ ├─ After: "Show non-encrypted S3 buckets" = natural language │ │ ├─ Agent understands intent │ │ ├─ Agent builds correct query (internally) │ │ ├─ Agent executes query │ │ ├─ Agent returns human-readable results │ │ └─ Result: Anyone can query (no expertise needed) │ │ │ └─ Technology: Bedrock LLM understands both natural language AND internal query structure │ ├─ Why it matters: │ ├─ Accessibility: 100x more people can query (not just experts) │ ├─ Speed: Instant answers (no wait for human) │ ├─ Scale: Infinite (no humans needed) │ ├─ Cost: Negligible (API call vs human labor) │ └─ Result: Agents become useful (actually solve problems) │ └─ Analogy to your agent: ├─ If your data = complex (orders, customers, transactions) ├─ And your agent = response-only (can't access data) ├─ Then your agent = useless (why have it?) ├─ Solution: Add query capability (like Orca did) └─ Result: Agent becomes powerful (actually helps customers)
WHY QUERY-ENABLED AGENTS WIN:
Reason 1: Instant answers (speed) ├─ Response-only: │ ├─ Customer: "What's my balance?" │ ├─ Agent: "Let me check" (escalates to human) │ ├─ Wait: 10 minutes │ ├─ Response: "Your balance is €1,500" │ ├─ Total time: 10 minutes (unacceptable) │ └─ Customer: Irritated (why wait?) │ ├─ Query-enabled: │ ├─ Customer: "What's my balance?" │ ├─ Agent: Queries database (0.5 sec) │ ├─ Agent: "Your balance is €1,500" │ ├─ Total time: 1 second (instant) │ └─ Customer: Delighted (fast!) │ └─ Business impact: NPS +30 (speed matters)
Reason 2: Cost reduction (economics) ├─ Response-only: │ ├─ Cost per query: €30 (human time) │ ├─ Scale: 1,000/day = €30k/day = €600k/month │ ├─ Bottleneck: Can't scale (run out of humans) │ └─ Result: Unsustainable │ ├─ Query-enabled: │ ├─ Cost per query: €0.01 (API call) │ ├─ Scale: 1,000/day = €10/day = €300/month │ ├─ Bottleneck: None (scales to infinity) │ └─ Result: Sustainable (profitable) │ └─ Savings: €599,700/month (99.95% reduction)
Reason 3: Accessibility (democratization) ├─ Response-only: │ ├─ Who can get answers? Anyone (agent can respond) │ ├─ But quality depends on: Agent design + human review │ ├─ Problem: Human bias (one human might know, other doesn't) │ └─ Result: Inconsistent │ ├─ Query-enabled: │ ├─ Who can query? Anyone (no SQL knowledge needed) │ ├─ Quality depends on: Data accuracy + query logic │ ├─ Benefit: Consistent (always correct if data correct) │ └─ Result: Reliable │ └─ Impact: Non-technical users can now self-serve
Reason 4: Precision (accuracy) ├─ Response-only: │ ├─ Agent responds based on: Training data + patterns │ ├─ Problem: May hallucinate (invent data) │ ├─ Customer: Gets wrong answer (trusts agent) │ └─ Result: Disaster (wrong decision based on wrong data) │ ├─ Query-enabled: │ ├─ Agent queries real database: Actual current data │ ├─ Benefit: Always accurate (real source of truth) │ ├─ Customer: Gets correct answer (can trust) │ └─ Result: Safe (decisions based on real data) │ └─ Example: Response-only says "You have 5 orders", but you have 7 (hallucinated) vs Query-enabled says "You have 7 orders" (checked DB)
HOW TO BUILD QUERY-ENABLED AGENTS:
Architecture (query-enabled agent): ├─ Layer 1: Understanding (what does customer want?) │ ├─ Input: "What's my order status?" │ ├─ Process: NLU (intent recognition) │ ├─ Output: Intent = "GET_ORDER_STATUS", EntityType = "Order", Action = "STATUS" │ ├─ Tool: LLM (Claude, GPT-4o) │ └─ Result: Agent understands request │ ├─ Layer 2: Query generation (what data to fetch?) │ ├─ Input: Intent + context │ ├─ Process: Build database query │ │ ├─ What table? (orders) │ │ ├─ What fields? (order_id, status, date, amount) │ │ ├─ What filter? (WHERE customer_id = {{ user_id }}) │ │ ├─ What sort? (ORDER BY date DESC) │ │ └─ Result: SQL query (or equivalent) │ ├─ Tool: LLM with schema knowledge (knows your database structure) │ └─ Result: Agent generates correct query │ ├─ Layer 3: Query execution (actually fetch data) │ ├─ Input: Generated query │ ├─ Process: Execute against database │ │ ├─ Connect to DB │ │ ├─ Execute query │ │ ├─ Fetch results │ │ ├─ Handle errors (no results = say so) │ │ └─ Verify: Results make sense (sanity check) │ ├─ Tool: Database driver (PostgreSQL, MySQL, etc.) │ └─ Result: Real data retrieved │ ├─ Layer 4: Response generation (make it human-readable) │ ├─ Input: Raw data from database │ ├─ Process: Format for user │ │ ├─ Parse: "order_id=123, status='in_transit', eta='2025-10-14'" │ │ ├─ Humanize: "Your order #123 is on the way, arriving tomorrow" │ │ ├─ Add context: If delayed, explain why │ │ └─ Add actions: "Want to track? Click here" │ ├─ Tool: LLM (generate natural response) │ └─ Result: Customer-friendly message │ └─ Layer 5: Safety checks (is this safe?) ├─ Authorization: Does user own this order? (prevent data leak) ├─ Rate limit: Is user querying too much? (prevent abuse) ├─ Validation: Does response make sense? (prevent hallucination) ├─ Logging: Log all queries (audit trail) └─ Result: Secure, compliant, auditable
Key technologies (Orca-inspired): ├─ Tech 1: Schema understanding │ ├─ Orca: Knows 900+ AWS models (EC2, S3, RDS, etc.) │ ├─ Your agent: Should know YOUR database schema │ │ ├─ Tables: customers, orders, payments, shipments │ │ ├─ Fields: Each table's columns │ │ ├─ Relationships: Order → Customer, Order → Shipment │ │ └─ Constraints: Can only query own customer data │ ├─ Method: Feed schema to LLM (in system prompt) │ └─ Result: Agent understands your data structure │ ├─ Tech 2: Natural language to query translation │ ├─ Orca: "Show non-encrypted buckets" → AWS query │ ├─ Your agent: "Show my orders from last month" → SQL │ │ ├─ "orders" table │ │ ├─ WHERE created_date > last_month │ │ ├─ AND customer_id = current_user │ │ └─ ORDER BY created_date DESC │ ├─ Tool: LLM with few-shot examples (show it patterns) │ └─ Result: Accurate query generation │ ├─ Tech 3: Safety guardrails │ ├─ Authorization: User can only query own data │ │ ├─ Customer A: Can only see own orders │ │ ├─ Customer B: Can only see own orders │ │ ├─ Enforcement: WHERE customer_id = {{ current_user }} │ │ └─ Never: Allow cross-customer queries │ ├─ Rate limiting: Max 10 queries/minute (prevent abuse) │ ├─ Validation: Sanity check results (e.g., max 1000 rows) │ └─ Audit: Log every query (who asked, what data accessed) │ ├─ Tech 4: Error recovery │ ├─ Scenario 1: Query returns no results │ │ ├─ Agent: "No orders found from last month" (helpful) │ │ ├─ Suggest: "Want to see all orders?" (fallback) │ │ └─ Result: Graceful degradation │ ├─ Scenario 2: Query is invalid (SQL error) │ │ ├─ Catch: "I didn't understand. Can you rephrase?" │ │ ├─ Don't: Show SQL error (confusing) │ │ └─ Result: User-friendly │ ├─ Scenario 3: Database is slow │ │ ├─ Timeout: "Looking that up, one moment..." │ │ ├─ Fallback: If query takes >5s, suggest human help │ │ └─ Result: No hanging responses │ └─ Scenario 4: User requests unauthorized data │ ├─ Reject: "You don't have access to that" │ ├─ Log: Alert security team │ └─ Result: Secure (no data leaks) │ └─ Tech 5: Monitoring & improvement ├─ Metrics: Track query success rate │ ├─ Successful: Query executed, returned data │ ├─ Failed: Query error, no data │ ├─ Timeout: Query took >5s │ ├─ Goal: 99%+ success rate │ └─ If failing: Improve schema understanding ├─ Feedback: Learn from failures │ ├─ Log: "User asked X, query failed Y" │ ├─ Analyze: Why failed? (ambiguous intent? wrong schema?) │ ├─ Improve: Add examples, refine schema │ └─ Result: Agent gets better over time └─ Result: Continuous improvement
IMPLEMENTATION ROADMAP:
Phase 1: Foundation (Week 1-2) ├─ Step 1: Document database schema │ ├─ Tables: List all │ ├─ Fields: List all fields in each table │ ├─ Relationships: How tables connect │ ├─ Permissions: Who can query what │ └─ Output: Schema document (feed to LLM) │ ├─ Step 2: Identify top queries │ ├─ Question: What 5 queries would help customers most? │ │ ├─ "Order status?" │ │ ├─ "What did I order?" │ │ ├─ "When will it arrive?" │ │ ├─ "What's my balance?" │ │ └─ "Can I cancel?" │ ├─ For each: Write example SQL query │ ├─ Test: Manually run, verify results │ └─ Output: 5 gold standard queries │ └─ Step 3: Set up database access ├─ Create: Read-only database user (no delete/update) ├─ Permissions: Can only SELECT from allowed tables ├─ Network: Secure connection (SSL/TLS) ├─ Timeout: Max query duration (30 seconds) └─ Audit: Log all queries + results
Phase 2: Build (Week 3-4) ├─ Step 1: Implement query generation │ ├─ Prompt: Feed schema + examples to LLM │ ├─ Few-shot: "If user asks X, generate SQL Y" │ ├─ Test: Does it generate correct SQL? │ │ ├─ Test 1: "Order status?" │ │ ├─ Test 2: "Show my recent orders" │ │ ├─ Test 3: "What's my balance?" │ │ └─ All 3: Should generate correct SQL │ └─ Iterate: If failing, refine prompt │ ├─ Step 2: Implement query execution │ ├─ Connect: To read-only database │ ├─ Execute: Generated SQL │ ├─ Validate: Results make sense (not too many rows, etc.) │ ├─ Error handling: If query fails, fallback gracefully │ └─ Test: Manually verify results are correct │ ├─ Step 3: Implement response generation │ ├─ Format: Raw data → human-readable │ ├─ Examples: │ │ ├─ Raw: [{order_id:123, status:'shipped', eta:'2025-10-14'}] │ │ ├─ Human: "Your order #123 shipped and will arrive tomorrow" │ │ └─ Add actions: "Track shipment" button │ ├─ Test: Does response make sense? │ └─ Iterate: Until it's helpful │ └─ Step 4: Add safety ├─ Authorization: Check user owns data ├─ Rate limiting: Max 10 queries/min per user ├─ Validation: Sanity check (max 1000 rows) ├─ Logging: Log every query └─ Test: Try to access other user's data (should fail)
Phase 3: Pilot (Week 5) ├─ Step 1: Test with real data │ ├─ Users: 50 pilot customers │ ├─ Queries: Let them ask naturally │ ├─ Monitor: What works? What fails? │ ├─ Success rate: Goal >90% │ └─ If <90%: Identify failure cases, fix │ ├─ Step 2: Gather feedback │ ├─ Question: Was response helpful? │ ├─ Question: Was it accurate? │ ├─ Question: Was it fast? │ ├─ NPS: Ask overall satisfaction │ └─ Iterate: Based on feedback │ └─ Step 3: Measure impact ├─ Metric 1: Success rate (>90%?) ├─ Metric 2: Avg response time (<3 sec?) ├─ Metric 3: Customer satisfaction (NPS +20?) ├─ Decision: Ready for full rollout? └─ If YES: Proceed to Phase 4
Phase 4: Full rollout (Week 6+) ├─ Step 1: Deploy to all users │ ├─ Rollout: 100% traffic │ ├─ Monitoring: Real-time metrics │ ├─ Alerts: If success rate drops, page engineer │ └─ Support: Ready to help if issues │ ├─ Step 2: Continuous improvement │ ├─ Weekly: Review top queries (what do users ask most?) │ ├─ Weekly: Fix failure cases │ ├─ Weekly: Optimize slow queries │ ├─ Monthly: Add new query types (expand capability) │ └─ Result: Agent gets better every week │ └─ Step 3: Expand to other use cases ├─ Phase 1: Orders (status, tracking, etc.) ├─ Phase 2: Payments (balance, transactions, receipts) ├─ Phase 3: Shipping (tracking, delays, addresses) ├─ Phase 4: Returns (return status, refunds) └─ Timeline: 1 new capability per month
METRICS (MEASURE SUCCESS):
Metric 1: Query success rate ├─ Measure: % of queries executed successfully ├─ Goal: >95% (some ambiguous queries OK) ├─ Tracking: Automated logging ├─ If <95%: Analyze failures, improve schema/examples └─ Business impact: High success = happy customers
Metric 2: Response time ├─ Measure: Time from question to answer ├─ Goal: <3 seconds (instant feels) ├─ Tracking: Real-time monitoring ├─ If >3s: Optimize query (add indexes? cache?) └─ Business impact: Fast = better UX
Metric 3: Accuracy ├─ Measure: % of responses that are correct ├─ Goal: 100% (must be accurate) ├─ Tracking: Sample responses, manually verify ├─ If <100%: Identify source of errors, fix └─ Business impact: Accuracy = trust
Metric 4: Adoption ├─ Measure: % of customers using query feature ├─ Goal: >50% (meaningful adoption) ├─ Tracking: Usage logs ├─ If <50%: Maybe customers don't know about it (promote) └─ Business impact: High adoption = ROI
Metric 5: Customer satisfaction ├─ Measure: NPS on query feature ├─ Goal: +20 (should increase overall NPS) ├─ Tracking: Post-query surveys ├─ If <+20: Feature might not be valuable (investigate) └─ Business impact: Satisfaction = retention
Metric 6: Cost reduction ├─ Measure: Cost per query (agent vs. human) ├─ Before: €30/query (human time) ├─ After: €0.01/query (API calls) ├─ Savings: €29.99/query × 1000 queries/day = €30k/day saved └─ Business impact: Massive cost savings
BOTTOM LINE:
Problem: Agent = chatbot (only responds, no data) ├─ Cost: €30 per query (human escalation) ├─ Time: 10+ minutes (slow) ├─ Accuracy: Inconsistent (depends on human) ├─ Scale: Limited (humans can't scale) └─ Result: Agent = useless
Solution: Query-enabled agent (accesses real data) ├─ Cost: €0.01 per query (100x cheaper) ├─ Time: <3 seconds (instant) ├─ Accuracy: 100% (from real database) ├─ Scale: Infinite (no human bottleneck) └─ Result: Agent is powerful
Proof: Orca Security proves it works (complex data + natural language = solved) Timeline: 4 weeks to MVP When: START NOW (every week = €30k lost opportunity)
ROI: €30k/day savings + better customer satisfaction + infinite scale
Conclusão: Query-enabled agents = novo padrão
Fatos:
✗ Your agent: Likely response-only (just chat) ✗ Cost: €30 per query (human escalation) ✗ Time: 10+ minutes (slow resolution) ✗ Accuracy: Hallucination risk (no data verification) ✗ Scale: Bottlenecked by humans (can't scale) ✓ Orca Security proves: Natural language queries work (complex schemas, real execution) ✓ Query-enabled agents: Access real data instantly ✓ Cost: €0.01 per query (1000x cheaper) ✓ Time: <3 seconds (instant) ✓ Accuracy: 100% (from real database) ✓ Scale: Infinite (no human limit) ✓ Result: Actually useful
WHY THIS MATTERS:
Because response-only agents fail: ├─ Customer: "What's my order status?" ├─ Agent: "Let me transfer you to a human" ├─ Reality: Waits 10 min, human tells them ├─ Outcome: €30 cost + frustration └─ Better way: Agent queries DB (instant, free)
Because query-enabled agents win: ├─ Customer: "What's my order status?" ├─ Agent: Queries database → "Arriving tomorrow" ├─ Reality: 2 second response ├─ Outcome: €0 cost + delight └─ Scale: Can handle 10,000 such queries/day
Because Orca showed the way: ├─ Problem: Complex data (900+ AWS models) ├─ Solution: Natural language + LLM + schema knowledge ├─ Result: Non-experts can query anything ├─ Implication: You can do same for your data └─ Timeline: 4 weeks to MVP
Because expertise barrier is gone: ├─ Before: Only SQL experts could query databases ├─ After: Anyone can ask naturally (LLM translates) ├─ Business: Huge expansion (10x more people can self-serve) ├─ Cost: Remains low (API call cost) └─ Scale: Unlimited
WHAT YOU MUST DO (THIS WEEK):
Action 1: Audit your agent ├─ Step 1: Can your agent access customer data? ├─ Step 2: What queries would help customers most? (list top 5) ├─ Step 3: Does your agent handle these? (probably not) ├─ Step 4: How much would customers pay for instant answers? ├─ Deadline: Wednesday └─ Output: Know your opportunity
Action 2: Plan query-enabled MVP ├─ Step 1: Pick #1 query type (order status? balance? etc.) ├─ Step 2: Document your database schema (tables + fields) ├─ Step 3: Create read-only database access (security) ├─ Step 4: Design query generation (LLM + schema) ├─ Step 5: Estimate: 4 weeks to MVP ├─ Deadline: Friday └─ Output: Know your roadmap
Action 3: Start building ├─ Week 1: Schema + database access ├─ Week 2-3: Query generation + execution ├─ Week 4: Response formatting + safety ├─ Week 5+: Pilot + measure + iterate ├─ Timeline: 5-6 weeks to production └─ Investment: €50k-100k (engineering)
Expected outcome (month 2): ├─ Customer asks: "What's my order status?" ├─ Agent responds: "Arriving tomorrow" (instant) ├─ Cost: €0.01 (vs €30 before) ├─ Customer satisfaction: +30 NPS points ├─ Scaling: Can handle 10,000/day (humans couldn't) ├─ ROI: €30k/day saved + happy customers └─ Decision: Worth it?
BOTTOM LINE:
Response-only agents: Obsolete (don't access real data) Query-enabled agents: New standard (access real data instantly) Orca Security: Proves it works (complex data + natural language) Your agent: Probably still response-only (behind)
Move to query-enabled = unlock €30k/day savings Timeline: 5-6 weeks When: Start this week (every week delay = €150k lost)
Is your agent still response-only?
Query-enabled agents: Já rodam em produção (Orca Security). Seu agente tá só respondendo? Move pra queries: €30k/dia savings. Timeline: 5 semanas. ROI: Óbvio. 🚀💾✨
Publicado em 14 de outubro de 2026