just-agents-core


Namejust-agents-core JSON
Version 0.6.2 PyPI version JSON
download
home_pageNone
SummaryJust Agents - Base Package
upload_time2025-03-01 20:14:41
maintainerAnton Kulaga
docs_urlNone
authorAlex Karmazin
requires_python<3.15,>=3.10
licenseMIT
keywords python llm science review agents ai longevity biology coding web tools router
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # just-agents-core

A lightweight, straightforward core library for LLM agents - no over-engineering, just simplicity!

## ðŸŽŊ Core Features
- ðŸŠķ Lightweight and simple implementation
- 📝 Easy-to-understand agent interactions
- 🔧 Customizable prompts using YAML files
- ðŸĪ– Support for various LLM models through litellm
- 🔄 Chain of Thought reasoning with function calls

## 🏗ïļ Core Components

### BaseAgent
A thin wrapper around litellm for basic LLM interactions. Provides:
- Simple prompt management
- Direct LLM communication
- Memory handling

### ChatAgent
The fundamental building block for agent interactions. Here's an example of using multiple chat agents:

```python
from just_agents.base_agent import ChatAgent
from just_agents.llm_options import LLAMA3_3

# Initialize agents with different roles
harris = ChatAgent(
    llm_options=LLAMA3_3, 
    role="You are Kamala Harris in a presidential debate",
    goal="Win the debate with clear, concise responses",
    task="Respond briefly and effectively to debate questions"
)

trump = ChatAgent(
    llm_options=LLAMA3_3,
    role="You are Donald Trump in a presidential debate",
    goal="Win the debate with your signature style",
    task="Respond briefly and effectively to debate questions"
)

moderator = ChatAgent(
    llm_options={
        "model": "groq/mixtral-8x7b-32768",
        "api_base": "https://api.groq.com/openai/v1",
        "temperature": 0.0,
        "tools": []
    },
    role="You are a neutral debate moderator",
    goal="Ensure a fair and focused debate",
    task="Generate clear, specific questions about key political issues"
)
```

### ChainOfThoughtAgent
Extended agent with reasoning capabilities and function calling:

```python
from just_agents.patterns.chain_of_throught import ChainOfThoughtAgent
from just_agents import llm_options

def count_letters(character: str, word: str) -> str:
    """ Returns the number of character occurrences in the word. """
    count = word.count(character)
    return str(count)

# Initialize agent with tools and LLM options
agent = ChainOfThoughtAgent(
    tools=[count_letters],
    llm_options=llm_options.LLAMA3_3
)

# Get result and reasoning chain
result, chain = agent.think("Count the number of occurrences of the letter 'L' in 'HELLO'.")
```

