返回资讯中心
外部精选
软件工程
#开发者实时流

Octet:用 Rust 构建的终端编程智能体

来源标题:Octet

Octet 是一个用 Rust 编写的终端编程智能体,可以读取代码、编辑文件并运行测试,并支持用户选择模型。它通过扩展机制允许用任意语言添加工具、接入自定义工作流。作者 Achu Mukundan 表示,自己构建它,是为了让这套 harness 更贴合个人工作流。

Hacker News 最新DeathArrow2026/11/18 · 今天30 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

Achu MukundanToronto, ON, Canada6 November 2026

The endpoint now returns bounded items and a nextCursor.

export async function fetchProjects(cursor?: string) { const page = await api.get('/projects', { cursor }); return { items: page.items, next: page.nextCursor }; }

Existing callers keep the first-page default.

Jest covers empty pages and cursor boundaries.

✓ completed

›

cerebras/qwen-3.8-27b · high~/projects/workbench

Scripted examples of coding, delegated workers and web research. Animation pacing is illustrative, not measured model performance. Pause the animation to read the transcript.

Octet is a terminal coding agent, built in Rust. It reads code, edits files and runs tests with your choice of model. Extensions let you add tools and connect your own workflows in any language.

So you know where I'm coming from: I think Pi is basically perfect, and more broadly that "harness engineering" is sort of pointless. It's more of a systems engineering problem these days, with model intelligence usually eclipsing clever memory tricks or compaction techniques.

I wanted to make the harness work for my workflows, though, and in the process, built a small native host around the extensions I wanted to write.

I make experimental electronic music in my free time, and wanted a coding agent to get into my Ableton sessions, hear them, and explore new directions from my sketches. Pi was my favourite coding agent at the time but didn't support audio inputs. I wanted native audio and computer use in the same model context, with the audio processed by the model and informing every tool call. Antigravity could do that, but it doesn't let me use any model I want.

Today, octet, with the right models, can hear audio and use your computer, an MCP server or local tools to branch off in a new analytical or creative direction.

The project started in late April with my own architecture drawn on paper. Testing it in TypeScript, I quickly realized I was building Pi from first principles. I also tried forking Pi, like a better engineer probably would've done in the first place, but it didn't feel challenging enough.

So I compromised, and rebuilt Pi with Rust. I've been working in TypeScript for a few years, but not learning other languages had left SWE feeling stale and boring. I wanted to go back to my C/C++ roots, with modern comforts like a borrow checker and a vibrant developer ecosystem.

Octet doesn't change Pi's agent recipe much. Thank you to Earendil and the people of Pi for laying those foundations.

I've daily-driven octet for months, putting tens of billions of tokens through it, using it to build itself and other projects, and maintaining it for me and my friends' daily use.

Familiar workflow features, plus first-party extensions.

Model switching

Skills and prompt templates

Themes and extensions

Resumable and branching sessions

Compaction for long conversations

Steering while the agent works

Queued follow-ups for when it's done

Themes change the spacing, transcript layout, code colours and composer. Use /theme in octet. You can edit a theme file and preview it live.

Computer use with Cua Driver

Multi-model subagents

Web search

MCP

Codemode

MCP and Codemode stay optional extensions you can download and enable.

Pi compatibility is experimental and ships as a separate installable extension. To try it, install and enable octet-pi-compat; it needs Node 22.19+ and runs supported Pi extensions. Support is per-extension, not blanket parity — the compatibility ledger lists what has actually been validated.

The Rust host owns the agent and the terminal: model communication, tools, sessions and rendering. The coding loop itself doesn't need Node or Python.

terminaloctetRust hostagent loop · toolssessions · renderermodelscloud · localkeys / redrawHTTPSJSON-RPC · stdioextension processesPythonTypeScriptRust terminalmodelscloud · localkeys / redrawHTTPSoctetRust hostagent loop · tools · sessionsJSON-RPC · stdioextension processesPythonTypeScriptRust The Rust host runs the agent and terminal; extensions run in separate processes.

Ratchet and Clanker: Tools of Abstraction

Extensions run beside the Rust host and communicate over JSON-RPC 2.0.

You can write extensions in any language, use its libraries and add capabilities without rebuilding the agent.

from octet_extension import Extension

ext = Extension(api_version="0.4")

@ext.tool( name="hello", description="Say hello to someone", parameters={ "type": "object", "properties": {"name": {"type": "string"}}, "required": ["name"], "additionalProperties": False, }, ) def hello(args): return f"Hello, {args['name']}!"

