cognitrix
Health Pass
- License — License: Apache-2.0
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 12 GitHub stars
Code Pass
- Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
Create AI Agents equipped with tools and extensions
Cognitrix
Cognitrix is an open-source autonomous AI agents orchestrator built in Python. It allows you to create and manage AI agents with ease and integrates seamlessly with large language models (LLMs) from various providers.
Features
- Agent Creation and Management: Create, list, and load AI agents with customizable names, tasks, and configurations.
- LLM Integration: Integrates with multiple LLM providers via OpenRouter (200+ models including OpenAI, Anthropic, Google, Meta, Mistral) plus local models via Ollama.
- Modular Architecture: Easily extensible, allowing the addition of new tools, agents, and LLM integrations.
- Conversational Interface: Interact with AI agents through a command-line interface, providing queries and receiving responses.
- Tool Integration: Agents can utilize a variety of tools, including calculators, web searches, file system browsers, and more.
- Autonomous Agent Mode: Agents can operate autonomously, visually perceiving the screen, interacting with UI elements, and performing tasks.
- Multimodal Support: Handles both text and image inputs/outputs, enabling multimodal interactions.
Architecture
Cognitrix's architecture is designed to be highly modular and extensible:
- Agents: The base
Agentclass is for creating and managing AI agents. - LLMs: Provider classes for OpenRouter (primary - 200+ models), OpenAI (direct), and Ollama (local).
- Tools: A set of tools that agents can utilize. Each tool has a
categoryattribute for grouping and management. - Templates: Customizable prompt templates guide the behavior and output formats of LLMs.
More tools can be added by creating new classes that inherit from the Tool base class and specifying a unique category.
Installation
Prerequisites
- Python 3.11–3.13 (the package will not build on 3.10 or lower).
- Node.js 18+ and a package manager (this repo uses pnpm) — only needed to build the web UI from source.
- Poetry — only needed for building from source.
- Redis — only needed if you use the background task API (Celery worker).
Install with pip:
pip install cognitrix
Build from source:
git clone https://github.com/theonlyamos/cognitrix.git
cd cognitrix/frontend
pnpm install
pnpm run build
cd ..
pip install .
Install directly from github:
pip install https://github.com/theonlyamos/cognitrix/archive/main.zip
Build the Docker Image:
git clone https://github.com/theonlyamos/cognitrix.git
cd cognitrix
docker build -t cognitrix .
Usage
Fill these environment variables as needed
OPENAI_API_KEY=
CO_API_KEY=
TAVILY_API_KEY=
CLARIFAI_ACCESS_TOKEN=
GROQ_API_KEY=
GOOGLE_API_KEY=
NEWSAPI_API_KEY=
ANTHROPIC_API_KEY=
DEEPGRAM_API_KEY=
MINDSDB_API_KEY=
BRAVE_SEARCH_API_KEY=
AIMLAPI_API_KEY=
To run Cognitrix with default settings:
cognitrix
Access the Web UI
To run with web interface
cognitrix --ui web
Open your web browser and go to http://localhost:8000 to access the web UI.
Run the Docker Container
After building the image, you can run the container with:
docker run -p 8000:8000 cognitrix
This command maps port 8000 of the container to port 8000 on your host machine.
To choose an LLM provider, pass --provider (config is read from the environment —AI_PROVIDER, <PROVIDER>_BASE_URL, <PROVIDER>_API_KEY, <PROVIDER>_MODEL):
cognitrix --provider openrouter
To list created agents:
cognitrix agents -l
To list available tools:
cognitrix tools -l
To run Cognitrix with a specific provider:
cognitrix --provider <provider_name>
To run Cognitrix with a specific agent:
cognitrix --agent <agent_name>
To run Cognitrix with a category of tools:
cognitrix --load-tools "web"
To run Cognitrix with categories of tools:
cognitrix --load-tools "web,general"
To create a new agent:
cognitrix agents --new
For more options and usage details, use the help command:
cognitrix --help
Web UI
Cognitrix includes a web UI built with React, TypeScript, and Vite. This UI allows users to interact with the AI agents and manage their configurations easily.
Development
For development purposes, you can also run the web UI locally without Docker. Ensure you have Node.js 18+ and pnpm installed, then follow these steps:
Install Dependencies:
Navigate to thefrontenddirectory and run:pnpm installStart the Development Server:
Run the following command to start the development server:pnpm run devAccess the Development Server:
Open your web browser and go tohttp://localhost:5173to view the web UI in development mode.
Contributing
Cognitrix is open source and contributions are welcome! Please refer to CONTRIBUTING.md for guidelines on how to contribute.
License
This project is licensed under the Apache License 2.0. See LICENSE for more information.
Acknowledgments
Cognitrix was created by Amos Amissah and is inspired by projects like AutoGPT and GPTEngineer. Special thanks to the open-source community and AI companies providing LLM APIs.
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found