Catalog PyPI
Back to packageRELEASE DETAILS

0.7.1

PyPI

agenarc

Directed-graph Agent Orchestration Engine

agentaigraphllmorchestrationworkflow
Published10 May 2026
Direct dependencies17
Transitive dependenciesNot calculated

README

Version 0.7.1 documentation

AgenArc

Directed-Graph Agent Orchestration Engine

PyPI - Version Python License Tests Coverage


Philosophy

"Mechanism and Strategy Separation"

LayerRole
KernelUltra-stable scheduler — secure execution, resource validation, VFS sandbox
Self-repairBuilt by users within the graph flow — evolve agents without touching the engine
Asset boundaryagrc:// virtual protocol — files, scripts, and prompts live in isolated bundles

Architecture

 ┌──────────────────────────────────────────────────────────┐
 │                      AgenArc v0.7                        │
 ├──────────────────────────────────────────────────────────┤
 │                                                           │
 │  ┌──────────┐    ┌──────────┐    ┌──────────────────┐    │
 │  │ Protocol │───▶│  Engine  │───▶│  Visualization   │    │
 │  │   (DSL)  │    │ (Runtime)│    │   (Web IDE)      │    │
 │  └──────────┘    └──────────┘    └──────────────────┘    │
 │        │               │                  │               │
 │  ┌─────▼─────┐  ┌──────▼──────┐  ┌───────▼────────┐     │
 │  │JSON Schema│  │  Scheduler  │  │  Graph Editor   │     │
 │  │+ Templates│  │  + Router   │  │  + Live Preview │     │
 │  │+ Conditions│ │  + Join     │  │  + Context Panel│     │
 │  └───────────┘  │  + Checkpoint│ │  + Status LEDs  │     │
 │                 │  + Plugins   │  └────────────────┘     │
 │                 └─────────────┘                          │
 └──────────────────────────────────────────────────────────┘

Features

CategoryHighlights
ExecutionLinear & parallel & async modes, Router (conditional branching), Join (branch sync), CheckpointManager
LLMStreaming responses, multi-provider fallback, structured error classification
ScriptingScript_Node with AST-safe evaluator (3 trust levels), gas & memory limits
Packaging.agrc self-contained bundles — JSON protocol + prompts + scripts + plugins in one ZIP
VFSagrc:// virtual filesystem with rwx permissions, path-traversal protection
PluginsPython / C++ / External loaders, hot-reload (file watching), event plugins
VisualizationWeb IDE — graph editor, file tree editor, syntax highlighting, context panel, trace waterfall
SubGraphEmbed .agrc bundles as nodes — isolated context, auto port resolution, pack embedding
CLIrun / shell / serve / validate / info / pack / visualize / init

Node Types

NodeDescriptionInput → Output
SubGraphEmbed and execute a nested .agrc bundle as a sub-graph with isolated contextauto-resolved from child bundle: trigger outputs → inputs, terminal node outputs → outputs
TriggerEntry pointpayload → graph
TriggerEntry pointpayload → graph
LLM_TaskLLM inference (streaming + fallback)messages → response, usage, error
RouterConditional branching (all matches execute in parallel)input → dynamic output ports
JoinSynchronize parallel branches (merge / concat / first)dynamic → output
Memory_I/OPersistent key-value storage (transactional + checkpoint)key, value → value, success
Script_NodeInline Python with AST safety (3 trust levels)arbitrary → result
Prompt_BuilderMulti-turn conversation history managementuser / assistant → messages
LogLog and pass-throughmessage → message
Context_SetSet global context valueskey, value → success
Context_GetRead global context valueskey → value
Asset_ReaderRead files from bundle via VFSpath → content, success
Asset_WriterWrite files with atomic operationspath, content → success
Runtime_ReloadHot reload scripts and plugins at runtimetarget → success

Quick Start

pip install agenarc
# Run a chat agent
agenarc run examples/my_first_agent.agrc --input '{"payload":"Hello!"}'

# Interactive REPL
agenarc shell examples/my_first_agent.agrc

# Background service with plugins
agenarc serve examples/euchea.agrc

# Web-based graph editor
agenarc visualize examples/my_first_agent.agrc

Examples

AgentDescription
my_first_agent.agrcMulti-turn chat — Trigger → Prompt_Builder → LLM_Task
qq_bot_agent.agrcQQ bot with event plugin (serve mode)
euchea.agrcPDF → C++ code generation via Alt+A hotkey (serve mode)

.agrc Bundle

my_agent.agrc/
├── manifest.json          # Metadata, permissions, hot_reload
├── flow.json              # Graph definition (nodes + edges)
├── prompts/
│   └── system.pt          # {{template}} prompt files
├── scripts/
│   └── tool.py            # Custom scripts (optional)
├── sub/                    # Embedded SubGraph bundles (auto-packed)
│   └── translator.agrc/
│       ├── flow.json
│       └── prompts/
├── plugins/                # Embedded plugins (auto-discovered)
│   └── my_plugin/
│       ├── agenarc.json
│       └── plugin.py
└── assets/                 # Static assets (optional)
Example flow.json
{
  "version": "1.0.0",
  "nodes": [
    { "id": "trigger_1", "type": "Trigger", "label": "Start" },
    {
      "id": "llm_1",
      "type": "LLM_Task",
      "label": "Chat",
      "config": {
        "model": "deepseek-chat",
        "system_prompt": "agrc://prompts/system.pt",
        "stream": true,
        "providers": ["deepseek", "openrouter"]
      }
    },
    { "id": "log_1", "type": "Log", "label": "Output" }
  ],
  "edges": [
    { "source": "trigger_1", "sourcePort": "payload", "target": "llm_1", "targetPort": "messages" },
    { "source": "llm_1", "sourcePort": "response", "target": "log_1", "targetPort": "message" }
  ]
}

