AgentPantheon
Code as Policies logo

Code as PoliciesA framework utilizing language model-generated programs to enable robots to perform complex tasks through code-based policies.

4.8 (4)
Daniel NikulshynReviewed by Daniel Nikulshyn·Updated June 2026

Overview

Code as Policies is a framework utilizing language model-generated programs to enable robots to perform complex tasks through code-based policies. It allows robots to understand and execute natural language instructions by using large language models to write robot policy code. This framework showcases its capabilities through demonstrations of tabletop manipulation tasks, such as arranging blocks and placing them in bowls, and can be applied in a variety of domains. By chaining classic logic structures and referencing third-party libraries, the generated code can exhibit spatial-geometric reasoning, generalize to new instructions, and prescribe precise values to ambiguous descriptions. The framework employs a few-shot prompting approach to write robot policies that can represent reactive policies and waypoint-based policies. It can write more complex code and improves state-of-the-art in solving problems on the HumanEval benchmark. Code and videos demonstrating the framework's capabilities are available at its GitHub repository. In the tabletop manipulation domain, the framework uses natural language arguments to compose the generated code via function calls. Prompts are used to specialize the language model to perform different functions. The framework has demonstrated its capabilities in various tasks, including arranging blocks in a square, moving blocks to specific positions, and even executing commands that involve creative storytelling. However, the framework's reliance on large language models means that it may be limited by their capabilities and biases. Additionally, the use of natural language arguments may introduce ambiguities or uncertainties in the generated code.

Key features

  • Robot-centric formalization of language model-generated programs
  • Ability to represent reactive policies and waypoint-based policies
  • Can write more complex code
  • Improves state-of-the-art in solving problems on the HumanEval benchmark
  • Demonstrated capabilities in various tabletop manipulation tasks

Pricing

Model
Freemium
Category
AI Agents
Rating
4.8 / 5 (4)

Use cases

Robot Task Programming via Natural Language

Translate high-level natural language instructions into executable code policies, enabling robots to perform complex manipulation and navigation tasks without manual programming.

Research in Embodied AI

Provide researchers with a framework to explore how large language models can generate control code for robotic systems, advancing studies in embodied reasoning.

Rapid Prototyping of Robot Behaviors

Allow developers to quickly prototype and iterate on robot behaviors by describing desired actions in language and letting the model synthesize the underlying policy code.

Multi-Step Task Automation

Compose code-based policies to chain together perception, planning, and control steps, enabling robots to execute multi-stage workflows in dynamic environments.

Pros & Cons

Pros

  • Enables robots to perform complex tasks through code-based policies
  • Can understand and execute natural language instructions
  • Employs a few-shot prompting approach to write robot policies
  • Improves state-of-the-art in solving problems on the HumanEval benchmark
  • Demonstrated capabilities in various tabletop manipulation tasks

Cons

  • Relies on large language models, which may be limited by their capabilities and biases
  • Use of natural language arguments may introduce ambiguities or uncertainties in the generated code

Reviews

4.8

Average from 4 ratings.

5
3
4
1
3
0
2
0
1
0

Sign in to leave a review.

S

Sanjay Gupta

Apr 21, 2026

Solid for our team

We rolled this out across the team last quarter and it is genuinely easy to set up. The API fits neatly into how we already work, and the integrations removed a step we used to do by hand. but it has held up under daily use.

H

Hiroshi Tanaka

Mar 8, 2026

Skeptical, then convinced

I went in skeptical — most tools in this space overpromise. It actually delivers on the core workflow, and it is genuinely easy to set up caught me off guard. A few rough edges remain is why this isn't a perfect score, still, I'd recommend giving it a real trial.

D

Diego Fernández

Oct 2, 2025

Use it every day

Honestly didn't expect to like it this much. The core workflow is exactly what I needed, and it saves real time. I do wish the docs could be deeper, but I reach for it almost every day now and it just clicks.

G

George Papadakis

Sep 30, 2025

Use it every day

Honestly didn't expect to like it this much. The API is exactly what I needed, and support is responsive. but I reach for it almost every day now and it just clicks.

Q&A

No questions yet — be the first to ask.

Ask a question

AI Agents alternatives