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.4.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.4-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentx_dev-2.3.4.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.4.tar.gz
Algorithm Hash digest
SHA256 2fa7a86cf80d4cb4d1a447411ab1fe4f8c9743b0c14db30637b95516136d0dfd
MD5 6543f177fc99f619710d580ce9f5770f
BLAKE2b-256 97edf0a3064cada85781c73bce2199194deeeeba6091cacc0bf4457e1d503312

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agentx_dev-2.3.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ad644cf5663c7ac886d6c72d1cd984060a7b7666a75b5954cdee879a485fa39e
MD5 69795a96f59fae2abd75ca463aa1d14f
BLAKE2b-256 d22c8b2431e4dc452819935c4569c03a08bb6d736bb2b7e6d46fa9edf9f9b334

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