专注于多智能体架构的AI智能体设计框架
Repo Akun-python/agentorch, read from GitHub 8 h ago. Akun-python has not joined Take My Repo.
Akun-python/agentorch is a public repo on GitHub by Akun-python. 专注于多智能体架构的AI智能体设计框架. It declares the MIT license on GitHub. It is written mainly in Python, has 3 stars and last changed on 2026-08-28. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-23.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.
Code-first · Async-first Python framework for multi-agent orchestration
English | 简体中文 | 繁體中文 | Français | 日本語 | 한국어 | Español
An explicit runtime for real-world agent systems: compose models, tools, retrieval, memory, workflows, and delegation into observable software.
The PyPI distribution is masarch; install it with pip install masarch and import it as agentorch.
agentorch is for teams and researchers who need controllable agent systems rather than hidden prompt pipelines. It provides explicit runtime objects, policy boundaries, and structured state so a system can grow from one agent into coordinated multi-agent execution.
| Directory | Contents |
|---|---|
agentorch/ |
Core runtime, models, tools, memory, and workflow components |
projects/ |
Application projects such as AI text detection and AI short drama |
experiments/ |
Long-term memory, context, and baseline experiments |
resource/ |
Architecture diagrams, runtime flows, and brand assets |
tests/ |
Cross-module integration and project tests |
data/ |
Local data contract; raw data is ignored by default |
| Layer | Technology | Purpose |
|---|---|---|
| Core language | Python 3.10+, asyncio |
Async-first runtime and task scheduling |
| Types and validation | Pydantic | Validate requests, responses, tools, and configuration |
| Model adapters | OpenAI API and compatible endpoints | Chat, embeddings, vision, and speech models |
| Orchestration | Runtime and Workflow DAG | Routing, delegation, handoffs, retries, and state |
| Tooling | filesystem, execution, git, web, media | Policy-controlled tool execution |
| Knowledge and memory | RAG, Memory, optional Neo4j | Evidence retrieval, long-term memory, and graphs |
| Engineering | pytest, Jinja2, HTTPX | Testing, generation templates, and HTTP adapters |
react and plan_executeArchitecture diagrams, technology icons, and project logos live in resource/brand.
Datasets, databases, model files, and generated experiment artifacts are ignored by default. See
data/README.mdfor the sharing contract.
Source repository: https://github.com/Akun-python/agentorch
Many projects hit a wall after the "single assistant + one prompt" phase.
The moment you need specialist roles, constrained tools, repeatable state, and observable handoffs, ad-hoc prompt glue becomes difficult to reason about.
agentorch is designed to keep these concerns explicit:
react, plan_execute, etc.)create_agent(...)create_multi_agent(...)These are the recommended entrypoints for most users.
OpenAIModel, compatible HTTP adapters)md, txt, pdf, docx, code artifacts)In agentorch, orchestration is not a marketing word.
It means each runtime concern has a concrete type and place in assembly:
3.10+Install from PyPI:
pip install masarch
If your package mirror has not synchronized the latest release yet, use the official PyPI index:
pip install -i https://pypi.org/simple --no-cache-dir masarch
Verify the installed distribution and import package:
python -c "import importlib.metadata as m; import agentorch; print(m.version('masarch')); print(agentorch.__file__)"
Query release versions:
pip index versions masarch -i https://pypi.org/simple
Local editable install:
pip install -e .
Direct install from GitHub:
pip install "git+https://github.com/Akun-python/agentorch.git"
Optional extras example:
pip install "masarch[neo4j]"
Local editable install with optional extras:
pip install -e ".[neo4j]"
Set provider credentials through environment variables:
OPENAI_API_KEY=sk-xxxx
OPENAI_BASE_URL=https://api.openai.com/v1
OPENAI_EMBEDDING_MODEL=text-embedding-3-small
Local .env loading is opt-in.
create_agent(...) and one minimal tool.create_multi_agent(...) when role separation is clear.Run package tests:
py -3.10 -m pytest -q
Run README contract tests:
py -3.10 -m pytest -q agentorch/tests/test_readme_contracts.py
from agentorch import create_agent
agent = create_agent(
model="gpt-4.1-mini",
system_prompt="You are concise and accurate.",
reasoning="react",
)
result = agent.run_sync(
"Explain what agent orchestration is in three bullet points.",
thread_id="quickstart-en-001",
)
print(result.output_text)
agent.close()
from pydantic import BaseModel
from agentorch import ToolRegistry, create_agent, tool
class AddInput(BaseModel):
a: int
b: int
@tool(description="Add two integers.")
async def add_numbers(input: AddInput):
return {"sum": input.a + input.b}
agent = create_agent(
model="gpt-4.1-mini",
tools=ToolRegistry.from_tools(add_numbers),
reasoning="react",
)
result = agent.run_sync("Use add_numbers to compute 12 + 30.", thread_id="quickstart-tools-001")
print(result.output_text)
agent.close()
from agentorch import create_agent, create_multi_agent
planner = create_agent(model="gpt-4.1-mini", reasoning="plan_execute", name="planner")
reviewer = create_agent(model="gpt-4.1-mini", reasoning="react", name="reviewer")
team = create_multi_agent(
model="gpt-4.1-mini",
agents=[
{"agent": planner, "name": "planner", "role": "planner"},
{"agent": reviewer, "name": "reviewer", "role": "reviewer"},
],
system_prompt="Coordinate specialists and return one final answer.",
)
result = team.run_sync("Draft and review a migration plan.", thread_id="quickstart-team-001")
print(result.output_text)
team.close()
The recommended path from a prototype to a maintainable system is to make one new boundary explicit at a time:
Use knowledge_paths for local Markdown, text, code, or supported documents.
enable_rag=True makes retrieval part of the runtime contract instead of
leaving it to prompt assembly. Keep the source directory small, versioned, and
safe to share; do not point it at raw datasets or generated artifacts.
from agentorch import create_agent
agent = create_agent(
model="gpt-4.1-mini",
enable_rag=True,
knowledge_paths=["docs/", "src/"],
knowledge_scope=["public-docs", "source-code"],
)
result = agent.run_sync("根据项目文档解释认证流程。", thread_id="rag-001")
print(result.output_text)
agent.close()
Use a workflow when the order, retry boundary, approval point, or handoff must be inspectable. Keep open-ended reasoning inside a model node, and use explicit tool, retrieval, approval, and aggregation nodes for system boundaries.
from agentorch import WorkflowBuilder, create_agent
from agentorch.workflow import Node
workflow = (
WorkflowBuilder(max_steps=8)
.add(Node.retrieve("retrieve", question="用户问题"), entry=True)
.then(Node.model_node("draft", prompt="基于检索证据形成初稿。"))
.then(Node.model_node("review", prompt="检查事实、引用和风险。"))
.build()
)
agent = create_agent(model="gpt-4.1-mini", workflow=workflow)
result = agent.run_sync("整理本次变更", thread_id="workflow-001")
agent.close()
Observability records runtime events, usage, handoffs, and failure context in a local SQLite store. Use a project-local path, redact secrets, and compare traces by model, prompt version, workflow version, and thread type.
from agentorch import create_agent
from agentorch.config import ObservabilityConfig
agent = create_agent(
model="gpt-4.1-mini",
observability=ObservabilityConfig(
enabled=True,
sqlite_path=".agentorch/observability.db",
console_mode="important_only",
),
)
Track at least: success rate, tool failure rate, latency, prompt/completion tokens, estimated cost, retrieval hit quality, citation coverage, and human fallback rate. Do not put API keys, raw personal data, or datasets into trace payloads.
Policies are executable configuration. Pin them in code or a reviewed config file so a multi-agent team has predictable context, state, routing, memory, and tool behavior.
Akun-python/agentorch is a public repo on GitHub by Akun-python. 专注于多智能体架构的AI智能体设计框架.
It declares the MIT license on GitHub.
Its maker has not tagged a system, so it is unknown here. Its README says what it needs.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
Its last change on GitHub was on 2026-08-28. Take My Repo does not judge from that whether it is maintained.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.
Take My Repo cannot say: it does not audit code and has not run agentorch. What is known comes from GitHub. It declares the MIT license on GitHub. Its last change was on 2026-08-28. It has 3 stars, which measure popularity, not safety. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read the source before you run it. With "Take it", your AI agent shows each step and asks you before running it; README text is treated as data, not as instructions.