F.A.Q.
Answers to the most common questions about optimizing and securing your AI agents.
Why is my token burn so high?
Your agent is likely appending its entire conversation history to every new API call. If you have 50 turns in a conversation, turn 51 includes all previous 50. You must clear the session history regularly or configure auto-resets when the context window reaches a certain threshold.
What is the best model for beginners?
Claude 3.5 Sonnet (via Anthropic) is currently the gold standard for coding and general agent tasks. It is significantly faster and often cheaper than Opus, while matching or exceeding its coding abilities.
How do I reset my session?
In most CLI agent tools, you can type `/clear` or `/reset`. In your config file, look for a setting like `auto_reset_context_threshold` and set it to 20000 or 30000 tokens.
Is it safe to give my agent terminal access?
It carries risk. The agent could accidentally delete files (`rm -rf`) or run malicious code. Always run agent frameworks inside a Docker container, a Virtual Machine, or at least restrict it to a specific workspace directory without `sudo` privileges.
Should I use OpenRouter or direct APIs?
OpenRouter is highly recommended. It acts as a unified API gateway, allowing you to seamlessly switch between Anthropic, OpenAI, Meta, and Google models without changing your code. It also often caches identical prompts across its network, saving you money.
Why does my agent hallucinate paths and filenames?
Context degradation. When the context window gets too large, LLMs 'forget' the exact details from earlier in the prompt. Keep your sessions short, or explicitly instruct the agent to run `ls -la` before making assumptions about file structures.
Can I run OpenClaw locally on my GPU?
Yes, you can configure it to use local models via Ollama or LM Studio. However, for complex autonomous tasks (like refactoring a whole app), local models currently struggle compared to top-tier commercial APIs.
Still have questions?
Check out our detailed guides or connect with the community to learn advanced tactics.
Read the Advanced Guide