npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@baimingtao/lbs-agent

v2.0.39

Published

Leaving Blank Space Agent — 多 Agent 编排框架

Downloads

5,773

Readme

LBS Agent

LBS Agent 是一个自主 Agent 运行时系统。当前仓库的正式架构已经收口为五层:

  • application/:composition root + application services
  • runtime/:runtime kernel(LLM / context / memory / orchestration / perception)
  • interfaces/:CLI / API / gateway / web 入口
  • extensions/:skills 与 optional MCP catalogs
  • tools/:tool runtime、skill/mcp provider、执行基础设施

legacy 顶层包(如 app/core/cli/)目前仅作为 compatibility shim 保留,不再是正式实现目录。

5 分钟上手

安装 / 启动

git clone <repo>
cd lbs-agent
pip install -r requirements.txt   # 或 poetry install
python lbs.py --help

也可以继续使用顶层入口:

python lbs.py --help

配置 LLM Provider

python lbs.py llm inspect
python lbs.py models
python lbs.py config

模型与 agent 内置配置位于:

  • runtime/core/llm/registry/models.yaml
  • runtime/core/sub_agents/agents.yaml

第一次跑 Agent

python lbs.py run "say hello"
python lbs.py run-agent code "write fizzbuzz in python"

多 Agent 编排

python lbs.py run-agent research "调研 Hermes 和 LBS 的区别"
python lbs.py run-agent summary "总结上一条结果"

当前架构

1. application/

  • application/container.py:系统装配根
  • application/runtime_factory.py:构建单 agent runtime config
  • application/services/:use-case services(model / agent / orchestration / session / cron / tool / interactive / gateway / skill / mcp)

2. runtime/

  • runtime/core/:ModelRouter、provider、sub-agent registry
  • runtime/context/:context builder / manager / trimming / compression
  • runtime/memory/:session store、working memory、long-term memory、task contracts
  • runtime/orchestration/:Orchestrator、AgentLoop、scheduler、verification
  • runtime/perception/:intent / entity / input preprocess

3. interfaces/

  • interfaces/cli/_impl/:CLI 命令实现
  • interfaces/api/_impl/server.py:FastAPI 服务
  • interfaces/gateway/_impl/:gateway adapters
  • interfaces/web/frontend/:前端
  • interfaces/web/legacy_web/:历史 web 资源承接区

4. extensions/

  • extensions/skills/builtin/
  • extensions/skills/optional/
  • extensions/mcps/optional/

5. tools/

  • tools/tool/:ToolRuntime、tool policy、tool registry
  • tools/skill/:skill registry / provider
  • tools/mcp/:MCP registry / provider infra

依赖方向

正式依赖方向应保持:

interfaces -> application -> runtime
tools -----^            -> tools infra
extensions (asset catalogs, loaded by runtime/tools when needed)

约束:

  • interfaces/ 不直接依赖 runtime internals
  • runtime/ 不反向 import application/
  • legacy shim 只做兼容转发,不承载真实逻辑

常用命令

lbs models
lbs model list [--config]
lbs model switch <provider> <model>
lbs model health [provider]

lbs llm inspect
lbs llm validate [--json]
lbs llm diagnostics [--json]
lbs llm route <agent>

lbs agents
lbs tools inspect
lbs tools list [--agent name]
lbs tools profiles

lbs skills list
lbs skills view <name>
lbs skill list
lbs skill sources
lbs skill sync <repo> [alias]

lbs mcp list

lbs sessions list
lbs sessions show <id>
lbs sessions export <id> <out>
lbs sessions report [id]

lbs workers list
lbs workers show <id>

lbs cron list
lbs run "<task>"
lbs run-agent <name> "<task>"

编程 API

Container

from application.container import AgentSystemContainer
from config.config import AppConfig

container = AgentSystemContainer(config=AppConfig())
container.session_service().list_sessions(limit=10)
container.model_service().inspect_llm()
container.build_orchestrator()

Orchestrator

result = container.build_orchestrator().run_agent_sync(
    agent_name="code",
    task="write hello world",
    context="",
    session_id="",
)
print(result.success, result.content)

开发

focused tests

python -m pytest tests/architecture/ -v
python -m pytest tests/test_app_services_boundary.py tests/test_server_api.py -q

目录收口说明

目录大迁移已完成;当前剩余 legacy 顶层目录主要用于 import compatibility。后续收尾以:

  1. 缩小 shim 表面积
  2. 让测试与文档全面直连新路径
  3. 最终删除不再需要的 legacy 目录 为主。