KodeAgent

A lightweight Python engine for planning, tool-using, and code-executing AI agents.

Stars
★ 40
Last updated
1mo ago
License
Apache-2.0
Primary language
Python

At a glance

Works with
Universal · cross-platformOpenAI API · Claude API
You'll need
Python 3.10+LiteLLMNetwork accessLocal filesystem
Typical use
A Python-service developer building a web-research workflow can use ReActAgent with search_web and read_webpage for multi-step information gathering.
Main limitation
The project states that it is actively evolving, so aspects may change and capabilities are limited.

What does this agent do, and when should you use it?

KodeAgent is a frameworkless, minimal Python AI-agent engine intended to serve as the reasoning core inside a larger system rather than as a complete platform. It provides ReActAgent, CodeActAgent, and FunctionCallingAgent, using LiteLLM to work with models and providers such as Gemini, GPT, Claude, and Ollama. Agents stream updates asynchronously through agent.run(task), with the completed task result available through agent.task.result. CodeActAgent can execute LLM-generated Python on the local host or in an E2B sandbox, while CSVAnalysisAgent loads CSV data from a URL or path for automated analysis. Tasks are memoryless by default, but callers can use recurrent_mode for the preceding task's context or inject OpenAI-compatible chat history.

A developer creates a ReActAgent, CodeActAgent, or FunctionCallingAgent with a model_name, synchronous Python tools, and iteration settings, then consumes streamed responses with async for response in agent.run(task). ReActAgent can invoke tools such as search_web, read_webpage, and calculator directly. CodeActAgent creates a task plan, repeatedly asks the model for Thought and Python Code, executes tool calls, captures observations, and updates its Planner. It runs generated code either in the application's host environment or an e2b sandbox, with sandbox-created files downloadable to an existing local work_dir. Built-in tools cover file downloads, Markdown extraction, arXiv and Wikipedia search, image generation, and audio or YouTube transcription; developers can also pass their own synchronous Python functions as tools. Optional tracing_type='langfuse' or tracing_type='langsmith' sends traces to those services, while the default tracer is a no-op.

  1. A Python-service developer building a web-research workflow can use ReActAgent with search_web and read_webpage for multi-step information gathering.
  2. An engineering team that needs an LLM to write and run Python while combining tools can use CodeActAgent, choosing E2B for sandboxed execution.
  3. A developer using a small language model with native function calling can use FunctionCallingAgent for its documented retry logic and error detection.
  4. An analyst who needs to load a CSV from a URL or local path and explore it automatically can use CSVAnalysisAgent.
  5. An application team persisting conversations in its own database can resume context by passing OpenAI-compatible chat_history to agent.run.

How do you install or deploy this agent?

Run pip install -U kodeagent. The documented supported runtimes are Python 3.10, 3.11, 3.12, and 3.13. Set credentials for the selected provider, such as GOOGLE_API_KEY for Gemini, OPENAI_API_KEY for OpenAI, or ANTHROPIC_API_KEY for Anthropic; E2B execution also requires E2B_API_KEY. To run from source, use git clone https://github.com/barun-saha/kodeagent.git, create and activate a virtual environment, then run pip install -r requirements.txt.

How do you use this agent?

Import ReActAgent and the required tools, then create an instance such as ReActAgent(name='Web agent', model_name='gemini/gemini-2.5-flash-lite', tools=[search_web, read_webpage], max_iterations=5). Run async for response in agent.run('What are the festivals in Paris? How they differ from Kolkata?'): and print the final output with print_response(response, only_final=True). For generated-code execution, use CodeActAgent and explicitly set run_env, allowed allowed_imports, and, when needed, pip_packages. For E2B, an existing work_dir can be used as the local file-exchange directory.

What are this agent's strengths and limitations?

Pros
  • It offers ReAct, CodeAct, and native function-calling agent modes through one Python-oriented API.
  • Its LiteLLM integration lets applications switch among Gemini, GPT, Claude, and Ollama without changing core logic.
  • CodeActAgent supports both local-host and E2B execution, including transfer of sandbox-generated files to a local workspace.
  • OpenAI-compatible chat-history injection allows an external application to own persistent session state.
Limitations
  • The project states that it is actively evolving, so aspects may change and capabilities are limited.
  • Agents are memoryless across tasks by default; there is no automated long-term memory management or persistence layer.
  • CodeActAgent executes LLM-generated code, and the project explicitly advises reviewing and testing it in constrained, non-production environments.
  • E2B requires an E2B API key; LangSmith is not installed by default and requires separate installation and credentials.
  • Custom tools must be synchronous Python functions; asynchronous tools are unsupported.

How does this agent compare with similar options?

Key facts side by side with the most closely related agents.

