Current collected state Current
Observed since 20 Oct, 23:15 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
agentrux-agent-tools
AI agent toolkit for AgenTrux - framework-agnostic function calling tools
Beta -- API may change before 1.0.
Framework-agnostic AI agent toolkit for AgenTrux. Exposes publish/subscribe/read operations as tool definitions compatible with OpenAI function calling, Anthropic tool_use, and any other LLM framework.
pip install agentrux-agent-tools
Or install from source:
cd plugins/agent-sdk
pip install -e .
import asyncio
from agentrux_agent_tools import AgenTruxToolkit
async def main():
toolkit = await AgenTruxToolkit.create(
base_url="https://api.agentrux.com",
script_id="your-script-id",
client_secret="your-client-secret",
)
# Or use environment variables:
# export AGENTRUX_BASE_URL=https://api.agentrux.com
# export AGENTRUX_SCRIPT_ID=...
# export AGENTRUX_CLIENT_SECRET=...
# toolkit = await AgenTruxToolkit.create()
# OpenAI format
tools = toolkit.get_tools()
# Anthropic format
tools = toolkit.get_tools_anthropic()
result = await toolkit.execute("publish_event", {
"topic_id": "550e8400-e29b-41d4-a716-446655440000",
"event_type": "chat.message",
"payload": {"text": "Hello from the agent!"},
})
print(result) # JSON string with event_id
import openai
from agentrux_agent_tools import AgenTruxToolkit
async def agent_loop():
toolkit = await AgenTruxToolkit.create()
client = openai.AsyncOpenAI()
messages = [{"role": "user", "content": "Publish a greeting event"}]
response = await client.chat.completions.create(
model="gpt-4o",
messages=messages,
tools=toolkit.get_tools(),
)
for tool_call in response.choices[0].message.tool_calls or []:
import json
args = json.loads(tool_call.function.arguments)
result = await toolkit.execute(tool_call.function.name, args)
messages.append(response.choices[0].message)
messages.append({
"role": "tool",
"tool_call_id": tool_call.id,
"content": result,
})
# Continue the conversation with tool results...
await toolkit.close()
import anthropic
from agentrux_agent_tools import AgenTruxToolkit
async def agent_loop():
toolkit = await AgenTruxToolkit.create()
client = anthropic.AsyncAnthropic()
response = await client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=1024,
tools=toolkit.get_tools_anthropic(),
messages=[{"role": "user", "content": "List recent events from my topic"}],
)
for block in response.content:
if block.type == "tool_use":
result = await toolkit.execute(block.name, block.input)
# Send result back as tool_result...
await toolkit.close()
import json
from agentrux_agent_tools import AgenTruxToolkit
async def generic_agent(llm_call, user_prompt: str):
"""Works with any LLM that supports function calling."""
async with await AgenTruxToolkit.create() as toolkit:
tools = toolkit.get_tools()
messages = [{"role": "user", "content": user_prompt}]
while True:
response = await llm_call(messages, tools=tools)
if not response.tool_calls:
return response.text
for call in response.tool_calls:
result = await toolkit.execute(call.name, call.arguments)
messages.append({"role": "tool", "content": result})
| Tool | Description |
|---|---|
publish_event | Publish a JSON event to a topic. Returns the event_id. |
list_events | List recent events with optional type filter. |
get_event | Retrieve a single event by ID. |
wait_for_event | Wait for the next event via SSE (with timeout). |
| Variable | Description |
|---|---|
AGENTRUX_BASE_URL | Server URL |
AGENTRUX_SCRIPT_ID | Script identifier |
AGENTRUX_CLIENT_SECRET | Client Secret |
AGENTRUX_INVITE_CODE | Optional invite code for cross-Alias (cross-account) access |
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
httpxEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | httpx>=0.27 | runtime |
pytest-asyncioEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | pytest-asyncio>=0.23; extra == "dev" | runtime |
pytestEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | pytest>=8.0; extra == "dev" | runtime |
bdist_wheel · 18.42 KB · Python py3
sdist · 19.12 KB · Python source
Observed since 20 Oct, 23:15 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:cf3b051fc74d517954f94f18bf7ebcccfab2dbe2c503bf013ec5026f0691afb6