{"id":28073,"library":"pw-agent","title":"PastaWater Agent","description":"A CLI coding assistant powered by your Ollama GPUs. Uses local LLMs for code generation, chat, and agentic workflows. Current version: 1.50.40. Released frequently via PyPI.","status":"active","version":"1.50.40","language":"python","source_language":"en","source_url":"https://github.com/PastaWater/pw-agent","tags":["llm","cli","ollama","coding-assistant","agent"],"install":[{"cmd":"pip install pw-agent","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required to connect to Ollama server for LLM inference.","package":"ollama","optional":false},{"reason":"Used for structured output and function calling.","package":"instructor","optional":true}],"imports":[{"note":"The module exposes the agent directly; no need to traverse submodules.","wrong":"from pw_agent.pw_agent import PastaWaterAgent","symbol":"PastaWaterAgent","correct":"from pw_agent import PastaWaterAgent"}],"quickstart":{"code":"from pw_agent import PastaWaterAgent\nimport os\n\nagent = PastaWaterAgent(\n    ollama_host=os.environ.get('OLLAMA_HOST', 'http://localhost:11434'),\n    model='codellama'\n)\nresponse = agent.chat(\"Write a Python function to compute Fibonacci numbers.\")\nprint(response)","lang":"python","description":"Initialize the agent with an Ollama host and model, then send a chat message."},"warnings":[{"fix":"Use PastaWaterAgent(model='codellama').","message":"In version 1.40.0 the constructor changed: `model_name` is now `model`. Old code PastaWaterAgent(model_name='codellama') breaks.","severity":"breaking","affected_versions":">=1.40.0"},{"fix":"Set a reasonable timeout or check connectivity before calling agent methods.","message":"The agent requires an active Ollama server. If OLLAMA_HOST is unreachable, the agent hangs without timeout error.","severity":"gotcha","affected_versions":"all"},{"fix":"Use agent.chat() instead of agent.generate().","message":"Method `generate` has been deprecated in favor of `chat`. It still works but will be removed in v2.0.","severity":"deprecated","affected_versions":">=1.45.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Install with pip install pw-agent and import as from pw_agent import PastaWaterAgent.","cause":"The package installs as 'pw-agent' but the import uses underscores: pw_agent.","error":"ModuleNotFoundError: No module named 'pw_agent'"},{"fix":"Run 'ollama pull codellama' in terminal before using the agent.","cause":"The specified model is not pulled in Ollama.","error":"OllamaError: model 'codellama' not found"},{"fix":"Use from pw_agent import PastaWaterAgent directly.","cause":"Importing incorrectly (e.g., import pw_agent then pw_agent.PastaWaterAgent) or old version.","error":"AttributeError: module 'pw_agent' has no attribute 'PastaWaterAgent'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}