diff --git a/blog/2024-05-21-tiny-type-agent.md b/blog/2024-05-21-tiny-type-agent.md new file mode 100644 index 0000000..61bec51 --- /dev/null +++ b/blog/2024-05-21-tiny-type-agent.md @@ -0,0 +1,41 @@ +--- +slug: tiny-type-agent +title: Tiny Type Agent - Safely Improving Python Code +authors: raymyers +tags: [] +--- + +As a companion to my talk at [The Artificially Intelligent Enterprise Summit](https://www.techstrongevents.com/the-artificially-intelligent-enterprise), I'd like to demonstrate a minimal yet **useful** and **safe** Autonomous DevTool. + +Nopilot talk + +## Definitions + +Let's adopt these loose terms for now. + +* **Assistant**: Takes ~1 action per user interaction +* **Agent**: Completes a meaningful task by taking many actions with environment feedback +* **Autonomous DevTool**: AI agent packaged into a polished product, ready to integrate with your software development lifecycle + + +## Use case: Add type-hints to legacy Python + +Suppose you like type checking for Python, but the hints are toilsome to add! + +This 400-line Python script shows how to address this with LLMs combined with safegaurds: [tiny-type-agent](https://github.com/raymyers/tiny-type-agent) on GitHub. + +* LLM suggests types +* Agent uses Tree-Sitter to update the syntax tree in a tmp "shadow file" +* MyPy validates the shadow file +* Based on the result, Agent updates the original source or discards suggestion + +It is perhaps not yet a DevTool because it's not polished (for that, help us finish the larger tool [Menderbot](https://github.com/craftvscruft/menderbot)), but it shows a workflow that is safe enough to improve production code with extremely low risk. In fact, it has already been used to update production code at a major company and found bugs in the process. + +## Background + + + +*With patience the most tangled cord may be undone.* + +--- +*Want to help out? [See where you fit in!](/contributing)* \ No newline at end of file diff --git a/static/img/Ray-Myers-AIE-talk-1080x1080.png b/static/img/Ray-Myers-AIE-talk-1080x1080.png new file mode 100644 index 0000000..a69133e Binary files /dev/null and b/static/img/Ray-Myers-AIE-talk-1080x1080.png differ