from praisonaiagents import Agentagent = Agent( name="Planner", instructions="Break tasks into todos, then execute them one by one.", tools=["todo_add", "todo_list", "todo_update"])agent.start("Plan a blog launch — research, draft, publish.")
2
Interactive Planning Flow
# User: "Plan a blog launch"# Agent automatically:# 1. Calls todo_add("research blog topic", priority="high") # 2. Calls todo_add("draft blog post", priority="medium")# 3. Calls todo_add("publish to website", priority="medium")# 4. Calls todo_list() to review plan# 5. Updates todos as tasks complete
# Priority affects planning order but not executiontodo_add("critical bug fix", priority="high") # First prioritytodo_add("update docs", priority="medium") # Standard priority todo_add("cleanup code", priority="low") # Background task
# Organize todos by typetodo_add("research framework", category="development")todo_add("schedule meeting", category="coordination")todo_add("write tests", category="quality")# Filter by categorytodo_list(category="development") # Development tasks only
# Agent updates todos as work completestodo_update(1, status="completed") # Research finishedtodo_list(status="pending") # Show remaining worktodo_add("implement user feedback", priority="high") # Add new task
# Focus on specific work typestodo_list(category="development") # Development taskstodo_list(category="research") # Research tasks todo_list(status="completed") # Review finished work