barun-saha/kodeagent
LibraryKodeAgent is a minimalistic approach to building AI agents. It's designed to be the robust reasoning core inside your larger system, not the entire platform.
The minimal AI agent engine
kodeagent.readthedocs.io/en/latest/
- Python100.0%
1 Review
KodeAgent is a focused Python library for building AI agents without adopting a large application framework. It supports ReAct, CodeAct, and native function-calling agents while leaving storage, user interfaces, and deployment choices to the developer. This makes it a good fit for people who want an agent reasoning engine that can be added to an existing system.
The repository offers more than its “minimal” description might suggest. It includes planning, progress monitoring, loop detection, retries, model switching through LiteLLM, optional tracing, usage tracking, CSV analysis, web tools, code review, and both local and E2B code execution. It also provides examples for Ollama and small language models, which makes the project useful for developers who do not want to depend only on hosted models.
Testing is a major strength. KodeAgent has a large unit test suite covering its main agent types, history handling, retries, recurrent mode, tools, tracing, code runners, security patterns, planning, file tracking, and usage reporting. Pull requests are tested across Python 3.10 through 3.13, and current checks are passing. The project also publishes releases to PyPI and provides detailed API documentation through Read the Docs.
The README is thorough and honest about the project’s limits. It clearly says that KodeAgent is still evolving, does not provide automatic long-term memory, and should not be treated as a complete agent platform. The Apache 2.0 license, provider examples, Colab notebooks, local Ollama guide, and security documentation all make the project easier to explore.
The most important improvement concerns code execution. The README includes a CodeAct example that uses run_env='host', but the security guide says host execution is dangerous and should only be used for trusted development. A copied example can quickly become production code, so the safest environment should be the main example. Host execution should require a clear opt-in flag, display a strong warning, and refuse untrusted code by default.
Static pattern checks and an LLM security review are useful safety layers, but they are not a true sandbox. Allowed Python imports can still expose powerful behavior through indirect calls, package side effects, file objects, or existing modules. The documentation should separate protections that are enforced by KodeAgent from limits that depend on E2B or another external sandbox. Security tests should include bypass attempts, symbolic links, encoded payloads, object introspection, package installation attacks, network access, environment leaks, process spawning, and resource exhaustion.
Project maintenance could also be improved with a dedicated security reporting policy, contribution guide, code of conduct, issue templates, and pull request template. The package metadata still contains a placeholder author email, which should be corrected before the next release. CI could add Ruff, type checking, dependency scanning, package build checks, and a clean installation test for every supported Python version. A small compatibility table for LiteLLM, E2B, tracing providers, and optional tools would help users avoid dependency conflicts.
The README is long, so a shorter first-run path would improve onboarding. A basic function-calling example could be shown first, followed by a separate advanced guide for code execution, planning, tracing, and specialized agents. The empty roadmap section should either be filled with current goals or removed until a roadmap is ready.
Overall, KodeAgent offers a useful balance between simplicity and real agent features. Its broad model support, strong unit tests, good documentation, and frameworkless design are all valuable. Safer code-execution defaults, clearer security boundaries, and stronger project governance would make this promising library easier to use with confidence.
