examples/python-agent/README.md
A simple Python script demonstrating how an AI agent can use bd to manage tasks.
bd ready --jsondiscovered-from dependencygo install github.com/steveyegge/beads/cmd/bd@latestbd init# Make the script executable
chmod +x agent.py
# Run the agent
./agent.py
discovered-fromš Beads Agent starting...
============================================================
Iteration 1/10
============================================================
š Claiming task: bd-1
š¤ Working on: Implement user authentication (bd-1)
Priority: 1, Type: feature
š” Discovered: Missing test coverage for this feature
⨠Creating issue: Add tests for Implement user authentication
š Linking bd-2 ā discovered-from ā bd-1
ā
Completing task: bd-1 - Implemented successfully
š New work discovered and linked. Running another cycle...
To integrate with a real LLM-based agent:
simulate_work() with actual LLM calls# Create an agent with custom behavior
agent = BeadsAgent()
# Find specific types of work
ready = agent.run_bd("ready", "--priority", "1", "--assignee", "bot")
# Create issues with labels
agent.run_bd("create", "New task", "-l", "urgent,backend")
# Query dependency tree
tree = agent.run_bd("dep", "tree", "bd-1")