Agent Source review Stars Updated Language Full support on
KodeAgent This agent 43 · Major gaps ★ 40 1mo ago Python OpenAI API · Claude API
CaveAgent 62 · Some gaps ★ 202 8d ago Python OpenAI API · Claude API
AI Agents From Scratch 28 · Major gaps ★ 4.8k 2mo ago JavaScript
Langroid 70 · Some gaps ★ 4.1k 7d ago Python Claude Code · OpenAI API

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
43/ 100 5-point scale 2.2 / 5
Trust 7/29
Reliability 6/14
Adaptability 10/18
Convention 10/18
Effectiveness 7/13
Verifiability 3/8
Why each dimension lost points
Trust7 / 29 · 1.2/5

Evidence shows: CodeActAgent supports host and e2b execution environments; host mode executes LLM-generated code locally, posing privilege escalation risk, but provides allowed_imports and pip_packages restrictions, which is partial least privilege. User confirmation mechanism is absent; no human approval or confirmation steps found. Data flow transparency is limited; README describes tools and tracing but not detailed data flow. Sensitive data handling: API keys are managed via environment variables, but no encryption or protection measures are described. Dependency security: Snyk badge and version pinning exist, but no vulnerability report details. External effects: tools like download_file and generate_image may have external side effects, but no sandbox or restrictions provided. Rollback mechanism is missing. Source attribution: README acknowledges multiple projects but lacks detailed code provenance tracking. Deductions: missing user confirmation, rollback mechanism, opaque data flow and sensitive data handling, insufficient dependency security evidence.

Reliability6 / 14 · 2.1/5

Evidence shows: README and code examples are consistent in multiple places, such as tool lists and usage, but no complete API documentation. Dependency availability: requirements.txt pins versions, but arxiv dependency is disabled, potentially affecting functionality. Failure messages: README mentions Observer detects loops and stalls, but no specific error handling examples. Deductions: dependency availability reduced due to arxiv issue, failure message evidence insufficient.

Adaptability10 / 18 · 2.8/5

Evidence shows: README provides multiple usage scenarios, such as ReAct, CodeAct, FunctionCalling, and task-specific agents, and provides Colab notebooks. Capability boundaries: explicitly states no persistent memory and no async tools. Trigger precision: tools are explicitly passed, but no trigger conditions described. Environment fit: supports multiple Python versions and OS, but no detailed deployment guide. Deductions: trigger precision evidence insufficient, environment fit lacks detail.

Convention10 / 18 · 2.8/5

Evidence shows: README has clear structure with sections like Quick Start, Tools, Memory Management, Code Execution, Observability. Install notes are detailed, including pip and source installation. Naming stability: version numbers exist, but no changelog. Examples and FAQ: multiple examples provided, but no FAQ. Known limitations: README explicitly lists non-use cases. License: Apache-2.0, complete. Versioning: GitHub Actions publish workflow exists, but no changelog. Maintenance responsibility: author info in pyproject.toml, but no maintenance plan. Deductions: missing changelog and FAQ, unclear maintenance responsibility.

Effectiveness7 / 13 · 2.7/5

Evidence shows: Output usability: print_response function and streaming output provided, but no structured output format. Marginal value: multiple agent types and tools provided, but advantages over other frameworks not obvious. Cost-benefit: few dependencies, but no performance benchmarks. Deductions: output format and performance benchmark evidence insufficient.

Verifiability3 / 8 · 1.9/5

Evidence shows: Claims in README are partially supported by code examples, but no independent verification. Cross-source corroboration: PyPI and documentation links exist, but no third-party verification. Fact-inference separation: README distinguishes features and limitations, but does not explicitly mark inferences. Deductions: verification evidence insufficient, cross-source corroboration limited.

Risks and how to mitigate them
  • Not found in source: confirmation before actingTurn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.
  • Not found in source: rollback or recovery pathBack up first, or work on a git branch or snapshot, so its changes can be undone.
  • CodeActAgent's host mode executes LLM-generated code directly on the local system, posing security risks; use in isolated environments only.
  • Lack of user confirmation mechanism; agent may perform actions without user approval.
  • The arxiv dependency is disabled, potentially affecting related functionality.
  • No rollback mechanism provided; erroneous actions may be difficult to undo.
Evidence confidence: Low Reviewed Aug 09, 2026 Reviewed revision 606ad64a2b60
See the full review method →

FAQ

Can it replace a full agent platform?
That is not its stated role. KodeAgent is positioned as a reasoning core for a larger system and does not provide automated long-term memory management or a persistence layer.
Is it tied to one model provider?
No. It uses LiteLLM and documents Gemini, GPT, Claude, and Ollama examples; actual availability depends on the selected model and configuration.
What are the safety boundaries for CodeActAgent?
It executes LLM-generated Python on either the host or an E2B sandbox. The project advises reviewing generated code and rigorously testing agents in a constrained, non-production environment.
Does the repository document operating costs?
No pricing is documented for KodeAgent or its external services. Model calls, E2B, and optional observability services require their respective credentials and terms.
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related agents