cogents-core


Namecogents-core JSON
Version 0.1.6 PyPI version JSON
download
home_pageNone
SummaryTowards a cognitive agentic framework
upload_time2025-09-06 09:00:41
maintainerXiaming Chen
docs_urlNone
authorXiaming Chen
requires_python<4.0,>=3.11
licenseMIT
keywords agents multi-agent system cognition artificial intelligence
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Cogents-core

[![CI](https://github.com/mirasurf/cogents-core/actions/workflows/ci.yml/badge.svg)](https://github.com/mirasurf/cogents-core/actions/workflows/ci.yml)
[![PyPI version](https://img.shields.io/pypi/v/cogents-core.svg)](https://pypi.org/project/cogents-core/)
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/mirasurf/cogents-core)

A comprehensive collection of essential building blocks for constructing cognitive multi-agent systems (MAS). Rather than building a full agent framework, Cogents provides a lightweight repository of key components designed to bridge the final mile in MAS development. Our philosophy focuses on modular, composable components that can be easily integrated into existing systems or used to build new ones from the ground up. For the underlying philosophy, refer to my talk on MAS ([link](https://github.com/caesar0301/mas-talk-2508/blob/master/mas-talk-xmingc.pdf)).

## Core Modules

Cogents offers a comprehensive set of modules for creating intelligent agent-based applications:

### LLM Integration & Management
- **Multi-model support**: OpenAI, Google GenAI (via OpenRouter), Ollama, and LlamaCPP
- **Advanced routing**: Dynamic complexity-based and self-assessment routing strategies
- **Tracing & monitoring**: Built-in token tracking and Opik tracing integration
- **Extensible architecture**: Easy to add new LLM providers

### Goal Management & Planning
- **Goal decomposition**: LLM-based and callable goal decomposition strategies
- **Conflict detection**: Automated goal conflict identification and resolution
- **Replanning**: Dynamic goal replanning capabilities

### Tool Management
- **Tool registry**: Centralized tool registration and management
- **Execution engine**: Robust tool execution with error handling
- **Repository system**: Organized tool storage and retrieval

### Memory Management
- Under development

### Orchestration
- Under development


## Project Structure

```
cogents/core
├── base/            # Base classes and models
├── goalith/         # Goal management and planning
├── memory/          # Memory management (on plan)
├── orchestrix/      # Global orchestration (on plan)
└── toolify/         # Tool management and execution
```

## Creating a New Agent

### From Base Classes
Start with the base agent classes in `cogents_core.base` to create custom agents with full control over behavior and capabilities.

#### Base Agent Class Hierarchy

```
BaseAgent (abstract)
├── Core functionality
│   ├── LLM client management
│   ├── Token usage tracking
│   ├── Logging capabilities
│   └── Configuration management
│
├── BaseGraphicAgent (abstract)
│   ├── LangGraph integration
│   ├── State management
│   ├── Graph visualization
│   └── Error handling patterns
│   │
│   ├── BaseConversationAgent (abstract)
│   │   ├── Session management
│   │   ├── Message handling
│   │   ├── Conversation state
│   │   └── Response generation
│   │
│   └── BaseResearcher (abstract)
│       ├── Research workflow
│       ├── Source management
│       ├── Query generation
│       └── Result compilation
│           └── Uses ResearchOutput model
│               ├── content: str
│               ├── sources: List[Dict]
│               ├── summary: str
│               └── timestamp: datetime
```

**Key Inheritance Paths:**
- **BaseAgent**: Core functionality (LLM client, token tracking, logging)
- **BaseGraphicAgent**: LangGraph integration and visualization
- **BaseConversationAgent**: Session management and conversation patterns
- **BaseResearcher**: Research workflow and structured output patterns

### From Existing Agents
Use well-constructed agents like Seekra Agent as templates:

```python
from cogents_core.agents.seekra_agent import SeekraAgent

# Extend Seekra Agent for custom research tasks
class CustomResearchAgent(SeekraAgent):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        # Add custom functionality
        
    def custom_research_method(self):
        # Implement custom research logic
        pass
```

## Install

```
pip install -U cogents-core
```

## License

MIT License - see [LICENSE](LICENSE) file for details.


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "cogents-core",
    "maintainer": "Xiaming Chen",
    "docs_url": null,
    "requires_python": "<4.0,>=3.11",
    "maintainer_email": "chenxm35@gmail.com",
    "keywords": "agents, multi-agent system, cognition, artificial intelligence",
    "author": "Xiaming Chen",
    "author_email": "chenxm35@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/db/74/a73fee796aed1de6860f7b48a4ba72bf74b561bc4527345e19650f394c82/cogents_core-0.1.6.tar.gz",
    "platform": null,
    "description": "# Cogents-core\n\n[![CI](https://github.com/mirasurf/cogents-core/actions/workflows/ci.yml/badge.svg)](https://github.com/mirasurf/cogents-core/actions/workflows/ci.yml)\n[![PyPI version](https://img.shields.io/pypi/v/cogents-core.svg)](https://pypi.org/project/cogents-core/)\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/mirasurf/cogents-core)\n\nA comprehensive collection of essential building blocks for constructing cognitive multi-agent systems (MAS). Rather than building a full agent framework, Cogents provides a lightweight repository of key components designed to bridge the final mile in MAS development. Our philosophy focuses on modular, composable components that can be easily integrated into existing systems or used to build new ones from the ground up. For the underlying philosophy, refer to my talk on MAS ([link](https://github.com/caesar0301/mas-talk-2508/blob/master/mas-talk-xmingc.pdf)).\n\n## Core Modules\n\nCogents offers a comprehensive set of modules for creating intelligent agent-based applications:\n\n### LLM Integration & Management\n- **Multi-model support**: OpenAI, Google GenAI (via OpenRouter), Ollama, and LlamaCPP\n- **Advanced routing**: Dynamic complexity-based and self-assessment routing strategies\n- **Tracing & monitoring**: Built-in token tracking and Opik tracing integration\n- **Extensible architecture**: Easy to add new LLM providers\n\n### Goal Management & Planning\n- **Goal decomposition**: LLM-based and callable goal decomposition strategies\n- **Conflict detection**: Automated goal conflict identification and resolution\n- **Replanning**: Dynamic goal replanning capabilities\n\n### Tool Management\n- **Tool registry**: Centralized tool registration and management\n- **Execution engine**: Robust tool execution with error handling\n- **Repository system**: Organized tool storage and retrieval\n\n### Memory Management\n- Under development\n\n### Orchestration\n- Under development\n\n\n## Project Structure\n\n```\ncogents/core\n\u251c\u2500\u2500 base/            # Base classes and models\n\u251c\u2500\u2500 goalith/         # Goal management and planning\n\u251c\u2500\u2500 memory/          # Memory management (on plan)\n\u251c\u2500\u2500 orchestrix/      # Global orchestration (on plan)\n\u2514\u2500\u2500 toolify/         # Tool management and execution\n```\n\n## Creating a New Agent\n\n### From Base Classes\nStart with the base agent classes in `cogents_core.base` to create custom agents with full control over behavior and capabilities.\n\n#### Base Agent Class Hierarchy\n\n```\nBaseAgent (abstract)\n\u251c\u2500\u2500 Core functionality\n\u2502   \u251c\u2500\u2500 LLM client management\n\u2502   \u251c\u2500\u2500 Token usage tracking\n\u2502   \u251c\u2500\u2500 Logging capabilities\n\u2502   \u2514\u2500\u2500 Configuration management\n\u2502\n\u251c\u2500\u2500 BaseGraphicAgent (abstract)\n\u2502   \u251c\u2500\u2500 LangGraph integration\n\u2502   \u251c\u2500\u2500 State management\n\u2502   \u251c\u2500\u2500 Graph visualization\n\u2502   \u2514\u2500\u2500 Error handling patterns\n\u2502   \u2502\n\u2502   \u251c\u2500\u2500 BaseConversationAgent (abstract)\n\u2502   \u2502   \u251c\u2500\u2500 Session management\n\u2502   \u2502   \u251c\u2500\u2500 Message handling\n\u2502   \u2502   \u251c\u2500\u2500 Conversation state\n\u2502   \u2502   \u2514\u2500\u2500 Response generation\n\u2502   \u2502\n\u2502   \u2514\u2500\u2500 BaseResearcher (abstract)\n\u2502       \u251c\u2500\u2500 Research workflow\n\u2502       \u251c\u2500\u2500 Source management\n\u2502       \u251c\u2500\u2500 Query generation\n\u2502       \u2514\u2500\u2500 Result compilation\n\u2502           \u2514\u2500\u2500 Uses ResearchOutput model\n\u2502               \u251c\u2500\u2500 content: str\n\u2502               \u251c\u2500\u2500 sources: List[Dict]\n\u2502               \u251c\u2500\u2500 summary: str\n\u2502               \u2514\u2500\u2500 timestamp: datetime\n```\n\n**Key Inheritance Paths:**\n- **BaseAgent**: Core functionality (LLM client, token tracking, logging)\n- **BaseGraphicAgent**: LangGraph integration and visualization\n- **BaseConversationAgent**: Session management and conversation patterns\n- **BaseResearcher**: Research workflow and structured output patterns\n\n### From Existing Agents\nUse well-constructed agents like Seekra Agent as templates:\n\n```python\nfrom cogents_core.agents.seekra_agent import SeekraAgent\n\n# Extend Seekra Agent for custom research tasks\nclass CustomResearchAgent(SeekraAgent):\n    def __init__(self, *args, **kwargs):\n        super().__init__(*args, **kwargs)\n        # Add custom functionality\n        \n    def custom_research_method(self):\n        # Implement custom research logic\n        pass\n```\n\n## Install\n\n```\npip install -U cogents-core\n```\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Towards a cognitive agentic framework",
    "version": "0.1.6",
    "project_urls": {
        "Documentation": "https://cogents-core.readthedocs.io/",
        "Homepage": "https://github.com/mirasurf/cogents-core",
        "Repository": "https://github.com/mirasurf/cogents-core"
    },
    "split_keywords": [
        "agents",
        " multi-agent system",
        " cognition",
        " artificial intelligence"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f62583e3e0b15b36a79f020548ebe25b648c4d3cc69545c048746a71808fca4e",
                "md5": "f66043a3e80b9b046b091f5baba81d67",
                "sha256": "59dca5f706d5ee535ea82cf45fd54e985a05c09a2bdf3b763e43cbf9b5e61869"
            },
            "downloads": -1,
            "filename": "cogents_core-0.1.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f66043a3e80b9b046b091f5baba81d67",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 101859,
            "upload_time": "2025-09-06T09:00:39",
            "upload_time_iso_8601": "2025-09-06T09:00:39.611315Z",
            "url": "https://files.pythonhosted.org/packages/f6/25/83e3e0b15b36a79f020548ebe25b648c4d3cc69545c048746a71808fca4e/cogents_core-0.1.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "db74a73fee796aed1de6860f7b48a4ba72bf74b561bc4527345e19650f394c82",
                "md5": "cca59fd55a5c73d3d568514ee5fef6e2",
                "sha256": "dd96c966f6247aac60cc6776a1da8256d7a8dddf4c06252e19bb10d2f2ed1334"
            },
            "downloads": -1,
            "filename": "cogents_core-0.1.6.tar.gz",
            "has_sig": false,
            "md5_digest": "cca59fd55a5c73d3d568514ee5fef6e2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 71006,
            "upload_time": "2025-09-06T09:00:41",
            "upload_time_iso_8601": "2025-09-06T09:00:41.196137Z",
            "url": "https://files.pythonhosted.org/packages/db/74/a73fee796aed1de6860f7b48a4ba72bf74b561bc4527345e19650f394c82/cogents_core-0.1.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-06 09:00:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mirasurf",
    "github_project": "cogents-core",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cogents-core"
}
        
Elapsed time: 0.47211s