ext.run()

TypeScriptTypeScript SDKextension.ts

import { Extension } from '@skaft-software/octet-extension-sdk';

const extension = new Extension(); extension.tool({ name: 'hello', description: 'Say hello to someone', parameters: { type: 'object', properties: { name: { type: 'string' } }, required: ['name'], additionalProperties: false, }, }, ({ name }) => Hello, ${name}!); export default extension;

RustRust SDKmain.rs

use octet_extension::{Deserialize, Extension, JsonSchema, ToolResult};

#[derive(Deserialize, JsonSchema)] struct Hello { name: String, }

fn main() -> Result<(), octet_extension::Error> { let mut extension = Extension::new(); extension.tool("hello", "Say hello to someone", |args: Hello, _call| { Ok(ToolResult::text(format!("Hello, {}!", args.name))) })?; extension.run() }

C++C++ header over the C interfacemain.cpp

#include <octet.hpp>

int main() { octet::extension extension; extension.tool("hello", "Say hello to someone", {octet::field::string("name", 256)}, [](octet::call &call) { return octet::result::text("Hello, " + call.string("name") + "!"); }); extension.run(); }

Perlno SDK, just JSON linesextension.pl

use strict; use warnings; use JSON::PP;

$| = 1; my $json = JSON::PP->new; while (my $line = <STDIN>) { my $request = decode_json($line); my ($id, $method) = @$request{qw(id method)}; my $result = $method eq 'initialize' ? { api_version => '0.1', commands => [], tools => [{ name => 'hello', description => 'Say hello to someone', parameters => { type => 'object', properties => { name => { type => 'string' } }, required => ['name'], additionalProperties => JSON::PP::false, }, }], } : $method eq 'tool/call' ? { content => "Hello, $request->{params}{arguments}{name}!", is_error => JSON::PP::false, } : {}; print $json->encode({ jsonrpc => '2.0', id => $id, result => $result }), "\n" if defined $id; last if $method eq 'shutdown'; }

The hello tool is implemented in five languages. Each file is complete and self-contained. The Perl version uses no SDK: an extension is a process that reads JSON requests on stdin and writes responses on stdout.

Each extension also needs a short manifest. See the setup steps for all five.

Only enable extensions you trust. They run with your OS permissions.

Daily use only covers the kinds of work I do. I also ran Terminal-Bench 2.1 to put octet through a wider set of tasks and see what broke.

The v0.6.2 run, using GPT-5.6 Sol at max reasoning, scored 86.97% in my local audit: 387 of 445 attempts passed after excluding four test-gaming passes. That gave me some confidence I hadn't quietly broken something fundamental in the agent loop.

The run also exposed a timeout cleanup bug, fixed in v0.6.3; I haven't rerun the campaign since.1

Browse the 445 trajectories · Methodology and audit

octetGPT-5.6 Sol · maxCodexGPT-6 Astra · highClaude CodeFable 5 · xhighCursor CLIGrok 4.5 · highClaude CodeOpus 4.8 · highmini-SWE-agentMuse Spark 1.1 · xhighCodexGPT-5.6 Sol · maxCodex · GPT-6 Astra high: 87.42% ± 1.79, $773.50Claude Code · Fable 5 xhigh: 83.82% ± 2.27, $552.67Cursor CLI · Grok 4.5 high: 79.33% ± 2.86, $134.09Claude Code · Opus 4.8 high: 78.88% ± 2.57, $286.94mini-SWE-agent · Muse Spark 1.1 xhigh: 76.18% ± 2.41, $198.05Codex · GPT-5.6 Sol max: 76.18% ± 2.51, $574.68octet · GPT-5.6 Sol max: 86.97% ± 2.43, $605.67Codex · GPT-6 Astra medium: 86.97% ± 1.89, $619.07Codex · GPT-6 Astra low: 86.74% ± 1.82, $463.45Codex · GPT-6 Astra xhigh: 85.84% ± 1.43, $888.54Terminus 2 · Fable 5 high: 80.45% ± 2.27, $438.64Codex · GPT-5.6 Terra max: 78.43% ± 2.45, $421.15Terminus 2 · GPT-5.5 xhigh: 77.98% ± 2.39, $493.85Codex · GPT-5.6 Luna max: 75.73% ± 2.59, $241.45Claude Code · Sonnet 5 high: 74.61% ± 3.21, $288.18Terminus 2 · Gemini 3 Pro high: 73.93% ± 2.53, $224.44

