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

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentx_dev-2.4.tar.gz
  • Upload date:
  • Size: 18.7 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.4.tar.gz
Algorithm Hash digest
SHA256 973d961ffa867359f758970321860cff6d1ea835bd723bc492e059652598ed46
MD5 b16a9fb5088b8f5e73f146310d3e91a6
BLAKE2b-256 9219fe16f862e4fa9d7498bdb7f4147c1ff592f2ce456ba13a5d2780c8b78014

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agentx_dev-2.4-py3-none-any.whl
  • Upload date:
  • Size: 23.1 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a8065849d00d30ae7bdddad6305ed8507430e330a7b85422513ff62c3909f123
MD5 f100d7c56baf2f6954ec8a15de54da84
BLAKE2b-256 5c53b92138a9830c02c8d9d2132adf3edbb4ab1ec749183b77f2066d6fa0d896

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