Skip to main content

Just Agents - Base Package

Project description

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, including DeepSeek R1 and OpenAI o3-mini
  • 🔄 Chain of Thought reasoning with function calls

🚀 Installation

pip install just-agents-core

🏗️ 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:

from just_agents.base_agent import ChatAgent
from just_agents.llm_options import LLAMA4_SCOUT

# Initialize agents with different roles
harris = ChatAgent(
    llm_options=LLAMA4_SCOUT, 
    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=LLAMA4_SCOUT,
    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/meta-llama/llama-4-maverick-17b-128e-instruct",
        "temperature": 0.0
    },
    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:

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.LLAMA4_SCOUT
)

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

📚 Motivation

Most existing agentic libraries are over-engineered, either directly or by using complex libraries under the hood. In reality, interactions with LLMs are mostly about strings, and you can create templates using f-strings and Python's native string templates.

It's easier to reason about code when you separate prompting from Python code into easily readable files (like YAML files). This library was created to provide a controlled, simple approach to LLM agent development without unnecessary complexity.

📦 Structure

The just-agents-core package provides the fundamental building blocks for LLM agents. For additional functionality:

  • just_agents_coding: For code execution in sandboxed environments
  • just_agents_tools: Additional tools like web search capabilities
  • just_agents_web: For serving agents as OpenAI-compatible REST API endpoints

For full usage examples and documentation, please refer to the main repository.

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

just_agents_core-0.8.6.tar.gz (85.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

just_agents_core-0.8.6-py3-none-any.whl (96.7 kB view details)

Uploaded Python 3

File details

Details for the file just_agents_core-0.8.6.tar.gz.

File metadata

  • Download URL: just_agents_core-0.8.6.tar.gz
  • Upload date:
  • Size: 85.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.10.12 Linux/5.15.0-157-generic

File hashes

Hashes for just_agents_core-0.8.6.tar.gz
Algorithm Hash digest
SHA256 43ab8e389ba9c9d5fce788e0d45b4ee7caadb33bcf8c0057110b1ab50f7d5dbc
MD5 e1bc114835f5b8f62b52613e622b74b8
BLAKE2b-256 5b014d04f0f0f4ffb07428887c14809b4bf3987439426b304394d137db1239be

See more details on using hashes here.

File details

Details for the file just_agents_core-0.8.6-py3-none-any.whl.

File metadata

  • Download URL: just_agents_core-0.8.6-py3-none-any.whl
  • Upload date:
  • Size: 96.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.10.12 Linux/5.15.0-157-generic

File hashes

Hashes for just_agents_core-0.8.6-py3-none-any.whl
Algorithm Hash digest
SHA256 5675e1c07be784e6ff40bf4945f0ce55b9f8160fd281860e6274b087f96a4342
MD5 1adb2f2bd37b170e6ba393df09361440
BLAKE2b-256 83600daade5637d5e05dd6587ee9fa9f6c9007a597274b3e102c8048e3c189ac

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