| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
Python companion package for ZeroBuild — LangGraph-based tool calling for consistent LLM agent execution.
Some LLM providers (particularly GLM-5/Zhipu and similar models) have inconsistent tool calling behavior when using text-based tool invocation. This package provides a LangGraph-based approach that delivers:
pip install zerobuild-toolsWith Discord integration:
pip install zerobuild-tools[discord]import asyncio
from zerobuild_tools import create_agent, shell, file_read, file_write
from langchain_core.messages import HumanMessage
async def main():
# Create agent with tools
agent = create_agent(
tools=[shell, file_read, file_write],
model="glm-5",
api_key="your-api-key",
base_url="https://api.z.ai/api/coding/paas/v4"
)
# Execute a task
result = await agent.ainvoke({
"messages": [HumanMessage(content="List files in /tmp directory")]
})
print(result["messages"][-1].content)
asyncio.run(main())# Set environment variables
export API_KEY="your-api-key"
export API_BASE="https://api.z.ai/api/coding/paas/v4"
# Run the CLI
zerobuild-tools "List files in the current directory"
# Interactive mode (no message required)
zerobuild-tools -iimport os
from zerobuild_tools.integrations import DiscordBot
bot = DiscordBot(
token=os.environ["DISCORD_TOKEN"],
guild_id=123456789,
allowed_users=["123456789"]
)
bot.run()| Tool | Description |
|---|---|
| shell | Execute shell commands |
| file_read | Read file contents |
| file_write | Write content to files |
| web_search | Search the web (requires Brave API key) |
| http_request | Make HTTP requests |
| memory_store | Store data in memory |
| memory_recall | Recall stored data |
from zerobuild_tools import tool
@tool
def my_custom_tool(query: str) -> str:
"""Description of what this tool does."""
# Your implementation here
return f"Result for: {query}"
# Use with agent
agent = create_agent(tools=[my_custom_tool])Works with any OpenAI-compatible provider:
┌─────────────────────────────────────────────┐ │ Your Application │ ├─────────────────────────────────────────────┤ │ zerobuild-tools Agent │ │ ┌─────────────────────────────────────┐ │ │ │ LangGraph StateGraph │ │ │ │ ┌───────────┐ ┌──────────┐ │ │ │ │ │ Agent │───▶│ Tools │ │ │ │ │ │ Node │◀───│ Node │ │ │ │ │ └───────────┘ └──────────┘ │ │ │ └─────────────────────────────────────┘ │ ├─────────────────────────────────────────────┤ │ OpenAI-Compatible LLM Provider │ └─────────────────────────────────────────────┘
| Feature | Rust ZeroBuild | zerobuild-tools |
|---|---|---|
| Binary size | ~3.4 MB | Python package |
| Memory | <5 MB | ~50 MB |
| Startup | <10ms | ~500ms |
| Tool consistency | Model-dependent | LangGraph guarantees |
| Extensibility | Rust traits | Python decorators |
Use Rust ZeroBuild for production edge deployments. Use zerobuild-tools when you need guaranteed tool calling consistency or Python ecosystem integration.
MIT License — see LICENSE
| Back | FazBrowse Home | New Git URL |