Current collected state Current
Observed since 21 Oct, 08:58 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
An agent that uses XAI to achieve goals by executing tools
A lightweight, but effective autonomous agent framework powered by X.AI's Grok model.
tools: List of callable functions the agent can use to complete its mission
mission: String describing the goal or task to accomplishexit_function: Optional callback function executed upon mission completion
system_prompt: Customizable prompt to guide agent behavior (default: autonomous goal-focused agent)model: AI model selection (default: "grok-beta")enable_logging: Toggle detailed logging (default: False)max_steps: Maximum execution steps before termination (default: 10)grok-beta: X.AI's Grok modelgpt-4o: OpenAI's GPT-4 optimized for performancegpt-4o-mini: A lightweight version of GPT-4 optimized for minimal resource usageAgentXAI supports three AI models, each with different capabilities and cost structures. You can select the desired model when initializing AgentX or XAI.
grok-beta
gpt-4o
gpt-4o-mini
When initializing AgentX or XAI, specify the model parameter to select the desired AI model.
gpt-4o-miniexample agent:
from agentX.agent_x import AgentX
def my_function(input: str) -> str:
"""
A simple example function that can be passed to AgentX as a tool.
Args:
input (str): The input string to process
Returns:
str: The unmodified input string
"""
# do something with input
return input
def exit_function(message: str) -> int:
"""
A simple example exit function that can be passed to AgentX.
Args:
message (str): A string containing a number to convert
Returns:
int: The string converted to an integer
"""
try:
return int(message)
except ValueError:
return -1
agent = AgentX(
model="grok-beta",
tools=[my_function],
mission="""
Do something with
#1 setup
- some useful details
#2 do something
- some details
#3 last thing to do
- some details
success criteria:
- that something is done
- it is done well
""",
exit_function=exit_function,
)
pip install agentxai
XAI_API_KEY=
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.5 | 26 Nov 2024 | 42 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 08:58 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:d4d3af8e325de1909bc7a5bf2d84b0bdb72ed4ccb5d10d4798544d73cbc2982f