SubGraph

An .agrc bundle can be embedded as a node in another graph:

{
  "id": "translator",
  "type": "SubGraph",
  "label": "翻译 Agent",
  "config": { "bundle": "translator.agrc" }
}

SubGraph 端口自动从子图 bundle 解析:

  • 输入端口 = 子图 Trigger 节点的输出端口
  • 输出端口 = 子图终端节点(无出边)的输出端口

Bundle 嵌入

引用 sub/ 目录下的子图会在 agenarc pack 时自动嵌入:

my_agent.agrc/
├── flow.json              # 引用 sub/translator.agrc
├── sub/
│   └── translator.agrc/   # 运行时打包时自动嵌入
│       ├── flow.json
│       └── prompts/

上下文隔离

子图拥有独立的 StateManager,不污染父图上下文。父图可以通过 config.inputs 注入值,通过边连接子图的输出端口获取结果。


Configuration

# ~/.agenarc/config.yaml

providers:
  deepseek:
    api_key: sk-your-key
    base_url: https://api.deepseek.com
    default_model: deepseek-chat
    temperature: 0.7

  openrouter:
    api_key: sk-your-key
    base_url: https://openrouter.ai/api/v1
    default_model: openrouter/free

agent:
  checkpoint_dir: ~/.agenarc
Providerbase_url
DeepSeekhttps://api.deepseek.com
OpenAIhttps://api.openai.com/v1
OpenRouterhttps://openrouter.ai/api/v1
Ollamahttp://localhost:11434/v1

Environment variables override config: AGENARC_OPENAI_API_KEY, AGENARC_OPENAI_BASE_URL, AGENARC_OPENAI_MODEL, AGENARC_ANTHROPIC_API_KEY, AGENARC_ANTHROPIC_MODEL, AGENARC_CHECKPOINT_DIR


Development

agenarc/
├── protocol/           # JSON Schema + protocol loader
├── engine/             # Executor, state manager, AST evaluator
├── operators/          # 13 built-in operators
├── vfs/                # agrc:// virtual filesystem
├── plugins/            # Plugin loader (Python/C++/External)
├── graph/              # Graph data structures + traversal
├── visualization/      # Web IDE server + static frontend
└── cli/                # Command-line interface
# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/                          # All (742 passed)
pytest tests/ --cov=agenarc            # With coverage (~62%)
pytest tests/unit/test_builtin_operators.py -v  # Single file

# Lint & type check
ruff check agenarc/
ruff format --check agenarc/
mypy agenarc/

Documentation

DocumentDescription
CHANGELOG.mdRelease history and change log
CONTRIBUTING.mdDevelopment setup, PR process, commit style
docs/agents.mdUser-facing agent creation guide (Chinese)
docs/plugins/README.mdPlugin development guide

License

MIT © Rycbartbad

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 17

Native requirements
17 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
pyyaml
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
pyyaml>=6.0runtime
jsonschema
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
jsonschema>=4.20runtime
openai
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
openai>=1.0runtime
anthropic
Environment
{
  "extras": "",
  "marker": "extra == \"llm\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
anthropic>=0.30; extra == "llm"runtime
watchdog
Environment
{
  "extras": "",
  "marker": "extra == \"plugins\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
watchdog>=4.0; extra == "plugins"runtime
aiohttp
Environment
{
  "extras": "",
  "marker": "extra == \"plugins\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
aiohttp>=3.9; extra == "plugins"runtime
websockets
Environment
{
  "extras": "",
  "marker": "extra == \"plugins\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
websockets>=12.0; extra == "plugins"runtime
pytest
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
pytest>=8; extra == "dev"runtime
pytest-asyncio
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
pytest-asyncio>=0.24; extra == "dev"runtime
pytest-cov
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
pytest-cov>=5.0; extra == "dev"runtime
ruff
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
ruff>=0.3; extra == "dev"runtime
mypy
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
mypy>=1.8; extra == "dev"runtime
pyinstaller
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
pyinstaller>=6.0; extra == "dev"runtime
keyboard
Environment
{
  "extras": "",
  "marker": "extra == \"euchea\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
keyboard>=0.13; extra == "euchea"runtime
markitdown
Environment
{
  "extras": "",
  "marker": "extra == \"euchea\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
markitdown>=0.1; extra == "euchea"runtime
pdfplumber
Environment
{
  "extras": "",
  "marker": "extra == \"euchea\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
pdfplumber>=0.10; extra == "euchea"runtime
PyMuPDF
Environment
{
  "extras": "",
  "marker": "extra == \"euchea\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
PyMuPDF>=1.23; extra == "euchea"runtime

Distribution files

2 collected
agenarc-0.7.1-py3-none-any.whl

bdist_wheel · 154.5 KB · Python py3

Source file
agenarc-0.7.1.tar.gz

sdist · 221.11 KB · Python source

Source file

Repository

PENDING
rycbartbad/agenarc

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 21:24 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:a6f278a34c72a7c674c590d574bbb7218a95e6d64cf793ff8dcdd0fb59985a4e

Other collected versions

View all collected versions →