Lightweight, Modular Agent Framework for AI planning, tools, and memory
Project description
Agentik – Modular Agentic AI Framework for Python
A lightweight, modern, and pluggable Python framework to build AI agents with reasoning, memory, tool-use, and LLM backend support — designed to be minimal, extensible, and developer-friendly.
What is Agentik?
Agentik is a Python framework to create intelligent agents that can reason, plan, act, and reflect using LLMs such as OpenAI, Claude, Mistral, (via OpenRouter) or your own local model.
Agentik abstracts complexity while remaining highly modular and configurable.
Key Highlights:
- LLM plugin support (OpenAI, Claude, Mistral, etc.)
- Multiple memory types (in-memory dict, JSON, vector-based)
- Tool integration (web search, calculator, file reader, etc.)
- Configuration via YAML or Python
- Command-line interface (CLI) for launching/debugging
- API-key agnostic: the user supplies their own keys
Features
- Define agents in Python or YAML
- Core reasoning loop:
plan → act → reflect → iterate - Extendable tool and memory systems
- Streaming, retry logic, and debug logging supported
- Built-in CLI powered by
Typer - Lightweight, extensible, and transparent by design
Folder Structure
::
agentik/
├── agent.py # Core agent class and reasoning loop
├── llms.py # LLM backend interfaces (OpenAI, Claude, etc.)
├── tools/ # Built-in and custom tools
│ ├── calculator.py
│ ├── websearch.py
│ ├── filereader.py
├── memory.py # Memory backends (Dict, JSON, FAISS, etc.)
├── config.py # YAML/JSON config parser (uses pydantic)
├── cli.py # CLI interface using Typer
├── utils.py # Logger, token counter, and helpers
├── examples/ # Sample agents and use-cases
├── tests/ # Unit and integration tests
├── configs/ # YAML-based agent configuration files
Agent Workflow
::
[User Prompt]
↓
[Agent.run(prompt)]
↓
[Plan Step] → Uses LLM to decide next action/tool
↓
[Act Step] → Executes selected tool or memory
↓
[Reflect Step] → Evaluates and stores output in memory
↓
[Repeat or Finish]
Installation
Requires Python 3.10+
Install via pip:
::
pip install agentik-framework
Usage
Create an Agent in Python:
::
from agentik import Agent
from agentik.tools import WebSearchTool, CalculatorTool
from agentik.llms import OpenAIModel
from agentik.memory import JSONMemoryStore
agent = Agent(
name="AIAssistant",
goal="Find and summarize the latest AI trends.",
tools=[WebSearchTool(), CalculatorTool()],
llm=OpenAIModel(api_key="your-api-key", model="gpt-4"),
memory=JSONMemoryStore("memory.json")
)
agent.run("What's the latest in AI agent frameworks?")
Or define the same agent in YAML (configs/agent.yaml):
::
name: "ResearchBot"
goal: "Summarize recent advancements in generative AI"
llm:
type: openai
model: gpt-4
api_key: "YOUR_API_KEY"
tools:
- web_search
- file_reader
memory:
type: json
path: "memory.json"
Entrypoints
You can run agents via Python or CLI:
- Python
::
from agentik.config import load_agent_config
agent = load_agent_config("configs/my_agent.yaml")
agent.run("What are LLM agents?")
- Command Line
::
agentik run configs/my_agent.yaml --verbose
Supported LLMs
Agentik currently supports:
- OpenAI (via OpenRouter)
- Mistral (via OpenRouter)
- Claude (via OpenRouter)
- DeepSeek (via OpenRouter)
- Local LLMs (via REST API)
All LLMs are configured via llms.py, and keys are user-supplied.
Built-in Tools
================= ================================================ Tool Name Description
CalculatorTool Evaluate mathematical expressions
WebSearchTool Search the web via DuckDuckGo or SerpAPI
FileReaderTool Read .txt or .md files
JsonTool Navigate and query structured JSON files
================= ================================================
To build custom tools, subclass Tool and implement the run(input) method.
Code Organization
====================== ============================================= File Purpose
agent.py Core agent logic (plan-act-reflect loop)
llms.py Add your own LLM classes if needed
memory.py Extend memory backends
tools/ Define custom tools here
config.py YAML/JSON config validation (pydantic-based)
cli.py CLI logic via typer
examples/ Place demo or prototype agents
configs/ Store agent configuration files
====================== =============================================
Testing
Run all tests using pytest:
::
pytest tests/
You may mock LLM responses and test memory and tool functions.
CLI Commands
::
agentik run configs/my_agent.yaml
agentik list-tools
agentik create-agent
agentik explain memory
Flags:
--verbose: Show step-by-step logs--dry-run: Run agent logic without real API calls
Documentation
- Documentation is located in the
docs/folder (optional) - Can be hosted on GitHub Pages or similar
- Includes: Getting Started, API Reference, Tool Developer Guide
Contributing
We welcome contributions of tools, backends, and examples!
- Fork the repository
- Create your new tool or memory backend
- Add tests to
tests/ - Submit a pull request with a clear explanation
Packaging for PyPI
::
python -m build
twine upload dist/*
License
MIT License © 2025 (Avinash Raghuvanshi, Vinay Joshi)
Philosophy
Agentik provides the scaffolding — you bring the logic.
It doesn’t aim to be monolithic. Instead, Agentik helps you build modular, intelligent workflows tailored to your own agent needs.
Build smart. Stay lightweight. Go modular.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentik_framework-0.1.3.tar.gz.
File metadata
- Download URL: agentik_framework-0.1.3.tar.gz
- Upload date:
- Size: 19.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e840e0bb5b87e694408a0e4451bcc149d8207c1c55302211b0b801a930d27f07
|
|
| MD5 |
7c0dbe90fe090d58b4ef7d22fff46655
|
|
| BLAKE2b-256 |
39344427ef01766c7115281554bf046aa6890e111fc2d5d85eb04e78841de7f8
|
File details
Details for the file agentik_framework-0.1.3-py3-none-any.whl.
File metadata
- Download URL: agentik_framework-0.1.3-py3-none-any.whl
- Upload date:
- Size: 23.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e23c01cd0e34860c00c45d784aa39f0455534fc749292af6e708e50a28772430
|
|
| MD5 |
ab42a2fc5c252019a56d7c671618dcb1
|
|
| BLAKE2b-256 |
0b934a8cca0cfbd7920338f40a61c00cd6e0f9e0bc3b303b647b99b28c20732b
|