General purpose Claude agent with sub-agent spawning and todo list capabilities using LangGraph.
Project description
Claude Everything
A general-purpose AI agent built with LangGraph that includes two default tools:
- Sub-agent spawning: Create new agent instances for handling subtasks
- Todo list management: Organize tasks using a "replace entire state" pattern
Features
- General Purpose: Handles a wide variety of tasks with Claude's capabilities
- Sub-agent Delegation: Spawn independent sub-agents for complex subtasks
- Todo Management: Built-in task tracking with priority and status management
- Extensible: Additional tools can be passed in at runtime
- LangGraph Integration: Built on LangGraph for robust state management
Installation
pip install -e .
Usage
Basic Usage
from claude_everything.graph import graph
from langchain_core.messages import HumanMessage
# Simple usage
result = await graph.ainvoke({
"messages": [HumanMessage(content="Help me plan a project")]
})
With Additional Tools
from claude_everything.graph import graph
from langchain_core.messages import HumanMessage
# Define custom tools
def custom_calculator(expression: str) -> str:
"""Calculate mathematical expressions."""
try:
result = eval(expression)
return f"Result: {result}"
except Exception as e:
return f"Error: {e}"
# Use with additional tools
result = await graph.ainvoke({
"messages": [HumanMessage(content="Calculate 15 * 23 + 7")],
"additional_tools": [custom_calculator]
})
Default Tools
1. Sub-agent Tool (spawn_sub_agent)
Spawns a new agent instance to handle specific subtasks:
# The agent can use this internally like:
# spawn_sub_agent(
# task_description="Research the latest developments in AI",
# additional_context="Focus on developments from 2024"
# )
2. Todo List Tool (update_todo_list)
Manages tasks with a replace-entire-state pattern:
# The agent can use this internally like:
# update_todo_list(todos_json='[
# {"id": "1", "content": "Research topic", "status": "completed", "priority": "high"},
# {"id": "2", "content": "Write summary", "status": "in_progress", "priority": "medium"}
# ]')
Todo items have the following structure:
id: Unique identifiercontent: Task descriptionstatus: One of "pending", "in_progress", "completed"priority: One of "high", "medium", "low"
Running with LangGraph CLI
# Start the development server
langgraph dev
# Deploy to LangGraph Cloud
langgraph deploy
Architecture
The agent follows a standard LangGraph pattern:
- State Management: Maintains conversation messages, todo list, and additional tools
- Model Calling: Uses configurable language models (OpenAI, Anthropic, Fireworks)
- Tool Execution: Processes tool calls with special handling for todo list updates
- Routing: Continues conversation or ends based on model output
Development
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Type checking
mypy src/
# Code formatting
ruff format src/
ruff check src/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claude_everything-0.0.1.tar.gz.
File metadata
- Download URL: claude_everything-0.0.1.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d8e894a0f1d43eb4032fe98f529b53e72116e6ec31103560a54688d0844abaf
|
|
| MD5 |
5ae94df8f34b5d669cb65eefa5cc2eac
|
|
| BLAKE2b-256 |
2edbe0ee9701051d26dc08410bf1e1620690d24055b25d891ef9c777f1658505
|
File details
Details for the file claude_everything-0.0.1-py3-none-any.whl.
File metadata
- Download URL: claude_everything-0.0.1-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9032278489ed5add7f0bce016deeadff9134964dec3d52b53e2e7580665075c6
|
|
| MD5 |
87f5f182f0670d0e9879a36e0149ce6c
|
|
| BLAKE2b-256 |
f8614ebc075ef5610ed702bf38310099e361ac7232f009ae77a844877a61953f
|