jaigent is an autonomous coding assistant powered by a step-by-step local LLM loop using the OpenAI SDK and Ollama. It explores a project environment, finds bugs, and applies fixes independently by chaining operations.
- Unified Interface Patterns: Swapping
base_urlto run local models (gemma4:12b) using standard cloud SDKs. - Strict Tool Schemas: Bridging AI text and real code using
ChatCompletionToolParamJSON schemas to enforce mandatory parameters. - State Management: Orchestrating an autonomous
forloop that manages multi-turn history with assistant requests and tool roles. - Local Model Alignment: Overcoming tool-call bias in smaller models through sharp negative constraints inside the system prompt.
- Sandboxed Execution: Injecting a strict
working_directorypath constraint to keep AI modifications safe and secure.
main.py— The core agent orchestration and multi-turn loopcall_tool.py— The execution router that maps schemas to Python functionsfunctions/— Individual modules pairing tool logic with strict OpenAI schemas
This project was heavily inspired by the Boot.dev AI Agent Course. While the original course teaches agent architecture using the Gemini API, jaigent adapts those structural concepts to work entirely with local LLMs via the OpenAI SDK interface.