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


CogniCore 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 CogniCore 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

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

# Using uv (recommended)
uv pip install cognicore

# Or using standard pip
pip install cognicore

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 cognicore 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.0.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.0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cognicoreai-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 8065626d7a9caac8e33c9e5ec891de52478d14a704324b7e2f1d104d122a08c5
MD5 5565a0dfc818773eed436b3b8c6a63fd
BLAKE2b-256 6b4157665aebc208a1e21cab6ae78b20eabbe761f5c9981b4d737b3063920521

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cognicoreai-1.0.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 de54e24785d664a7ddcf4140a89a1368da8eeebdd24cc4e8280c6df4642771db
MD5 8488b1d17626e4f5c158d95fcdf5a43c
BLAKE2b-256 2f96824a49d5866d09dff735b3f5fba7e0bcffa9a52f9af37230220ee05d8da4

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