Skip to content

About

A minimal agent harness written in Go

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

motionloop

A general-purpose agent framework in Go: bring your own system prompt, a general tool set, and pluggable LLM providers, and get a complete "LLM ⇄ tool" loop for any agent scenario — not just coding.

The core coding-agent harness design (agent loop, tool system, sessions, compaction, skills, memory) follows pi, but motionloop is framework-first: the CLI is just the largest consumer of the library.

Status: early development. The message model and stream event vocabulary (llm package) are in place; the agent loop, tools, sessions, and CLI arrive over the next phases. See PLAN.md and docs/ for the full roadmap.

Goals

  • Custom system prompts — template with named sections, three-level overrides (built-in → global → project), dynamic environment facts.
  • General tool set — bash, read, write, edit, grep, glob, ls shipped as presets (coding / minimal / empty); register your own tools by implementing one interface.
  • Pluggable LLM providers — one OpenAI-compatible provider covers most endpoints (OpenAI, GLM, DeepSeek, Kimi, Ollama, vLLM, …), plus a native Anthropic provider and config-driven custom entries.

Non-goals (for v0.x)

No subprocess plugin protocols (MCP-style), no built-in sandboxing (the agent runs with your permissions), no TUI — see the decision log in PLAN.md.

Getting started

Requires Go 1.27+.

go build ./...
go test ./...
go run ./cmd/motionloop --version

Architecture

cmd/motionloop/   CLI entry (thin assembly)
llm/              unified LLM vocabulary: messages, content blocks,
                 stream events, model metadata, provider registry

Upcoming packages (see PLAN.md): agent (loop, tools, hooks, events), tools, prompt, profile, session (JSONL, pi-compatible entry schema), skills, memory, config.

Dependency direction is strictly one-way: cmd → profile → (prompt, tools, skills, memory, session) → agent → llm.

Two invariants worth knowing early:

  • Message and content-block JSON field names are aligned with pi's session schema, so sessions persist messages verbatim. Do not rename them.
  • Runtime code carries zero third-party dependencies — standard library only.

Documentation

About

A minimal agent harness written in Go

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors