Skip to main content

A lightweight LLM agent framework with standard and structured tool support use, prompt management, and support for OpenAI.

Project description

๐Ÿง  Bruce Agent

AgentX is a lightweight, extensible agentic framework for building custom LLM agents with structured tool use, prompt templates, and integration with OpenAI and Gemini models.

๐Ÿš€ Features

  • ๐Ÿ” Custom reasoning loop (AgentRunner)
  • ๐Ÿงฉ Structured tool execution (Pydantic-based)
  • ๐Ÿ’ฌ Prompt templating and management
  • ๐Ÿ”Œ LLM-agnostic: supports OpenAI function calling and Google Gemini
  • ๐Ÿช„ Easy-to-use API for building agents

๐Ÿ“ฆ Installation

published to PyPI:

pip install agentx-dev==2.3

Example use

from agentx_dev import AgentRunner, AgentType,ChatModel
from pydantic import BaseModel
from agentx_dev.Tools import StructuredTool,StandardTool
# Define a sample Stuctured tool
class MultiplyTool(BaseModel):
    a: int
    b: int

def multiply(a: int, b: int) -> int:
    return a * b

# Define a sample Standard tool
def Weather(weather:str):
    return f"{weather} is currently at 28 degree with a high of 32 and a low of 18 "

# Create chat model and agent
ReAct=AgentType.ReAct
chat_model = ChatModel.GPT(model="gpt-4", temperature=0.7)
tools = [StructuredTool(name="MultiplyTool",
                        description="useful when you need to add two numbers",
                        func=multiply,
                        args_schema=MultiplyTool
                        ),
         StandardTool(name="Weather",
                      description="when you need to check the weather of a location, input should be the str of the location",
                      func=Weather)]
# Create an AgentRunner instance
agent = AgentRunner(model=chat_model,Agent=ReAct, tools=tools)

# Initialize the agent with user input
response = agent.Initialize("What is 5 times 8?",ChatHistory=[{'role':"assistant",'content':'hello there how is it going'}])

# Print the result
print(response.content)


# output the Agent completion
agent.Initialize("i need the weather in Barrie")
 
โ”œโ”€โ”€agentx_dev/
โ”‚       โ”œโ”€โ”€ __init__.py
โ”‚       โ”œโ”€โ”€ agent/
โ”‚       โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚       โ”‚   โ””โ”€โ”€ agent.py
โ”‚       โ”œโ”€โ”€ runner/
โ”‚       โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚       โ”‚   โ””โ”€โ”€ agent_run.py
โ”‚       โ””โ”€โ”€ chatmodel.py
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ LICENSE
โ””โ”€โ”€ pyproject.toml

๐Ÿ“š Documentation (Coming Soon)

More tutorials, tool examples, and structured prompting guides coming soon.

๐Ÿง‘โ€๐Ÿ’ป Author

Bruce-Arhin Shadrach

๐Ÿ“ง brucearhin098@gmail.com

๐ŸŒ GitHub

๐Ÿ“ License MIT License

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

agentx_dev-2.3.3.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

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

agentx_dev-2.3.3-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

Details for the file agentx_dev-2.3.3.tar.gz.

File metadata

  • Download URL: agentx_dev-2.3.3.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for agentx_dev-2.3.3.tar.gz
Algorithm Hash digest
SHA256 d91d0ad050ebb6909c5f5ffaa87b0091bcb89f64adeb629421b309db5b25afba
MD5 a9ec4b21dede2548863edcd55e8e70cc
BLAKE2b-256 4e3a4d158791e32c10c3d152b6e3cbdfeda58ebad389736ad3a1fe0319f75f36

See more details on using hashes here.

File details

Details for the file agentx_dev-2.3.3-py3-none-any.whl.

File metadata

  • Download URL: agentx_dev-2.3.3-py3-none-any.whl
  • Upload date:
  • Size: 23.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for agentx_dev-2.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d063be8fe57f7532a0b9964ad38ebad39e00ccb725c792d8abaa7da2570fe42e
MD5 0adf12f14a5adae2bc48c0cfa88e20b1
BLAKE2b-256 830821a4fc29543c2748354f40eb32f771614ef19f3d0ce710c28b73b033f359

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