Skip to main content

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 library that helps you build intelligent agents that can reason, plan, act, and reflect using any large language model (LLM) backend (e.g., OpenAI, Claude, Mistral via OpenRouter, or your local model). It abstracts the complexity and gives you:

  • ๐Ÿ”Œ LLM plugin support (OpenAI, Claude, etc.)
  • ๐Ÿง  Memory integration (Dict, JSON, Vector optional)
  • ๐Ÿ›  Tool support (web search, calculator, file I/O)
  • โš™๏ธ YAML or Python-based config
  • ๐Ÿ–ฅ CLI for easy launching and debugging
  • ๐Ÿ”’ API-key agnostic โ€” the user supplies their own keys

๐Ÿš€ Features

  • Define agents in Python or YAML
  • Core agent loop: plan โ†’ act โ†’ reflect โ†’ iterate
  • Pluggable tools and memory systems
  • Easily extend tools with Python
  • Support for streaming, retry, and debugging
  • CLI interface built with Typer
  • Designed to be lightweight, transparent, and powerful

๐Ÿ“ Folder Structure

agentik/
โ”‚
โ”œโ”€โ”€ agent.py          # ๐Ÿง  Core agent class and reasoning loop
โ”œโ”€โ”€ llms.py           # ๐Ÿ”Œ LLM backend interfaces (OpenAI, Claude, etc.)
โ”œโ”€โ”€ tools/            # ๐Ÿ›  Built-in and user-defined tools
โ”‚   โ””โ”€โ”€ __init__.py
โ”‚   โ””โ”€โ”€ calculator.py
โ”‚   โ””โ”€โ”€ websearch.py
โ”‚   โ””โ”€โ”€ filereader.py
โ”‚   โ””โ”€โ”€ ...
โ”œโ”€โ”€ memory.py         # ๐Ÿง  Memory backends (Dict, JSON, FAISS, etc.)
โ”œโ”€โ”€ config.py         # ๐Ÿงพ YAML/JSON config parser using pydantic
โ”œโ”€โ”€ cli.py            # ๐Ÿ’ป CLI interface using Typer
โ”œโ”€โ”€ utils.py          # โš™๏ธ Logger, token counter, helper functions
โ”‚
examples/             # ๐ŸŽฏ Sample agents and use-cases
tests/                # ๐Ÿงช Unit and integration tests
configs/              # โš™๏ธ YAML-based agent configuration files

๐Ÿง  Agent Workflow

The typical execution flow of an Agent in agentik:

[User Prompt] 
    โ†“
[Agent.run(prompt)]
    โ†“
[Plan Step] โ†’ Uses LLM to decide next action/tool
    โ†“
[Act Step] โ†’ Runs selected tool or memory query
    โ†“
[Reflect Step] โ†’ Evaluates outcome and updates memory
    โ†“
[Repeat or Finish]

๐Ÿ“ฆ Installation

Python 3.10+ is required

pip install agentik-framework

๐Ÿ›  Usage

โœจ Create an Agent (Python Way)

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-here", model="gpt-4"),
    memory=JSONMemoryStore("memory.json")
)

agent.run("What's the latest in AI agent frameworks?")

โš™๏ธ Create an Agent via YAML (config.yaml)

name: "ResearchBot"
goal: "Summarize recent advancements in generative AI"
llm:
  type: openai
  model: gpt-4
  api_key: "YOUR_KEY_HERE"
tools:
  - web_search
  - file_reader
memory:
  type: json
  path: "memory.json"

๐Ÿ“‚ Main File to Run

There are two main entrypoints to run the framework:

1. Python File

You can create and run a Python file such as run_agent.py:

from agentik.config import load_agent_config
from agentik.agent import Agent

agent = load_agent_config("configs/my_agent.yaml")
agent.run("What are LLM agents?")

2. CLI Command (Recommended)

agentik run configs/my_agent.yaml --verbose

Make sure you run this inside the directory containing your YAML and memory files.


๐Ÿง  Supported LLMs

agentik supports the following backends (via your API keys):

  • OpenAI (via OpenRouter)
  • Mistral (via OpenRouter)
  • Claude (via OpenRouter)
  • DeepSeek (via OpenRouter)
  • Local models via REST API

All models are initialized via the llms.py interfaces and passed as parameters. No key is embedded in the code.


๐Ÿ”Œ Built-in Tools

Tool Name Description
CalculatorTool Evaluate math expressions
WebSearchTool Search web results using DuckDuckGo/SerpAPI
FileReaderTool Read content from .txt or .md files
JsonTool Work with structured JSON documents

Tools are extendable: just subclass Tool and implement a run(input) method.


๐Ÿ“‚ Where to Put Code?

File What to write here
agent.py Core agent planning loop (already built-in)
llms.py Add your own LLM wrapper classes (if needed)
memory.py Custom memory strategies (default: Dict, JSON)
tools/ Add new tools (e.g., mytool.py) and register dynamically
config.py Modify or validate YAML loading logic (via pydantic)
cli.py Main command-line logic (already pre-written via typer)
examples/ Place your sample agents or demo scripts
configs/ Store reusable YAML configuration for agents

๐Ÿงช Testing

pytest tests/

You can mock LLM API responses and test agent planning, memory storage, and tool execution.


๐Ÿ–ฅ CLI Commands

agentik run configs/my_agent.yaml
agentik list-tools
agentik create-agent
agentik explain memory

Flags:

  • --verbose โ†’ detailed logs
  • --dry-run โ†’ simulate without actual LLM/API calls

๐Ÿ“š Documentation

  • Markdown-based, hosted on GitHub Pages
  • Located in docs/ (optional)
  • Includes: Getting Started, API Reference, Tool Dev Guide

๐Ÿง‘โ€๐Ÿ’ป Contributing

We welcome contributions!

  • Fork this repo
  • Add your tool or feature
  • Write tests in tests/
  • Submit PR with clear explanation

๐Ÿ“ฆ Packaging (for PyPI)

python -m build
twine upload dist/*

๐Ÿ“„ License

MIT License ยฉ 2025 [Vinay Joshi, Avinash Raghuvanshi]


๐Ÿง  Philosophy

agentik isnโ€™t trying to do everything for you โ€” it gives you clean scaffolding and powerful abstractions to build your own intelligent agent workflows, your way.

Build smart. Stay lightweight. Go modular.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentik_framework-0.1.1.tar.gz (20.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentik_framework-0.1.1-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

Details for the file agentik_framework-0.1.1.tar.gz.

File metadata

  • Download URL: agentik_framework-0.1.1.tar.gz
  • Upload date:
  • Size: 20.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for agentik_framework-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1e6dfee8b3393b0f9b0e09580ee1a1a690fa1af2e2647e7d58080f917dff0fed
MD5 93f8679f694ffdd69c25ab43274911ee
BLAKE2b-256 aeaa5a708ab27340021d50459b4dad36dbee022ce48c3604a58563609031e51c

See more details on using hashes here.

File details

Details for the file agentik_framework-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for agentik_framework-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 44b4587e70ca043e06f60732499100a2c4618797a32e6806c72bba35e9ce5a8a
MD5 9a7a57593960d5e99e18670062d60287
BLAKE2b-256 d0dcaae0c166d0fc709b0885f1f18590d5e08fc2538dbf8a16ebef315fa1eb39

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page