Skip to main content

A modular framework for building and testing conversational AI agents.

Project description

🤖 CogniCoreAI

A modular Python framework for building, testing, and deploying robust conversational AI agents.

PyPI Version PyPI - Python Version Build Status License Code style: black Documentation


CogniCoreAI is a modern Python framework designed to streamline the development of sophisticated conversational AI agents. It provides the essential building blocks for creating agents with persistent memory, swappable LLM backends, and powerful tool-use capabilities.

What makes CogniCoreAI unique is its built-in behavioral simulation framework, which allows you to rigorously test your agent's reasoning and decision-making processes, ensuring they are reliable and perform as expected.

Key Features

  • 🤖 Modular & Extensible: Swap out components like LLMs, memory, and tools with ease thanks to a clean, abstraction-based design.
  • 🛠️ Powerful Tool Integration: Equip your agents with tools to interact with APIs, databases, or any other external service. The agent's LLM can reason about when and how to use them.
  • 🧪 Built-in Simulation Framework: Go beyond unit tests. Write behavioral scenarios to validate your agent's complex conversational logic and tool-use chains.
  • 🧠 LLM Agnostic: Ships with an OpenAI_LLM client but is designed to work with any Large Language Model through its BaseLLM abstraction.
  • 💾 Flexible Memory: Includes a simple VolatileMemory for quick starts, with a clear interface for adding persistent memory backends (e.g., file or database storage).
  • Modern & Tested: Built with modern Python practices (like uv and pyproject.toml), fully type-hinted, and has a comprehensive test suite.

Installation

CogniCoreAI is available on PyPI and can be installed with your favorite package manager.

# Using uv (recommended)
uv pip install cognicoreai

# Or using standard pip
pip install cognicoreai

Quick Start

Get your first agent running in just a few lines of code. Make sure your OPENAI_API_KEY environment variable is set.

from cognicoreai import Agent, OpenAI_LLM, VolatileMemory, CalculatorTool

# 1. Assemble the agent's components
llm = OpenAI_LLM()
memory = VolatileMemory()
tools = [CalculatorTool()]

# 2. Create the agent with a system prompt
agent = Agent(
    llm=llm,
    memory=memory,
    tools=tools,
    system_prompt="You are Cogni, a helpful assistant with a calculator."
)

# 3. Start a conversation!
response = agent.chat("Hi there! What is 125 divided by 5?")
print(response)

# Expected output: "125 divided by 5 is 25.0."

Documentation

For full details on all modules, how-to guides, and advanced usage, please see the Official Documentation.

The documentation covers:

  • Creating custom tools.
  • Writing and running behavioral simulations.
  • Adding new LLM backends.
  • Implementing persistent memory.
  • The complete API Reference.

Contributing

Contributions are welcome! Whether it's reporting a bug, submitting a feature request, or writing code, we appreciate your help. Please see our contributing guidelines (you will need to create a CONTRIBUTING.md file for this) before getting started.

  1. Fork the repository.
  2. Create a new virtual environment and install the development dependencies:
    uv pip install -e ".[dev]"
    
  3. Set up the pre-commit hooks:
    pre-commit install
    
  4. Make your changes and ensure the tests pass:
    pytest
    
  5. Submit a pull request!

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

cognicoreai-1.0.1.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

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

cognicoreai-1.0.1-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file cognicoreai-1.0.1.tar.gz.

File metadata

  • Download URL: cognicoreai-1.0.1.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for cognicoreai-1.0.1.tar.gz
Algorithm Hash digest
SHA256 7f3dc5bf27b06bfed9777fcbbcfe9c9a741e42de372b45061f2bf9e63dc90c78
MD5 5381cc1fe4e27dbc8e9234677894ba80
BLAKE2b-256 66c9e97485f86f23824efef40e2071aea96ed535f46a9c5138efbef730df74b5

See more details on using hashes here.

File details

Details for the file cognicoreai-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: cognicoreai-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for cognicoreai-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8286541c5a035c79769adc5861b1e135b88ca72f58c29ced1f394149ed67c097
MD5 d7073cf8ad73da980487a10f5c8600f1
BLAKE2b-256 8f11d5c692b783695118e14430c0bc313f33dc58771d4d7df7b391da6025c0e3

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