A code-editing agent built with Vercel AI SDK and FriendliAI provider, following the architecture described in ampcode.com/how-to-build-an-agent.
- Bun >= 1.0
- FriendliAI API token
Run directly without installation:
export FRIENDLI_TOKEN=your_token_here
bunx github:minpeter/agent#mainbun install -g github:minpeter/agent
export FRIENDLI_TOKEN=your_token_here
code-editing-agent- Clone the repository:
git clone https://github.com/minpeter/code-editing-agent.git
cd code-editing-agent- Install dependencies:
bun install- Set your FriendliAI token:
export FRIENDLI_TOKEN=your_token_here- Run the agent:
bun start$ bun start
Chat with AI (model: LGAI-EXAONE/K-EXAONE-236B-A23B)
Use '/help' for commands, 'ctrl-c' to quit
You: what's in package.json?
tool: read_file({"path":"package.json"})
AI: The package.json file contains...
You: create a hello.js file that prints "Hello World"
tool: edit_file({"path":"hello.js","old_str":"","new_str":"console.log('Hello World');"})
AI: I've created hello.js...
You: /help
Available commands:
/help - Show this help message
/clear - Clear current conversation
/model - Show and select available AI models
/render - Render conversation as raw prompt text
/quit - Exit the program
You: ^C
Uses LGAI-EXAONE/K-EXAONE-236B-A23B via FriendliAI serverless endpoints by default. Use /model command to switch models.
MIT