aiccel


Nameaiccel JSON
Version 1.1.9 PyPI version JSON
download
home_pageNone
SummaryAIccel is a versatile Python library for building lightweight AI agents with multiple LLM providers
upload_time2025-10-24 09:15:14
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords ai agents automation llm openai gemini groq multi-agent agentic-ai tools rag
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # AIccel: Lightweight AI Agent Framework

AIccel is a Python library for building lightweight, customizable AI agents. It supports multiple LLM providers (OpenAI, Gemini, Groq), custom tools, and agent collaboration, making it ideal for automation, conversational bots, and task orchestration.

## Installation

```bash
pip install aiccel
```

## Tutorial 

Below are three basic examples to get started with AIccel.

### 1. Single Agent with Search Tool

Create a single agent that uses a search tool to find information.

```python
from aiccel import OpenAIProvider, Agent, ToolRegistry
from aiccel.tools import SearchTool

provider = OpenAIProvider(api_key="your-openai-api-key", model="gpt-4o-mini")

search_tool = SearchTool(api_key="your-serper-api-key")


tools = ToolRegistry(llm_provider=provider).register(search_tool)

agent = Agent(
    provider=provider,
    tools=[search_tool],
    name="SearchAgent",
    instructions="Use the search tool to find current information."
)


result = agent.run("What is Spur AI?")
print(result["response"])
```

This agent uses the `SearchTool` to fetch real-time information about "Spur AI" via the Serper API. Replace `your-openai-api-key` and `your-serper-api-key` with your actual API keys.

### 2. Multiple Agents collaboration

Create a group of agents that collaborate.

```python
from aiccel import OpenAIProvider, Agent, AgentManager, ToolRegistry
from aiccel.tools import SearchTool, WeatherTool
import asyncio

provider = OpenAIProvider(api_key="your-openai-api-key", model="gpt-4o-mini")

search_tool = SearchTool(api_key="your-serper-api-key")
weather_tool = WeatherTool(api_key="your-openweather-api-key")



tool_registry = ToolRegistry(llm_provider=provider)
tool_registry.register(search_tool).register(weather_tool)


search_agent = Agent(
    provider=provider,
    tools=[search_tool],
    name="SearchAgent",
    instructions="Use the search tool to find current information.",
    memory_type="buffer",
    max_memory_turns=10,
    max_memory_tokens=2000,
    verbose=True
)

weather_agent = Agent(
    provider=provider,
    tools=[weather_tool],
    name="WeatherAgent",
    instructions="Provide detailed weather information using the weather tool.",
    memory_type="summary",
    max_memory_turns=5,
    max_memory_tokens=1000,
    verbose=True
)

general_agent = Agent(
    provider=provider,
    tools=[search_tool, weather_tool],
    name="GeneralAgent",
    instructions="Answer queries using search or weather tools when needed.",
    memory_type="window",
    max_memory_turns=3,
    max_memory_tokens=500,
    verbose=True
)


manager = AgentManager(
    llm_provider=provider,
    agents={
        "search_expert": {"agent": search_agent, "description": "Handles web searches"},
        "weather_expert": {"agent": weather_agent, "description": "Handles weather queries"},
        "general_expert": {"agent": general_agent, "description": "Handles broad queries"}
    },
    instructions="Route queries to the best-suited agent based on the query content.",
    # logger=logger,
    verbose=True
)


result = manager.route("What is Spur AI?")
print(result["response"])
```

Two agents collaborate: one researches Paris attractions, and the other checks the weather. The `AgentManager` coordinates their efforts. Replace API keys as needed.

### 3. PDF RAG Agent for Document Queries

Create an agent that answers questions based on PDF documents using Retrieval-Augmented Generation (RAG).

```python
from aiccel import OpenAIProvider, Agent, ToolRegistry
from aiccel.pdf_rag_tool import PDFRAGTool
from aiccel.embeddings import OpenAIEmbeddingProvider
import os


provider = OpenAIProvider(api_key="your-openai-api-key", model="gpt-4o-mini")
embedding_provider = OpenAIEmbeddingProvider(api_key="your-openai-api-key", model="text-embedding-3-small")


pdf_rag_tool = PDFRAGTool(
    base_pdf_folder="./docs",
    base_vector_db_path="./vector_store",
    embedding_provider=embedding_provider,
    llm_provider=provider
)


tools = ToolRegistry(llm_provider=provider).register(pdf_rag_tool)


agent = Agent(
    provider=provider,
    tools=[pdf_rag_tool],
    name="PDFRAGAgent",
    instructions="Answer queries using the pdf_rag tool only.",
    strict_tool_usage=True
)


os.makedirs("./docs", exist_ok=True)
os.makedirs("./vector_store", exist_ok=True)


result = agent.run("What is the main topic of the document?")
print(result["response"])
```

This agent uses the `PDFRAGTool` to answer questions based on PDFs in the `./docs` folder. It creates embeddings and stores them in `./vector_store`. Place a PDF in `./docs` before running, and replace API keys.

