CodeAct — AI Glossary

CodeAct is a pattern, formalized in a 2024 paper by Wang et al. ("Executable Code Actions Elicit Better LLM Agents"), in which an AI agent emits executable code — typically Python — as its action, rather than emitting a structured tool-call JSON object. The code runs in a sandboxed interpreter; the agent observes the output and continues.