Personal AI Coder Agent
A powerful autonomous AI framework using Ollama and CodeLlama:7B-Instruct
Built to plan, code, and improve real-world applications β starting with a Blog Platform (FastAPI + HTML + TailwindCSS).


If Code Companion responds slowly, itβs likely due to low system resources β not the codebase.
Recommendations:
Systems with less than 8GB RAM or no GPU may face slow or failed AI inference.
If your system is high-end, unlock advanced performance using:
CodeLlama-13B-InstructCodeLlama-34B-InstructDeepseek-Coder-33BWizardCoder-33B-Instructπ§ These offer results close to GPT-4.5 / Devin AI / Cursor AI β completely offline.
3.10.1220.18.0codellama:7b-instruct git clone https://github.com/bhaktofmahakal/Code-Companion-personal-ai-coder-agent.git
cd Code-Companion-personal-ai-coder-agent
Backend Setup (FastAPI)
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
Frontend Setup (html + TailwindCSS)
Start Ollama
ollama run codellama:7b-instruct
Start Backend API
uvicorn backend.main:app --host 0.0.0.0 --port 8000
π§ͺ How It Works
Sample Input : βBuild a blog platformβ
The agent will:
Plan tasks using prompts
Generate and execute code
Review and improve the solution
Provide downloadable output
π§ AI Code Companion β Main Capabilities
The application provides several API endpoints:
/generate_code: Generate, debug, or explain code/analyze_code: Analyze code structure/generate_tests: Generate unit tests/security_scan: Scan code for security issues/plan_implementation: Break down complex tasks/generate_project: Create multi-file projects/share_code: Share code via unique URLs/save_prompt_template: Save custom prompt templates/highlight_code: Format code with syntax highlightingapp.py: Main FastAPI applicationutils.py: Utility functions for code analysis, test generation, etc.static/: Static files (HTML, CSS, JS)Prompts/: Prompt templatesshared_code/: Shared code snippetsgenerated/: Generated project filesContributions are welcome! Please feel free to submit a Pull Request.
Fork this repository
Create your feature branch: git checkout -b my-feature
Commit changes: git commit -m 'Add feature'
Push to branch: git push origin my-feature
Create a Pull Request
β‘ Acknowledgments
π» Inspired by: Devin AI, Ghostwriter, Cursor AI