langgraph-codeact  by langchain-ai

LangGraph component for CodeAct architecture

created 4 months ago
570 stars

Top 57.4% on sourcepulse

GitHubView on GitHub
Project Summary

This library implements the CodeAct architecture for complex task solving using LangGraph, offering an alternative to JSON function calling. It enables agents to leverage a Turing-complete language like Python for tool output transformation and combination, benefiting users who need to solve multi-step problems with greater flexibility.

How It Works

The CodeAct architecture utilizes a Python code sandbox to execute tool outputs and intermediate results. It maintains message history and saves Python variables between turns, allowing for more sophisticated follow-up questions and complex computations. This approach allows agents to use the full power of Python to combine and transform outputs from multiple tools, rather than being limited to structured JSON outputs.

Quick Start & Requirements

  • Install: pip install langgraph-codeact
  • Example dependencies: pip install langchain langchain-anthropic
  • Requires a LangChain-compatible model (tested with Claude 3.7).
  • Official example: here

Highlighted Details

  • Implements the CodeAct architecture, used by Manus.im.
  • Supports custom tools, LangChain tools, and MCP tools.
  • Allows customization of the system message and the code sandbox.
  • Offers .invoke() for final results and .stream() for token-by-token output.

Maintenance & Community

  • Project maintained by langchain-ai.
  • No specific community links (Discord/Slack) or roadmap mentioned in the README.

Licensing & Compatibility

  • The README does not explicitly state a license.

Limitations & Caveats

The provided eval function for the code sandbox is for demonstration purposes only and is not safe for production use. A warning advises using a secure LangChain Sandbox for production environments.

Health Check
Last commit

2 months ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
1
Star History
118 stars in the last 90 days

Explore Similar Projects

Starred by Chris Van Pelt Chris Van Pelt(Cofounder of Weights & Biases), Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), and
15 more.

developer by smol-ai

0.1%
12k
Agent for embedding a developer in your app
created 2 years ago
updated 1 year ago
Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Carol Willing Carol Willing(Core Contributor to CPython, Jupyter), and
38 more.

langchain by langchain-ai

0.4%
113k
Framework for building LLM-powered applications
created 2 years ago
updated 1 day ago
Feedback? Help us improve.