The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Method-native work system for terminal coding agents
Loushang is a Python system for agent-led work that keeps methods, sessions, tools, and models as runtime objects. In practice, it gives you a CLI workbench plus an AI SDK so you can route across providers, resume work, inspect execution, and guide delivery with a repeatable method.
Builders who want a terminal coding agent that can resume work, use tools under policy, and follow project methods.
You can run coding sessions that persist, resume, and produce traceable delivery instead of one-off chat turns.
What it does
Model routing
Routes requests across providers and models such as GPT, Claude, DeepSeek, Qwen, Kimi, GLM, and MiniMax.
Persistent sessions
Keeps coding sessions durable so you can resume, fork, export, and inspect prior work.
Tool governance
Exposes built-in and configurable tools to the agent under policy rather than as open-ended access.
Extension hooks
Lets a project add hooks, custom tools, dynamic resources, commands, and flags through Python extensions.
Method-guided delivery
Treats methods, stages, roles, artifacts, and acceptance expectations as part of the work runtime.
AI SDK
Includes `loushang.ai` for model lookup, streaming, tool calls, and cost helpers.
README
Loushang
English | 中文
Loushang is a method-native AI work system for running complex work from intent to verified delivery.
Current focus: loushang code, a CLI and terminal workbench for software development with model routing, persistent sessions, tools, extensions, and method-guided delivery.
Why Loushang
Modern AI agents can plan and act, but complex work still breaks down when context is lost, execution cannot be resumed, tools are hard to govern, and results are not verified.
Loushang treats methods, stages, roles, tools, sessions, and work products as runtime objects. The goal is not just to make agents smarter, but to make complex work more reliable, recoverable, auditable, and deliverable.
Method is the work contract, work is the runtime fact, agent is the execution kernel, ai is the model access layer, harness is the cross-product substrate, coding is the V1 product surface, tui is the terminal presentation, and channel is the boundary protocol—together organizing complex knowledge work into a runnable, recoverable, verifiable, and evolvable system.
What You Can Use Today
loushang code: a coding-focused CLI and terminal workbench.loushang.ai: a provider-aware AI SDK with model registry, streaming, tool calls, and cost helpers.- Sessions: persistent coding sessions with resume, fork, export, and diagnostics.
- Tools: built-in coding tools and configurable tool surfaces.
- Extensions: project-level extension hooks, custom tools, dynamic resources, and commands.
- Methods and skills: method-guided coding turns and reusable workflow assets.
Quick Start
Loushang is in early development. The recommended path is to run it from source.
git clone https://github.com/zhnt/loushang.git
cd loushang
uv venv .venv
source .venv/bin/activate
uv pip install -e ".[dev]"
loushang --help
loushang --list-models
loushang --list-commands
loushang -p "Inspect this repository and summarize what it does."
You can also run make bootstrap, which creates .venv/ with uv and installs the project in editable development mode. The Makefile does not currently provide a make install target; use make bootstrap for local development or make install-binary for a local binary install.
For local development in this repository, use the project virtual environment in .venv/.
Core Concepts
- Method: a structured work contract that defines roles, phases, workflow, constraints, artifacts, and acceptance expectations for a class of work.
- Session: a durable coding conversation and execution record that can be resumed, forked, exported, and inspected.
- Tool: an executable capability made available to the agent under policy.
- Extension: project-level Python code that can contribute hooks, tools, resources, commands, and flags.
- Model provider: a concrete AI provider endpoint and model resolved through the model catalog.
Documentation
Examples
- Coding examples show CLI/session/tool/extension scenarios.
- AI SDK examples show model lookup, complete, stream, tools, and typed contexts.
Roadmap
- V1:
loushang codeas the primary product surface for software development work. - V2:
loushang workas a personal complex-work workbench, withcode,research, andpptas specialized flows. - V3: daemon, method market, and model gateway foundations.
- V4: team workflows, shared runs, approvals, budgets, and audit.
- V5: managed runtime for method-bound complex work.
Project Status
Loushang is in active early development.
The current stable focus is loushang code and the underlying loushang.ai SDK. Broader work surfaces such as loushang work, loushang research, and loushang ppt are part of the roadmap and should be treated as evolving product directions.
Contact
Loushang was initiated by Heng Zhou. He has long worked across low-code systems, workflows, databases, model-driven engineering, DSLs, architecture methods, systems engineering, and artificial intelligence, with a focus on operationalizing ontology and methodology into infrastructure for complex-work delivery.
For questions, feedback, collaboration, or a community group invitation, contact: zhnt@foxmail.com.
Acknowledgements
Loushang learns from public design and engineering patterns in projects such as OpenAI Codex, pi, python-prompt-toolkit, browser-use, Kimi CLI, superpowers, gstack, openclaw, and hermes-agent. These projects are references and inspiration; unless listed in THIRD_PARTY_NOTICES.md, this repository does not include or redistribute their code.
License
Loushang is licensed under the Apache License 2.0 unless a file states otherwise.
When redistributing source code, binaries, documents, or modified versions, keep LICENSE and NOTICE, and retain attribution in product documentation, About/Credits pages, or equivalent third-party notices.
Third-party dependency information is available in THIRD_PARTY_NOTICES.md.
Files in the repo
- .codex
- .github
- backup
- docs
- examples
- scenarios
- scripts
- spikes
- src
- tests
- .gitattributes
- .gitignore
- .python-version
- AGENTS.md
- LICENSE
- loushang.spec
- Makefile
- NOTICE
- pyproject.toml
- README.md
- README.zh-CN.md
- THIRD_PARTY_NOTICES.md
- uv.lock
Discussion (0)
Ask about usage, or say what you built with itSign in to join the discussion.
No comments yet. Be the first to say what this is good for.
More harnesses
from vibe coding to agentic engineering - practice makes claude perfect
🌊 The original agent meta-harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
Practical patterns, starters & CLI tools for loop engineering with AI coding agents. Design systems that prompt and orchestrate agents (inspired by Addy Osmani and Boris Cherny). Includes loop-audit, loop-init, loop-cost.
Git. Ship. Done - Core

The most RAM efficient harness