just-agents-core


Namejust-agents-core JSON
Version 0.5.8 PyPI version JSON
download
home_pageNone
SummaryJust Agents - Base Package
upload_time2025-02-20 20:10:37
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/2b/72/774d2ea0400da90f0a3724ab6ad946c0fea7330cfab5ef7b1260060ea7e0/just_agents_core-0.5.8.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.5.8",
    "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": "6eaff0fada8036cb42a2643c93d8ce557d7ac6ba8d213b84658ac4145ed19034",
                "md5": "36a7b2f5fd9152f13f9c038660a6b08e",
                "sha256": "feaa02e4b1851ac4224e14454cf7a7f6fd06d95e5efd37248466fae667e48dbf"
            },
            "downloads": -1,
            "filename": "just_agents_core-0.5.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "36a7b2f5fd9152f13f9c038660a6b08e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.15,>=3.10",
            "size": 45738,
            "upload_time": "2025-02-20T20:10:33",
            "upload_time_iso_8601": "2025-02-20T20:10:33.635384Z",
            "url": "https://files.pythonhosted.org/packages/6e/af/f0fada8036cb42a2643c93d8ce557d7ac6ba8d213b84658ac4145ed19034/just_agents_core-0.5.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2b72774d2ea0400da90f0a3724ab6ad946c0fea7330cfab5ef7b1260060ea7e0",
                "md5": "ef18c3e46e94f32c238374403a8713ae",
                "sha256": "2ca0d74ac45bdaa02b40920e239fd2c75aeae0f3815290b09000ecfb25eedc74"
            },
            "downloads": -1,
            "filename": "just_agents_core-0.5.8.tar.gz",
            "has_sig": false,
            "md5_digest": "ef18c3e46e94f32c238374403a8713ae",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.15,>=3.10",
            "size": 36607,
            "upload_time": "2025-02-20T20:10:37",
            "upload_time_iso_8601": "2025-02-20T20:10:37.759371Z",
            "url": "https://files.pythonhosted.org/packages/2b/72/774d2ea0400da90f0a3724ab6ad946c0fea7330cfab5ef7b1260060ea7e0/just_agents_core-0.5.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-20 20:10:37",
    "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: 0.46176s