## 📚 Usage
This core package provides the fundamental building blocks for LLM agents. For full usage examples and documentation, please refer to the [main repository](https://github.com/longevity-genie/just-agents).

## 🔧 Installation
```bash
pip install just-agents-core
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "just-agents-core",
    "maintainer": "Anton Kulaga",
    "docs_url": null,
    "requires_python": "<3.15,>=3.10",
    "maintainer_email": "antonkulaga@gmail.com",
    "keywords": "python, llm, science, review, agents, AI, longevity, biology, coding, web, tools, router",
    "author": "Alex Karmazin",
    "author_email": "karmazinalex@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/3b/21/2f25a976af7f8cad06e8a275ecb9ee3b9b5ffa1e2a2d55cb3f3f44cd67c0/just_agents_core-0.6.2.tar.gz",
    "platform": null,
    "description": "# just-agents-core\n\nA lightweight, straightforward core library for LLM agents - no over-engineering, just simplicity!\n\n## \ud83c\udfaf Core Features\n- \ud83e\udeb6 Lightweight and simple implementation\n- \ud83d\udcdd Easy-to-understand agent interactions\n- \ud83d\udd27 Customizable prompts using YAML files\n- \ud83e\udd16 Support for various LLM models through litellm\n- \ud83d\udd04 Chain of Thought reasoning with function calls\n\n## \ud83c\udfd7\ufe0f Core Components\n\n### BaseAgent\nA thin wrapper around litellm for basic LLM interactions. Provides:\n- Simple prompt management\n- Direct LLM communication\n- Memory handling\n\n### ChatAgent\nThe fundamental building block for agent interactions. Here's an example of using multiple chat agents:\n\n```python\nfrom just_agents.base_agent import ChatAgent\nfrom just_agents.llm_options import LLAMA3_3\n\n# Initialize agents with different roles\nharris = ChatAgent(\n    llm_options=LLAMA3_3, \n    role=\"You are Kamala Harris in a presidential debate\",\n    goal=\"Win the debate with clear, concise responses\",\n    task=\"Respond briefly and effectively to debate questions\"\n)\n\ntrump = ChatAgent(\n    llm_options=LLAMA3_3,\n    role=\"You are Donald Trump in a presidential debate\",\n    goal=\"Win the debate with your signature style\",\n    task=\"Respond briefly and effectively to debate questions\"\n)\n\nmoderator = ChatAgent(\n    llm_options={\n        \"model\": \"groq/mixtral-8x7b-32768\",\n        \"api_base\": \"https://api.groq.com/openai/v1\",\n        \"temperature\": 0.0,\n        \"tools\": []\n    },\n    role=\"You are a neutral debate moderator\",\n    goal=\"Ensure a fair and focused debate\",\n    task=\"Generate clear, specific questions about key political issues\"\n)\n```\n\n### ChainOfThoughtAgent\nExtended agent with reasoning capabilities and function calling:\n\n```python\nfrom just_agents.patterns.chain_of_throught import ChainOfThoughtAgent\nfrom just_agents import llm_options\n\ndef count_letters(character: str, word: str) -> str:\n    \"\"\" Returns the number of character occurrences in the word. \"\"\"\n    count = word.count(character)\n    return str(count)\n\n# Initialize agent with tools and LLM options\nagent = ChainOfThoughtAgent(\n    tools=[count_letters],\n    llm_options=llm_options.LLAMA3_3\n)\n\n# Get result and reasoning chain\nresult, chain = agent.think(\"Count the number of occurrences of the letter 'L' in 'HELLO'.\")\n```\n\n## \ud83d\udcda Usage\nThis core package provides the fundamental building blocks for LLM agents. For full usage examples and documentation, please refer to the [main repository](https://github.com/longevity-genie/just-agents).\n\n## \ud83d\udd27 Installation\n```bash\npip install just-agents-core\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Just Agents - Base Package",
    "version": "0.6.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/longevity-genie/just-agents/issues",
        "Documentation": "https://just-agents.readthedocs.io/",
        "Homepage": "https://github.com/longevity-genie/just-agents"
    },
    "split_keywords": [
        "python",
        " llm",
        " science",
        " review",
        " agents",
        " ai",
        " longevity",
        " biology",
        " coding",
        " web",
        " tools",
        " router"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a36d391995805f225f0312e21d91d3e607b878e3c143d9a24945054c0c213284",
                "md5": "74ea12ea173995e71a5e1eea17a71a60",
                "sha256": "c2e51641be2943009239676ae9704067ae0af475387bbf9c1bef8e6e2236cd45"
            },
            "downloads": -1,
            "filename": "just_agents_core-0.6.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "74ea12ea173995e71a5e1eea17a71a60",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.15,>=3.10",
            "size": 47262,
            "upload_time": "2025-03-01T20:14:39",
            "upload_time_iso_8601": "2025-03-01T20:14:39.133682Z",
            "url": "https://files.pythonhosted.org/packages/a3/6d/391995805f225f0312e21d91d3e607b878e3c143d9a24945054c0c213284/just_agents_core-0.6.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3b212f25a976af7f8cad06e8a275ecb9ee3b9b5ffa1e2a2d55cb3f3f44cd67c0",
                "md5": "5253cbc9e52e42ef2d158de2cf0a447c",
                "sha256": "d8200d4e1bcf8bcaec0010659ca0bd8360a825c5d44a1e4d07ea81832f716108"
            },
            "downloads": -1,
            "filename": "just_agents_core-0.6.2.tar.gz",
            "has_sig": false,
            "md5_digest": "5253cbc9e52e42ef2d158de2cf0a447c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.15,>=3.10",
            "size": 38188,
            "upload_time": "2025-03-01T20:14:41",
            "upload_time_iso_8601": "2025-03-01T20:14:41.721101Z",
            "url": "https://files.pythonhosted.org/packages/3b/21/2f25a976af7f8cad06e8a275ecb9ee3b9b5ffa1e2a2d55cb3f3f44cd67c0/just_agents_core-0.6.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-03-01 20:14:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "longevity-genie",
    "github_project": "just-agents",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "just-agents-core"
}
        
Elapsed time: 1.11116s