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.tar.gz (18.5 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-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentx_dev-2.3.tar.gz
  • Upload date:
  • Size: 18.5 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.tar.gz
Algorithm Hash digest
SHA256 77319dbca37934a17991323f8e42624ee2af2144f0e1ce5ccae91d8a9dc685f5
MD5 d0c9c069f9285d672c7da82c74f1739f
BLAKE2b-256 44bf06602d0de8befaab766333083568a4b25dbe1f833009b0695f1cf3e535b4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agentx_dev-2.3-py3-none-any.whl
  • Upload date:
  • Size: 21.0 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-py3-none-any.whl
Algorithm Hash digest
SHA256 d5f0b037ca3252ddbefc00fd4574a20abe527f8d15d32ea512a909a1fa4dcf71
MD5 92b9412e9f066e49a93866ccea07a659
BLAKE2b-256 40a6331eb9c56636d49d9fe73adcafe8e5bd3514162753c555c7a75f76b90ba3

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