AgentLoop
VerifiedA minimal open-source agent loop with streaming and tools in plain code.
What is AgentLoop?
AgentLoop provides a transparent implementation of an AI agent that streams model output and executes tools in a simple loop. The entire flow lives in one main route file, making it easy to study and modify without navigating complex directories.
It supports real tool calling with two built-in examples and a clear extension point for adding more. The project uses TypeScript and the official Anthropic SDK, with one-command deployment to Vercel.
This starter targets developers who want to understand and own their agent code rather than rely on opaque frameworks or bloated templates.
Capabilities
What you can build with AgentLoop
Learning agent mechanics
Study a complete streaming tool-use loop to understand how models call functions and process results.
Rapid prototyping
Clone the repo and add custom tools to test ideas without dealing with large codebases.
Production foundation
Use the readable base to extend into a deployed agent with token tracking and error handling.
Install AgentLoop
git clone https://github.com/mnifzied-create/agentloop.git && cd agentloop && npm installgit clone https://github.com/mnifzied-create/agentloop.git
cd agentloop
npm install
cp .env.example .env.local # then paste your ANTHROPIC_API_KEY
npm run dev # http://localhost:3000- 1Clone the repository from GitHub.
- 2Run npm install to set up dependencies.
- 3Copy the example env file and add your Anthropic API key.
- 4Start the dev server with npm run dev.
- 5Open the local URL and test the agent with a sample query.
Works with
AgentLoop: pros & cons
Pros
- +Extremely concise codebase that is easy to read and audit.
- +No framework lock-in or unnecessary UI dependencies.
- +Clear instructions for adding new tools and deploying.
- +Includes practical extras like a token profiler for cost analysis.
Cons
- –Tied specifically to the Anthropic SDK and Claude models.
- –Core version lacks built-in support for multi-tool calls or retries.
- –Requires manual extension for production concerns like memory or confirmation flows.
Frequently asked questions
It works with current Claude models through the official Anthropic SDK.
User reviews
Verified reviews from the community shape this listing's rating.
Loading reviews…