KodeAgent
KodeAgent is a frameworkless, minimalistic engine for building AI agents, supporting ReAct, CodeAct, and native function calling. It solves the problem of creating lightweight, scalable agents that can reason, execute code, and use tools, and is intended for developers who want a robust reasoning core to integrate into larger systems.
✨ Key features
- Supports ReAct, CodeAct, and native Function Calling paradigms.
- Includes Planner and Observer for guidance and auto-correction.
- Optimized for Small Language Models (SLMs) with efficient function calling.
- LLM agnostic via LiteLLM, easily swap between models and providers.
- Minimal dependencies, suitable for serverless and standalone apps.
- Observability integration with Langfuse and LangSmith.
🎯 Use cases
- Build a web research agent that searches and reads webpages.
- Create a data analysis agent that executes Python code for complex tasks.
- Deploy a lightweight function-calling agent on small language models.
- Automate CSV data exploration with a specialized agent.
- Integrate a reasoning core into a larger platform or application.
📦 Installation
🧰 Requirements: Requires Python, an API key for the chosen LLM provider (e.g., GOOGLE_API_KEY for Gemini), and optionally E2B_API_KEY for sandboxed code execution.
pip install -U kodeagent
Or clone and run locally:
git clone https://github.com/barun-saha/kodeagent.git
python -m venv venv
source venv/bin/activatepip install -r requirements.txt🚀 Usage
from kodeagent import ReActAgent, print_response
from kodeagent.tools import read_webpage, search_web
agent = ReActAgent(
name='Web agent',
model_name='gemini/gemini-2.5-flash-lite',
tools=[search_web, read_webpage],
max_iterations=5,
)
for task in [
'What are the festivals in Paris? How they differ from Kolkata?',
]:
print(f'User: {task}')
async for response in agent.run(task):
print_response(response, only_final=True)
⚠️ Good to know
KodeAgent is under active development, capabilities are limited, and it does not provide automated persistent memory management.
❓ FAQ
What agent paradigms does KodeAgent support?
KodeAgent supports ReAct, CodeAct, and native Function Calling paradigms out-of-the-box.
How can I manage state across tasks?
You can use recurrent mode for single-task context or inject chat history for full session context.
What code execution environments are available for CodeActAgent?
CodeActAgent supports 'host' (local) and e2b (E2B sandbox) environments.
How do I enable observability?
Set the relevant environment variables (e.g., LANGFUSE_PUBLIC_KEY) and specify tracing_type as 'langfuse' or 'langsmith' when creating the agent.
📊 Repository
🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 4, 2026. Always check the original source before running commands.