OpenViSTAI · Agents · Blockchain · Crypto
Menu
Agent Frameworks

CodeAct

CodeAct is an open-source method and implementation for LLM agents that express actions as executable code, run them through a Python interpreter, and use execution results to revise or produce actions over multiple turns.

Independent OpenViST project profile, based on linked sources.

CodeAct — OpenViST project profile in Agent Frameworks.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use CodeAct when experimenting with LLM agents whose actions should be executable code and whose later actions can depend on interpreter output. The repository also suits readers reproducing its research or assembling the documented example application components.

Who it is for

  • Developers prototyping LLM agents that combine multiple tool actions in executable Python.
  • Researchers studying code-based agent actions, instruction tuning, or agent evaluation.
  • Teams building a chat-based agent application from the repository's model-serving, interface, and execution components.

Documented uses

  • Represent an agent's actions as executable code rather than separate text or JSON action formats.
  • Run actions in a Python interpreter and feed execution observations into subsequent turns.
  • Explore the CodeActInstruct dataset and released CodeActAgent model variants.
  • Set up an example agent interaction using a model server, code execution engine, and Python or Chat-UI interface.
Before you choose

Requirements & limits

The repository is public and MIT-licensed. Its documented local application setup uses separate model-serving and code-execution components; the containerized execution engine requires Docker.

  • CodeAct is an agent method and implementation, not just a model: a runnable application also needs model serving, an interaction interface, and a code execution engine.
  • The code execution service uses Docker containers per chat session and applies a fixed session timeout.
  • The README offers distinct inference paths: vLLM via Docker with NVIDIA Docker, or llama.cpp with instructions reporting a specific macOS test setup.
  • The repository provides Mistral-7B and Llama-2-7B CodeActAgent variants with different listed context windows.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Set up local CodeActAgent inference with llama.cpp

Build and serve a CodeActAgent model through the OpenAI-compatible llama.cpp server.

Before you start

  • The CodeAct repository and its README instructions.
  • llama.cpp and its listed Python requirements; the instructions show Python 3.10 in an optional Conda environment.
  • A CodeActAgent model download, or the linked pre-converted quantized Mistral model.

Steps

  1. Install llama.cpp dependencies and build it using the README instructions.

  2. Download the CodeActAgent model and either convert it to GGUF and optionally quantize it, or use the linked pre-converted quantized model.

  3. Start the llama.cpp server with the model file and the documented port setting.

  4. Use the server's local OpenAI-compatible address and the model filename as the model name in the interaction interface.

Expected outcome

A local OpenAI-compatible model server that can be connected to a CodeAct interaction interface.

Guide limitations

  • This guide covers model inference only; the interaction interface and code execution engine are separate components.
  • The README reports testing llama.cpp on macOS with an M2 Max and Ventura 13.6; that is not a compatibility guarantee for other systems.
Source-based practical guide

Start the code execution service and use the Python demo

Connect the CodeAct Python demo to a running model server and code execution engine.

Before you start

  • A running CodeActAgent model server using vLLM or llama.cpp.
  • Docker installed locally for the containerized code execution engine.
  • The CodeAct repository.

Steps

  1. Start the code execution server with the repository's documented script and port argument.

  2. Run the Python demo with the model name, model API base, and Jupyter kernel URL configured for the services.

  3. Use the command-line interaction to send prompts to the agent and receive its responses.

Expected outcome

A command-line interaction path connected to the model server and code execution service.

Guide limitations

  • The model server and execution engine must be started before running the demo.
  • The execution engine starts a Docker container per chat session, and sessions time out after a fixed period.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
14 October 2026
Original website title
xingyaoww/code-act · Official homepage title · retained in its source language