## Next Steps

- Explore more tools in `aiccel.tools` (e.g., custom tools).
- Configure agent memory (`memory_type`, `max_memory_turns`) for conversation history.
- Check out the AIccel GitHub for advanced examples.

## License

MIT License

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "aiccel",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "ai, agents, automation, llm, openai, gemini, groq, multi-agent, agentic-ai, tools, rag",
    "author": null,
    "author_email": "AROMAL TR <aromaltr2000@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/f8/74/653f85818d97d9e7ebd7bc5afe3ce30e838ddb37af51cca722f5cc06a528/aiccel-1.1.9.tar.gz",
    "platform": null,
    "description": "# AIccel: Lightweight AI Agent Framework\r\n\r\nAIccel is a Python library for building lightweight, customizable AI agents. It supports multiple LLM providers (OpenAI, Gemini, Groq), custom tools, and agent collaboration, making it ideal for automation, conversational bots, and task orchestration.\r\n\r\n## Installation\r\n\r\n```bash\r\npip install aiccel\r\n```\r\n\r\n## Tutorial \r\n\r\nBelow are three basic examples to get started with AIccel.\r\n\r\n### 1. Single Agent with Search Tool\r\n\r\nCreate a single agent that uses a search tool to find information.\r\n\r\n```python\r\nfrom aiccel import OpenAIProvider, Agent, ToolRegistry\r\nfrom aiccel.tools import SearchTool\r\n\r\nprovider = OpenAIProvider(api_key=\"your-openai-api-key\", model=\"gpt-4o-mini\")\r\n\r\nsearch_tool = SearchTool(api_key=\"your-serper-api-key\")\r\n\r\n\r\ntools = ToolRegistry(llm_provider=provider).register(search_tool)\r\n\r\nagent = Agent(\r\n    provider=provider,\r\n    tools=[search_tool],\r\n    name=\"SearchAgent\",\r\n    instructions=\"Use the search tool to find current information.\"\r\n)\r\n\r\n\r\nresult = agent.run(\"What is Spur AI?\")\r\nprint(result[\"response\"])\r\n```\r\n\r\nThis agent uses the `SearchTool` to fetch real-time information about \"Spur AI\" via the Serper API. Replace `your-openai-api-key` and `your-serper-api-key` with your actual API keys.\r\n\r\n### 2. Multiple Agents collaboration\r\n\r\nCreate a group of agents that collaborate.\r\n\r\n```python\r\nfrom aiccel import OpenAIProvider, Agent, AgentManager, ToolRegistry\r\nfrom aiccel.tools import SearchTool, WeatherTool\r\nimport asyncio\r\n\r\nprovider = OpenAIProvider(api_key=\"your-openai-api-key\", model=\"gpt-4o-mini\")\r\n\r\nsearch_tool = SearchTool(api_key=\"your-serper-api-key\")\r\nweather_tool = WeatherTool(api_key=\"your-openweather-api-key\")\r\n\r\n\r\n\r\ntool_registry = ToolRegistry(llm_provider=provider)\r\ntool_registry.register(search_tool).register(weather_tool)\r\n\r\n\r\nsearch_agent = Agent(\r\n    provider=provider,\r\n    tools=[search_tool],\r\n    name=\"SearchAgent\",\r\n    instructions=\"Use the search tool to find current information.\",\r\n    memory_type=\"buffer\",\r\n    max_memory_turns=10,\r\n    max_memory_tokens=2000,\r\n    verbose=True\r\n)\r\n\r\nweather_agent = Agent(\r\n    provider=provider,\r\n    tools=[weather_tool],\r\n    name=\"WeatherAgent\",\r\n    instructions=\"Provide detailed weather information using the weather tool.\",\r\n    memory_type=\"summary\",\r\n    max_memory_turns=5,\r\n    max_memory_tokens=1000,\r\n    verbose=True\r\n)\r\n\r\ngeneral_agent = Agent(\r\n    provider=provider,\r\n    tools=[search_tool, weather_tool],\r\n    name=\"GeneralAgent\",\r\n    instructions=\"Answer queries using search or weather tools when needed.\",\r\n    memory_type=\"window\",\r\n    max_memory_turns=3,\r\n    max_memory_tokens=500,\r\n    verbose=True\r\n)\r\n\r\n\r\nmanager = AgentManager(\r\n    llm_provider=provider,\r\n    agents={\r\n        \"search_expert\": {\"agent\": search_agent, \"description\": \"Handles web searches\"},\r\n        \"weather_expert\": {\"agent\": weather_agent, \"description\": \"Handles weather queries\"},\r\n        \"general_expert\": {\"agent\": general_agent, \"description\": \"Handles broad queries\"}\r\n    },\r\n    instructions=\"Route queries to the best-suited agent based on the query content.\",\r\n    # logger=logger,\r\n    verbose=True\r\n)\r\n\r\n\r\nresult = manager.route(\"What is Spur AI?\")\r\nprint(result[\"response\"])\r\n```\r\n\r\nTwo agents collaborate: one researches Paris attractions, and the other checks the weather. The `AgentManager` coordinates their efforts. Replace API keys as needed.\r\n\r\n### 3. PDF RAG Agent for Document Queries\r\n\r\nCreate an agent that answers questions based on PDF documents using Retrieval-Augmented Generation (RAG).\r\n\r\n```python\r\nfrom aiccel import OpenAIProvider, Agent, ToolRegistry\r\nfrom aiccel.pdf_rag_tool import PDFRAGTool\r\nfrom aiccel.embeddings import OpenAIEmbeddingProvider\r\nimport os\r\n\r\n\r\nprovider = OpenAIProvider(api_key=\"your-openai-api-key\", model=\"gpt-4o-mini\")\r\nembedding_provider = OpenAIEmbeddingProvider(api_key=\"your-openai-api-key\", model=\"text-embedding-3-small\")\r\n\r\n\r\npdf_rag_tool = PDFRAGTool(\r\n    base_pdf_folder=\"./docs\",\r\n    base_vector_db_path=\"./vector_store\",\r\n    embedding_provider=embedding_provider,\r\n    llm_provider=provider\r\n)\r\n\r\n\r\ntools = ToolRegistry(llm_provider=provider).register(pdf_rag_tool)\r\n\r\n\r\nagent = Agent(\r\n    provider=provider,\r\n    tools=[pdf_rag_tool],\r\n    name=\"PDFRAGAgent\",\r\n    instructions=\"Answer queries using the pdf_rag tool only.\",\r\n    strict_tool_usage=True\r\n)\r\n\r\n\r\nos.makedirs(\"./docs\", exist_ok=True)\r\nos.makedirs(\"./vector_store\", exist_ok=True)\r\n\r\n\r\nresult = agent.run(\"What is the main topic of the document?\")\r\nprint(result[\"response\"])\r\n```\r\n\r\nThis agent uses the `PDFRAGTool` to answer questions based on PDFs in the `./docs` folder. It creates embeddings and stores them in `./vector_store`. Place a PDF in `./docs` before running, and replace API keys.\r\n\r\n## Next Steps\r\n\r\n- Explore more tools in `aiccel.tools` (e.g., custom tools).\r\n- Configure agent memory (`memory_type`, `max_memory_turns`) for conversation history.\r\n- Check out the AIccel GitHub for advanced examples.\r\n\r\n## License\r\n\r\nMIT License\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "AIccel is a versatile Python library for building lightweight AI agents with multiple LLM providers",
    "version": "1.1.9",
    "project_urls": {
        "Bug Tracker": "https://github.com/AromalTR/aiccel/issues",
        "Documentation": "https://github.com/AromalTR/aiccel#readme",
        "Homepage": "https://github.com/AromalTR/aiccel",
        "Repository": "https://github.com/AromalTR/aiccel.git"
    },
    "split_keywords": [
        "ai",
        " agents",
        " automation",
        " llm",
        " openai",
        " gemini",
        " groq",
        " multi-agent",
        " agentic-ai",
        " tools",
        " rag"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "30b8a0bb366a8ff126539fba368efb95cdbc0725820536235217d655c2b030d8",
                "md5": "611730d2b722e52bd174bce8864ea3a4",
                "sha256": "bb815a3ec20b4b141a30334eade1b2fe219d77a569ddfb6d146e15ded361b124"
            },
            "downloads": -1,
            "filename": "aiccel-1.1.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "611730d2b722e52bd174bce8864ea3a4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 47655,
            "upload_time": "2025-10-24T09:15:12",
            "upload_time_iso_8601": "2025-10-24T09:15:12.618038Z",
            "url": "https://files.pythonhosted.org/packages/30/b8/a0bb366a8ff126539fba368efb95cdbc0725820536235217d655c2b030d8/aiccel-1.1.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f874653f85818d97d9e7ebd7bc5afe3ce30e838ddb37af51cca722f5cc06a528",
                "md5": "5b71be2a8374d09dfb010b9dde0feb3e",
                "sha256": "610ae8b4c70ccad487af2fb713aaaea31a04e0d201bc7fb47885ebb74d664627"
            },
            "downloads": -1,
            "filename": "aiccel-1.1.9.tar.gz",
            "has_sig": false,
            "md5_digest": "5b71be2a8374d09dfb010b9dde0feb3e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 46041,
            "upload_time": "2025-10-24T09:15:14",
            "upload_time_iso_8601": "2025-10-24T09:15:14.231477Z",
            "url": "https://files.pythonhosted.org/packages/f8/74/653f85818d97d9e7ebd7bc5afe3ce30e838ddb37af51cca722f5cc06a528/aiccel-1.1.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-24 09:15:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "AromalTR",
    "github_project": "aiccel",
    "github_not_found": true,
    "lcname": "aiccel"
}
        
Elapsed time: 2.05940s