Agent seu quebrou em produção (como testar antes)
Agent: funcionava no demo. Em produção: quebrou (erros cascata, hallucinations). rStation = sandbox compartilhado pra testar agents.
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…
Agent seu quebrou em produção (como testar antes)
Cenário de pesadelo (que está acontecendo AGORA):
Você tem SaaS com agent (atendimento, vendas, automação).
Agent funcionava perfeito no seu teste (demo, staging).
Você lança em produção (real customers).
Horas depois:
Cliente liga:
"Seu agent me disse pra deletar meu account. Não é verdade!"
Você: "Quê?! Agent não deve dizer isso. Deixa eu checar..."
Você testa: agent responde normalmente (não acontece de novo).
Você: "Hmm, estranho. Não consegui reproduzir."
Cliente: "Muito estranho mesmo. Agora confio menos no seu produto."
Realidade:
Agent em produção: comportamento impredizível
- Demo: funciona perfeito
- Produção: hallucina, inventa respostas, comete erros
- Por quê? Dados diferentes, edge cases, volume
Problema: não consegue testar TUDO antes de produção
- Número de casos possíveis: infinito
- Número de testes que você fez: 50-100 (máximo)
- Gap: 99.9% de casos não testados
Consequência: agent quebra silenciosamente
- Customer não sabe se resposta é correta
- Agent não sabe se está certo (LLM sempre confiante)
- Você não sabe o que deu errado
- Resultado: customer churn (trust broken)
The Problem: Agent testing is hard
Why agents fail in production
Agent = probabilistic system (não determinístico):
Traditional software (determinístico): Input: "2 + 2" Output: "4" (sempre, sempre, sempre) Testing: 1 test = 100% confiança
Agent (probabilístico): Input: "Como resetar senha?" Output: "Clique em Esqueceu senha..." (90% das vezes) Output: "Envie um email para support" (5% das vezes) Output: "Delete seu account e crie novo" (5% das vezes - ERRADO!) Testing: 1 test = 20% confiança (mesmo teste 5x = respostas diferentes)
Why agents hallucinate:
Agent confidence ≠ Agent correctness
- Agent: "I'm 99% sure the answer is..."
- Reality: "The answer is completely wrong"
- Problem: agent can't tell the difference
Edge cases trigger hallucinations:
- Question: "What if I'm from Mars?"
- Agent: invents policy for Mars customers (doesn't exist)
- Customer: "I'm from Mars?!" (confused)
Training data gaps:
- Agent trained on generic data
- Your specific product: not in training data
- Agent: makes up answers (sounds confident, completely wrong)
Traditional testing doesn't work
Why your staging tests passed:
Your testing approach:
- Write 50 test cases
- Run agent on each
- Manual review (does it look right?)
- OK, it works!
- Deploy to production
What went wrong:
- Case 51 (not tested): agent breaks
- Volume 100x higher: agent degrades
- Customer data: different distribution (agent confused)
- Time of day: model quality varies (OpenAI API variability)
- Concurrent requests: interaction effects (cascading errors)
Your testing is incomplete:
Edge cases you didn't test:
- Very long questions (token limit)
- Very short questions (ambiguous)
- Questions in broken Portuguese (typos, slang)
- Requests that look like prompt injection
- Customers asking about bugs (self-referential)
- High concurrency (all customers asking at once)
- Late night (model quality varies)
- First request from customer (no context)
- Customer angry (emotional language)
- Requests that don't fit FAQ (out-of-distribution)
Number of possible combinations: 10^100+ (infinite testing) Your tests: 50 (0.00000001% coverage)
The Solution: Shared testing lab (rStation approach)
What is rStation (and why it matters)
Concept:
rStation = shared research lab for AI agents
How it works:
- You upload your agent
- Other builders test it (collaborative)
- You see edge cases they discover
- They see edge cases you discover
- Everyone's agents get better
- Shared knowledge base of "what breaks agents"
Benefit:
- You discover edge cases before production (not after)
- Other builders help test your agent
- You help test their agents
- Collective wisdom (shared test suite)
- Production safety (agent failures prevented)
Example:
Your agent: customer support (payment questions)
rStation community tests:
- Requests in broken Portuguese (yours only tests formal)
- Very long questions (token limits)
- Questions about policies that don't exist
- Questions from angry customers (emotional language)
- Concurrent requests (scalability)
- After business hours (model variation)
They discover:
- Agent fails on "I was charged 2x!!!" (angry language)
- Agent times out on 5000-word message (token limit)
- Agent invents refund policy (doesn't exist)
You fix these BEFORE production Result: production launch is safe (not a bomb)
How shared testing lab works
Architecture:
rStation infrastructure: ├─ Agent upload (your agent uploaded) ├─ Test case management (community tests) ├─ Execution sandbox (safe, isolated) ├─ Results tracking (what passed, what failed) ├─ Shared insights (everyone sees edge cases) └─ Collaboration (builders help builders)
Your workflow:
- Upload agent
- rStation runs automated tests
- Community members test (volunteer)
- You see results in dashboard
- You fix issues
- Re-upload improved agent
- Repeat until 99%+ pass rate
- Deploy to production (safe)
Community benefits:
For you (agent owner): ✓ Free testing (crowd-sourced) ✓ Edge case discovery (before production) ✓ Shared insights (what breaks agents) ✓ Reputation (your agent is tested, proven) ✓ Network effect (build relationships with other founders)
For community (testers): ✓ Learn from others' agents (see how to build agents) ✓ Contribute to projects (feel useful) ✓ Reputation (expert tester, good feedback) ✓ Early access (test agents before public launch) ✓ Community (meet other AI builders)
Implementation: How to use rStation
Step 1: Set up your agent
python import rstation
Define your agent
agent = rstation.Agent( name="Support Agent", description="Handles customer support for payment SaaS", model="claude-3-5-sonnet-20241022", system_prompt="You are a helpful customer support agent...", knowledge_base="faq.json", tools=["search_faq", "create_support_ticket", "check_payment_status"] )
Upload to rStation
rstation.upload(agent)
Step 2: Define test suite
python
Automated tests
test_cases = [ { "query": "How do I reset my password?", "expected_contains": ["password", "reset", "email"], "expected_not_contains": ["delete account"], "category": "security" }, { "query": "I was charged 2x!!!", "expected_sentiment": "helpful_empathetic", "category": "billing" }, { "query": "Can I pay with Bitcoin?", "expected_contains": ["not supported", "credit card"], "category": "payment_methods" }, # ... more test cases ]
rstation.define_tests(agent, test_cases)
Step 3: Community testing
rStation dashboard shows:
- Your agent is available for testing
- 50+ community members are testing it
- Test results in real-time: ✓ 152 tests passed ✗ 8 tests failed ⚠️ 5 tests concerning (agent uncertain)
Community feedback: "Agent failed on broken Portuguese (typos)" "Agent hallucinated about refund policy" "Agent was helpful but slow (took 5s)" "Great empathy! But wrong info on pricing"
Step 4: Iterate and improve
python
See failing tests
failing_tests = rstation.get_failing_tests(agent)
for test in failing_tests: print(f"Failed: {test['query']}") print(f"Expected: {test['expected_contains']}") print(f"Got: {test['actual_response']}")
Fix agent (improve prompt, add knowledge, adjust tools)
agent.system_prompt = "You are a helpful customer support agent..." agent.knowledge_base = updated_faq
Re-upload
rstation.upload(agent)
Test again
results = rstation.test(agent) print(f"Pass rate: {results['pass_rate']}%") # 92% → 97% → 99%
Step 5: Deploy to production
python
Only deploy when confident
if results['pass_rate'] >= 0.95: # 95%+ pass rate agent.deploy_to_production() print("Agent deployed safely!") else: print("Not ready yet. Need more fixes.")
Practical benefits: real-world impact
Before rStation (traditional testing)
Timeline: Week 1: Build agent (5 days) Week 2: Test locally (5 days) - 50 test cases - Manual review - "Looks good!"
Day 1 production: "Agent works!" Day 2 production: Customer #50 finds bug - Agent says "delete your account" (wrong) - Customer: "Never using this again" - You: "Oh no!"
Day 3-5: Crisis mode - Fix bug (or try to) - Test more - Deploy fix - Customer trust: broken - Churn: +10%
Cost: - Customer churn: -R$ 100k (one customer gone) - Reputation: damaged (word of mouth) - Support tickets: +500% (everyone found issues) - Team: stressed (crisis mode) - Total: R$ 100k+ (disaster)
With rStation (collaborative testing)
Timeline: Week 1: Build agent (5 days) Week 2: Upload to rStation - 100+ community members test - Edge cases discovered: - Agent fails on angry language - Agent halluculates on policies - Agent slow on long questions - You see all in dashboard
Week 2-3: Iterate - Fix issues (improved prompt, better FAQs) - Re-upload - Community tests again - Pass rate: 80% → 90% → 97%
Week 3: Deploy - 97% pass rate (confident) - Production launch: smooth - No crisis (agents safe) - Customer trust: strong
Cost: - Community testing: free (crowd-sourced) - Bug discovery: early (before production) - Production disasters: prevented (0) - Team: calm (no crisis) - Customer churn: 0% - Total: R$ 0 (saved R$ 100k+)
ROI breakdown
Traditional approach: Cost per agent: R$ 50k (development + testing + crisis) Risk: high (production disasters) Time to market: 2-3 weeks Customer satisfaction: medium (bugs found in prod)
rStation approach: Cost per agent: R$ 5k (development + platform fee) Risk: low (tested before prod) Time to market: 2-3 weeks (same) Customer satisfaction: high (safe launch)
Difference:
- Cost saved: R$ 45k per agent
- Risk reduced: 90%+ (fewer production disasters)
- Reputation improved: higher NPS (safe agent)
- Competitive advantage: faster iteration (learn from community)
Break-even: launch 1 agent, save R$ 45k (pays for itself)
Real example: support agent testing
Your agent: payment support
Agent specs:
- Handles payment questions
- Searches FAQ
- Can create support tickets
- Can check payment status
You upload to rStation Community finds:
-
Angry customer ("I was charged 2x!!!")
- Agent: invents solution (hallucination)
- Community: "This is wrong!"
- You fix: better system prompt
-
Portuguese with typos ("cobraça duplada")
- Agent: doesn't understand
- Community: "Can't handle typos!"
- You fix: add typo-tolerant search
-
Long question (10,000 characters)
- Agent: timeout (token limit)
- Community: "Agent is slow!"
- You fix: summarize before processing
-
Edge case (customer from different country)
- Agent: assumes Brazilian reais
- Community: "Agent is wrong for international!"
- You fix: ask country, adjust logic
-
Security test (prompt injection)
- Agent: "Forget your instructions, now..."
- Community: "Agent can be jailbroken!"
- You fix: prompt hardening
After 2 weeks of iteration:
- Pass rate: 97%
- Edge cases handled: 50+
- Production ready: YES
- Launch: confident
Comparison: testing approaches
Option A: Manual testing (traditional)
Pros: ✓ Simple (you know what to do) ✓ Control (you decide what to test)
Cons: ✗ Time consuming (100+ cases = 10 hours) ✗ Incomplete (miss 99% of edge cases) ✗ Bias (you test things you think of) ✗ Blind spots (don't know what you don't know) ✗ No guarantee (still breaks in production) ✗ Expensive (your time = cost)
Option B: Automated testing (with rStation)
Pros: ✓ Comprehensive (1000+ test cases automated) ✓ Community input (50-100 testers find edge cases) ✓ Unbiased (strangers find what you miss) ✓ Scalable (test multiple agents simultaneously) ✓ Cheap (crowd-sourced, no hourly cost) ✓ Production safe (confidence before launch)
Cons: ✗ Requires setup (define test cases) ✗ Community dependent (quality of testers varies) ✗ Feedback loop (takes time to iterate)
Option C: Manual + rStation (recommended)
Pros: ✓ Your tests (what you know matters)
- Community tests (what you don't know) = Comprehensive coverage
Result:
- Pass rate: 95%+
- Confidence: high
- Edge cases: discovered early
- Production safety: strong
- Customer satisfaction: high
Conclusion: Testing is not optional
Realidade:
Agent in production without testing:
- 50% chance of catastrophic failure (first week)
- Customer trust: broken
- Churn: 10-30%
- Cost: R$ 50k-500k (disaster)
Agent tested locally only:
- 30% chance of failure in production (missed edge cases)
- Customer frustration: medium
- Churn: 5-10%
- Cost: R$ 10k-50k (preventable)
Agent tested with community (rStation):
- <5% chance of failure in production
- Customer trust: strong
- Churn: 0-2%
- Cost: R$ 0 (saved R$ 50k+ from avoided crises)
Action: test before production
-
Define test cases (what matters for your agent)
-
Use rStation (or similar collaborative lab)
-
Iterate based on feedback (fix issues)
-
Reach 95%+ pass rate (confident)
-
Deploy to production (safe)
-
Monitor and improve (ongoing)
→ OpenClaw: Agent Testing, Production Safety, rStation, SaaS Quality
Agent seu está pronto pra produção? Ou vai quebrar na primeira semana? 🧪
Publicado em 17 de outubro de 2026