Skip to main content

AI coding agent for machine learning tasks: create, execute, and evaluate notebooks, and improve ML models.

Project description

mlcode

AI coding agent for machine learning tasks

Create, execute, and evaluate Jupyter notebooks, iterate on model architectures, and automate ML workflows directly from your terminal.


What is mlcode?

mlcode is an AI coding agent tailored for machine learning workflows. Operating inside your terminal or notebook workspace, it helps you:

  • Create, edit, & run Jupyter notebooks for data exploration, model training, and evaluation.
  • Iterate on ML models — tweak hyperparameters, benchmark metrics, and refactor training pipelines.
  • Automate experiment loops — inspect stack traces, fix code errors, and log results.
  • Maintain session history — durable session trees with branching, resume, and compaction.
tau_coding  →  tau_agent  →  tau_ai
  • tau_ai: Model provider streaming layer (OpenAI, Anthropic, OpenRouter, local models).
  • tau_agent: Portable agent brain (messages, tools, events, session tree).
  • tau_coding: CLI application, Textual interactive TUI, file/shell tools, and resources.

Quickstart

Installation

mlcode requires Python 3.12 or newer.

# Using uv (recommended)
uv tool install .
# or run directly in dev mode
uv run mlcode

Usage

Run mlcode from your ML project directory:

cd my-ml-project
mlcode

Then prompt mlcode in the interactive TUI:

build a baseline PyTorch model for CIFAR-10 in a notebook and evaluate accuracy

Non-interactive print mode for scripts:

mlcode -p "summarize dataset structure in data/"
mlcode --cwd /path/to/project -p "run notebook and output evaluation metrics"

Connect a Model Provider

Start mlcode and authenticate your AI provider with /login:

/login
/login openai
/model

Supported providers include OpenAI, Anthropic, OpenRouter, OpenAI Codex, Hugging Face, and local OpenAI-compatible endpoints (Ollama, vLLM, DeepSeek).


Capabilities

  • Interactive TUI & Print Mode: Full terminal interface powered by Textual or non-interactive CLI.
  • Coding & Execution Tools: read, write, edit, and bash execution.
  • Notebook & ML Automation: Work with scripts, notebooks, and experiment loops.
  • Durable Sessions: Append-only JSONL session histories with tree branching (/tree) and recovery.
  • Custom Skills & Instructions: Support for project-level instructions (AGENTS.md) and custom skills.

License

Released under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mlcode_ai-0.1.2.tar.gz (507.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mlcode_ai-0.1.2-py3-none-any.whl (187.2 kB view details)

Uploaded Python 3

File details

Details for the file mlcode_ai-0.1.2.tar.gz.

File metadata

  • Download URL: mlcode_ai-0.1.2.tar.gz
  • Upload date:
  • Size: 507.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mlcode_ai-0.1.2.tar.gz
Algorithm Hash digest
SHA256 398a9083c4e51f641f67f3b3ae4c5fe15a750e83e465a8d1529b4b1cc135fb51
MD5 f5fc82d943872748c89ffc047a0ec7ff
BLAKE2b-256 a2a7a39a934fc56bd6e413b9247fc56af5d4a9d09090edcdec9e848be80af3d9

See more details on using hashes here.

File details

Details for the file mlcode_ai-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: mlcode_ai-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 187.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mlcode_ai-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0f52250398b2c44c8af132ba64c42fb80360faa94c03708e94bae276bd847b41
MD5 4d775a436776278eff6d69890a3045ec
BLAKE2b-256 468be9a5312a8e931e3f66d4d29a2263fa1f4e89d461a129c1b66c32251bb811

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page