Agent Not Responding
Symptoms: Agent connects but does not respond to messages. Possible causes and fixes:| Cause | Fix |
|---|---|
generate_response not implemented | Add the generate_response method to your agent class |
| Not yielding content | Make sure you yield text chunks in generate_response |
| LLM call failing silently | Add error logging around LLM calls |
| Event not reaching agent | Check graph connections with add_edge |
Tool Not Being Called
Symptoms: LLM never calls your tool even when it should. Possible causes and fixes:| Cause | Fix |
|---|---|
| Tool not discovered | Call tool_registry.discover(self) |
| Schemas not passed to LLM | Add tools=self.tool_schemas to chat call |
| Poor docstring | Write a clear, descriptive docstring |
| Tool name too vague | Use specific, descriptive names |
Audio Not Playing
Symptoms: Agent responds in logs but user hears nothing. Possible causes and fixes:| Cause | Fix |
|---|---|
| Server not running | Ensure python agent.py is running |
| Wrong port | Check server is on expected port (default 8080) |
| TTS configuration issue | Check voice settings in dashboard |
| Empty responses | Ensure generate_response yields non-empty strings |
Connection Errors
Symptoms: CLI cannot connect to agent. Fixes:-
Check server is running:
-
Verify port:
-
Check for port conflicts:
LLM Errors
Symptoms: LLM calls fail with errors. Common errors and fixes:| Error | Cause | Fix |
|---|---|---|
401 Unauthorized | Invalid API key | Check OPENAI_API_KEY environment variable |
429 Rate Limited | Too many requests | Add retry logic or reduce call frequency |
500 Server Error | Provider issue | Implement fallback to another provider |
| Timeout | Slow response | Increase timeout or use faster model |
Session Ending Early
Symptoms: Conversation ends unexpectedly. Possible causes:| Cause | Fix |
|---|---|
Exception in generate_response | Add try/except around your code |
Missing wait_until_complete | Ensure setup calls await session.wait_until_complete() |
| Tool raising exception | Wrap tool logic in try/except |
Slow Response Times
Symptoms: Agent takes too long to respond. Optimization strategies:| Strategy | Implementation |
|---|---|
| Use faster model | Switch to gpt-4o-mini or claude-3-haiku |
| Enable streaming | Always use stream=True |
| Reduce context | Limit conversation history length |
| Parallel tool calls | Use parallel=True in registry.execute |
| Shorter prompts | Trim system prompt to essentials |
Memory Issues
Symptoms: Agent uses too much memory or crashes. Fixes:-
Clear old context periodically:
- Do not store large data in instance variables
-
Clean up resources in
stop:
Import Errors
Symptoms: Module not found or import errors. Fixes:-
Install the package:
-
Check Python version (requires 3.10+):
-
Check virtual environment is active:
Getting Help
If you cannot resolve an issue:- Check the Discord for community help
- Search existing GitHub issues
- Open a new issue with:
- Python version
- SDK version (
pip show smallestai) - Minimal code to reproduce
- Full error traceback

