Pokemon Showdown AI Agents Built with Free LLM APIs and Tool-Calling

A developer built a system where LLMs like Llama 3, Qwen, and Gemma autonomously play Pokémon Showdown battles. The agents analyze the full battle state each turn—type matchups, HP, weather, field conditions, revealed opponent info—and decide whether to attack or switch using structured tool calls.
Key Details
- Routes everything through LiteLLM and exclusively uses models with free API tiers (Groq, Cerebras, OpenRouter, Google AI Studio).
- Zero inference cost to run locally.
- Two modes: Human vs. AI (play against the bot) and AI vs. AI (pit two models against each other).
- Supports 15+ free models out of the box.
- Full observability via Langfuse to see exact tool calls and reasoning per turn.
Architecture Highlights
The agent uses tool-calling to structure decisions—rather than simple prompt-response—raw battlefield data is fed into the LLM, which then selects attack or switch actions via predefined tool schemas. This allows reasoning about complex board states like type advantages and dynamic field effects.
GitHub Repo
Code and setup instructions: github.com/MohamedMostafa259/pokemon-ai-agent
📖 Read the full source: r/LocalLLaMA
👀 See Also

ai-codex: Pre-index your codebase to save Claude tokens
ai-codex is a tool that generates compact markdown indexes of your codebase, allowing Claude Code to skip the initial exploration phase that typically consumes 30-50K tokens per conversation. It creates five files covering routes, pages, libraries, schemas, and components.

pxpipe: Cut Claude Code Token Usage 60% by Rendering Context as Images
pxpipe is a local proxy that renders bulky context (system prompts, tool docs, history) into compact PNGs, cutting input tokens ~10x and costs ~60% on token-dense workloads.

Octopoda: Open Source Memory Layer for Local AI Agents
Octopoda is an open source memory layer that gives local AI agents persistent memory between sessions, semantic search, loop detection, and crash recovery. It runs fully offline with a 33MB embedding model and integrates with LangChain, CrewAI, AutoGen, and OpenAI Agents SDK.

Kstack: Skill Pack for Claude Code to Monitor and Troubleshoot Kubernetes
Kstack is an open-source skill pack that adds slash commands like /investigate, /audit-security, and /cluster-status to Claude Code (and other AI agents) for monitoring and troubleshooting K8s clusters. It uses kubectl, Kubetail, Trivy, and Pluto behind the scenes.