Run, with its 95% confidence interval

Leaderboard cost frontier

Full comparison table Terminal-Bench 2.1 leaderboard · octet* is locally audited

Agent Model Effort Score ± CI Cost

1 Codex GPT-6 Astra high 87.42% ± 1.79 $773.50 2 octet* GPT-5.6 Sol max 86.97% ± 2.43 $605.67 3 Claude Code Fable 5 xhigh 83.82% ± 2.27 $552.67 4 Codex GPT-5.5 xhigh 83.15% ± 2.21 $2,059.19 5 Terminus 2 Fable 5 high 80.45% ± 2.27 $438.64 6 Cursor CLI Grok 4.5 high 79.33% ± 2.86 $134.09 7 Claude Code Opus 4.8 high 78.88% ± 2.57 $286.94 8 Codex GPT-5.6 Terra max 78.43% ± 2.45 $421.15 9 Terminus 2 GPT-5.5 xhigh 77.98% ± 2.39 $493.85 10 mini-SWE-age… Muse Spark 1.1 xhigh 76.18% ± 2.41 $198.05 11 Codex GPT-5.6 Sol max 76.18% ± 2.51 $574.68 12 Codex GPT-5.6 Luna max 75.73% ± 2.59 $241.45 13 Claude Code Sonnet 5 high 74.61% ± 3.21 $288.18 14 Terminus 2 Gemini 3 Pro high 73.93% ± 2.53 $224.44 15 Claude Code Opus 4.7 max 68.90% ± 2.76 $599.52 16 Terminus 2 Opus 4.7 max 66.07% ± 2.69 $582.26 17 Gemini CLI Gemini 3 Pro high 65.84% ± 2.70 $247.76 18 Gemini CLI Gemini 3.1 Pro high 65.84% ± 3.27 $236.49 19 Terminus 2 Gemini 3.1 Pro high 65.62% ± 3.23 $229.99 20 Claude Code GLM-5.1 max 58.65% ± 2.43 $277.14

Agent Model Score Cost

1 Codex GPT-6 Astra 87.42% $774 2 octet* GPT-5.6 Sol 86.97% $606 3 Claude Code Fable 5 83.82% $553 4 Codex GPT-5.5 83.15% $2,059 5 Terminus 2 Fable 5 80.45% $439 6 Cursor CLI Grok 4.5 79.33% $134 7 Claude Code Opus 4.8 78.88% $287 8 Codex GPT-5.6 Terra 78.43% $421 9 Terminus 2 GPT-5.5 77.98% $494 10 mini-SWE-ag… Muse Spark 1.1 76.18% $198 11 Codex GPT-5.6 Sol 76.18% $575 12 Codex GPT-5.6 Luna 75.73% $241 13 Claude Code Sonnet 5 74.61% $288 14 Terminus 2 Gemini 3 Pro 73.93% $224 15 Claude Code Opus 4.7 68.90% $600 16 Terminus 2 Opus 4.7 66.07% $582 17 Gemini CLI Gemini 3 Pro 65.84% $248 18 Gemini CLI Gemini 3.1 Pro 65.84% $236 19 Terminus 2 Gemini 3.1 Pro 65.62% $230 20 Claude Code GLM-5.1 58.65% $277

Retained leaderboard snapshot, with my locally audited run inserted.

Vanquish the Latency

I also wanted to put numbers to how quick and light octet feels. The job was small: read a spec and ledger, write an exact JSON summary, then run its checker. Each agent used GPT-6 Luna at low reasoning on the same clean VM and account, with its own prompts and tools.

Time and sampled process-tree memory measured separately. How I measured this ↗

Vercel's fx is seriously impressive. It had the smallest memory footprint here. For the developer experience octet offers, I'm really happy with how close it gets.

Here's the task, fixtures and checker. The methodology and run records include the failures, outliers and other configurations I tested. The chart shows six of the seven current clients; Prime is in those records but not the figure.2

pi-doom is a Pi extension that runs Doom in your terminal, compiled to WebAssembly. This source-build demo runs it unmodified through octet's experimental compatibility adapter, with octet rendering the result.

octet v0.10.0 is experimental, free and open source. Explore, have fun, and build bridges with developer communities you wouldn't have otherwise.

I'd love your help. Try octet on work you know well and tell me where it breaks. Contribute themes, extensions or SDKs, or help with bugs, docs and test

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →