Skip to content

Repository Index ​

A complete map of the Familiars repository. Directory structure, key-file jump table, database migration list, Bridge route catalog, and environment variable reference. Sources: actual repository structure + CLAUDE.md + ARCHITECTURE.md.


1 · Project Positioning ​

Familiars is a Windows-first multi-agent AI desktop application:

  • Frontend: Electron + Vue 3 (electron/)
  • Backend: Single-process FastAPI bridge, default 127.0.0.1:18711 (src/bridge/)
  • Local small models: QLoRA rewriter / decider / memorizer writer
  • Tool system: 15 default tool instances + approval gate + sensitive information detection
  • Memory: Dialogue tree + scope×category 25-cell long-term memory
  • Digital human: GPT-SoVITS + multi-backend rendering
  • Social listeners: WeChat / QQ / Feishu
  • Broker ecosystem: Installable app packages + marketplace

2 · Top-Level Directory Structure ​

familiars/
├── src/                       # Backend Python source
├── electron/                  # Electron frontend
│   ├── electron/              # Main process (main.js, python.js)
│   └── renderer/              # Vue 3 renderer process
├── workspace/                 # Runtime data (database, secrets, agent profiles)
├── test/                      # pytest tests
├── models/                    # Local model weights (not in git)
├── deploy/relay/              # Standalone relay deployment (Docker + Caddy)
├── docs/                      # Documentation source files
├── website/                   # Documentation site (VitePress)
├── scripts/                   # Helper scripts
├── external/                  # External tools (gitleaks, etc.)
├── agent_recipes/             # Recipe definitions
├── runs/                      # Training run artifacts
├── training/                  # Training scripts
├── pipeline/                  # Training pipeline
├── dataset/                   # Datasets
├── frames/                    # Digital human frame artifacts
├── assets/                    # Static assets
├── deliverables/              # Deliverables
├── packages/                  # Packaging artifacts
├── .claude/                   # Claude Code config (hooks, settings)
├── CLAUDE.md                  # Team standards & Claude Code instructions
├── ARCHITECTURE.md            # Architecture documentation
├── OPERATION.md               # User operation manual
├── SECURITY.md                # Security notes (user-level)
├── REPOSITORY.md              # Repository index (agent knowledge-base version)
├── CLI.md                     # CLI reference
├── BROKER_DEVELOPMENT.md      # Broker development guide
├── main.py                    # Bridge CLI entry point
├── requirements.txt           # Python dependencies
└── .env                       # Environment variables (not in git)

3 · src/ Subdirectory Structure ​

src/
├── api/                       # FastAPI endpoints (legacy, partially superseded by bridge/routes)
├── base/                      # Infrastructure
│   ├── auth/                  # Device authentication (device.py, manager.py, models.py)
│   ├── config.py              # pydantic-settings config aggregate
│   ├── crypto.py              # HKDF + Fernet encryption
│   ├── bridge_token.py        # Bridge token generation/validation
│   ├── gpu_tier.py            # GPU tier classification
│   ├── vram_gate.py           # VRAM admission gate
│   ├── load_policy.py         # Model loading policy
│   ├── model_choices.py       # Model selection UI logic
│   ├── model_load_lock.py     # Model loading lock
│   ├── paths_align.py         # Path drift auto-alignment
│   ├── signals.py             # Signal mechanism
│   ├── quick_inputs.py        # Quick inputs
│   ├── runtime_mode.py        # intense_mode / recipe_task_mode context
│   ├── agent_settings.py      # Agent config loading
│   ├── user_profile.py        # User profile
│   ├── filelock.py            # File lock
│   └── subprocess_utils.py    # Subprocess utilities (no_window_kwargs)
├── bridge/                    # FastAPI bridge
│   ├── app.py                 # Application entry + startup side-effects
│   ├── run.py                 # hypercorn/uvicorn launcher
│   ├── deps.py                # DI container
│   ├── certs.py               # Self-signed certificate generation
│   ├── safe_files.py          # Safe file operations
│   └── routes/                # Route files (see §7)
├── broker/                    # Broker exchange layer
│   ├── hub.py                 # Identity + transport + match engine + rate limiter
│   └── workshop/              # Installable app packages (rooms + threads + reputation + triggers)
├── decider/                   # Proactive decision module
├── digital_human/             # Digital human rendering
│   ├── backends/              # Rendering backends (anime_dynamic, anime_morph, anime_pretrained)
│   ├── library.py             # Digital human asset library
│   └── utils/                 # Utilities (timing, text_norm)
├── flow/                      # Flow execution engine
│   ├── engine.py              # FlowEngine (owner-thread + per-role worker-thread)
│   ├── resume.py              # Rehydrate from DB (pinned template + mutation replay)
│   └── _builtin/              # Built-in flow templates (hello_world, etc.)
├── gift/                      # Gift system
│   ├── runner.py, planner.py, budget.py, shopper.py
│   ├── filter.py, calendar.py, video.py
├── models/                    # Core model layer
│   ├── assistant.py           # Assistant + AssistantManager
│   ├── conversation.py        # ConversationSession + DialogueManager + Dialogue
│   ├── transferer.py          # Cross-agent / cross-client / cross-model dispatch
│   ├── memorizer/             # Memory writer / reader / consolidator
│   ├── trainer/               # Training helpers
│   ├── router/                # Model routing
│   ├── clients/               # Tool clients (base, browser, multimodal, input, doc, daily, system, mini_model)
│   ├── log_pass.py            # Log processing pipeline
│   ├── RAG/                   # RAG components
│   │   ├── framework_docs.py  # Manager document index
│   │   ├── bridge_api_surface.py  # Bridge API catalog
│   │   ├── bridge_api_reflected.py # FastAPI reflection audit
│   │   └── chunk_store.py     # Chunk storage
├── observability/             # Observability
│   ├── audit.py               # Audit log
│   ├── agent_log.py           # Agent log
│   ├── logging.py             # Structured logging
│   └── status.py              # Status monitoring
├── pipeline/                  # Training / inference pipeline
│   ├── gpu_priority.py, soft_schema.py, multimodal_session.py
├── recipes/                   # Recipe system
│   ├── sandbox/               # Sandbox execution
│   ├── runtime.py             # Recipe runtime override
│   └── source_reader.py       # Source code reader
├── services/                  # Service layer
│   └── external_agents/       # External agent registration
├── skills/                    # Skill system
├── storage/                   # Storage layer
│   ├── db.py                  # SQLite WAL connection + migration runner
│   ├── files.py               # File storage
│   ├── locks.py               # Storage locks
│   ├── repos/                 # Data repositories (assistant_repo, skill_repo, todo_repo, ...)
│   └── migrations/            # Database migrations (v1–v50)
├── tools/                     # Tool system
│   ├── tool_dispatcher.py     # Tool name → callable table, instance registration
│   ├── security.py            # Risk levels + approval gate
│   ├── sensitive_detector.py  # Three-layer sensitive information detection
│   ├── turn_secrets.py        # Per-turn ciphertext replacement
│   └── ...                    # Other tool helpers
├── trainer/                   # Training context
└── utils/                     # Tool implementations
    ├── base_tools.py          # Core tools (read/write/exec/find/grep/download/compress/process/network)
    ├── browser_tools.py       # Chrome CDP automation
    ├── multimodal_tools.py    # VisionProcessor + operate()
    ├── memory_tools.py        # Node, DialogTree, Memorizer
    ├── memory_store.py        # Memory storage
    ├── daily_tools.py         # Daily tools
    ├── doc_tools.py           # Document tools
    ├── user_tools.py          # User tools
    ├── user_secret_tools.py   # User secret tools
    ├── phone_tools.py         # Phone tools
    ├── search_tools.py        # Search tools
    ├── search_sources_forger.py # Search source constructor
    ├── system_tools.py        # System tools
    ├── broker_tools.py        # Broker tools
    ├── registry_tools.py      # Registry tools
    ├── skill_watcher_tools.py # Skill watcher
    ├── framework_tools.py     # Framework docs + log tools (manager-only)
    ├── context_helpers.py     # ContextVar propagation helpers
    ├── json_parse.py          # Fault-tolerant JSON parsing
    ├── _explore_filter.py     # Exploration filter
    ├── autorun.py             # Auto-start on boot (Windows/macOS/Linux)
    ├── reminder_dispatch.py   # Reminder dispatch
    ├── video_adapters.py      # Video adapters
    ├── tool_source.py         # Tool source
    ├── monitor/               # Activity monitors
    └── daily_monitor/         # Daily monitors

4 · Key File Jump Table ​

4.1 Startup Chain ​

FileResponsibility
src/bridge/app.pyFastAPI mounting, CUDA pin, JIT model load, autorun, monitor rehydrate
src/bridge/run.pyhypercorn/uvicorn launcher
src/bridge/deps.pyDI container (AssistantManager, DialogueManager, CommHub, UsageTracker)
src/bridge/certs.pySelf-signed certificate generation
electron/electron/main.jsElectron main process; spawns Python bridge
electron/electron/python.jsBridge lifecycle (BRIDGE_PORT=18711, health probe, fallback port)

4.2 Core Models ​

FileResponsibility
src/models/assistant.pyAssistant + AssistantManager: agent lifecycle, reports, persona evolution
src/models/conversation.pyConversationSession + DialogueManager + Dialogue + RAG composition
src/models/transferer.pyCross-agent / cross-client / cross-model dispatch (6-priority resolver)
src/models/clients/base_client.pyToolClient base — tool loop, history pruning, schema normalization
src/models/memorizer/writer.pyMemoryWriter: memory writes + SECRET.json management
src/models/memorizer/reader.pyMemoryReader: memory reads + secrets recall
src/models/RAG/framework_docs.pyManager document index (render_framework_index)
src/models/RAG/bridge_api_surface.pyBridge API catalog injection

4.3 Tool System ​

FileResponsibility
src/tools/tool_dispatcher.pyTool name → callable table, 15 default instance registrations
src/tools/security.pyRisk levels (TOOL_RISK) + approval gate (@requires_approval) + skill-scope authorization
src/tools/sensitive_detector.pyThree-layer sensitive information detection (gitleaks + presidio + mini-LLM [disabled]) + commit pipeline
src/tools/turn_secrets.pyPer-turn ciphertext→plaintext replacement (ENC:: prefix)
src/utils/base_tools.pyCore tool implementations (read/write/exec/find/grep/download/compress/process/network)
src/utils/browser_tools.pyChrome CDP automation, shared-profile, browser_open exploration cards
src/utils/multimodal_tools.pyVisionProcessor (OCR, screenshot grid, keyframes), operate() loop
src/utils/memory_tools.pyNode, DialogTree, Memorizer
src/utils/framework_tools.pyFrameworkDocsTools + LogTools (manager-only)

4.4 Security & Encryption ​

FileResponsibility
src/base/crypto.pyHKDF-SHA256 + Fernet encryption (encrypt_value / decrypt_value)
src/base/bridge_token.pyBridge token generation (256-bit) + constant-time validation
src/base/auth/device.pyDevice fingerprint generation (macOS/Windows/Linux)
src/base/auth/manager.pyAuthManager singleton (workspace/auth.json)
src/base/auth/models.pyUserIdentity + AuthState data classes

4.5 Storage ​

FileResponsibility
src/storage/db.pySQLite WAL connection + migration runner; FAMILIARS_DB_PATH
src/storage/files.pyFile storage
src/storage/repos/Data repositories (assistant, skill, todo, rag_feedback, watch, cron, ...)

4.6 Broker ​

FileResponsibility
src/broker/hub.pyBroker layer root: identity + transport + match engine + rate limiter + per-broker store/ledger
src/broker/workshop/__init__.pyInstallable broker apps: rooms + threads + reputation + triggers

4.7 Flow ​

FileResponsibility
src/flow/engine.pyFlowEngine: owner-thread + per-role worker-thread concurrent execution
src/flow/resume.pyRehydrate from DB: pinned template + mutation replay + hash verification

4.8 Frontend ​

FileResponsibility
electron/renderer/src/components/Desktop.vueDesktop shell (default manager landing)
electron/renderer/src/components/ChatBubble.vueChat bubble rendering
electron/electron/main.jsElectron main process
electron/electron/python.jsBridge lifecycle

5 · workspace/ Runtime Data Layout ​

workspace/
├── familiars.db              # SQLite database (WAL mode)
├── SECRET.json               # Encrypted sensitive information keystore
├── .salt                     # Fernet encryption seed (32 random bytes)
├── .bridge_token             # Bridge API token (256-bit)
├── .bridge.crt / .bridge.key # Self-signed certificate + private key
├── .bridge.port              # Current bridge port (fallback record)
├── .bridge.pid               # Current bridge PID
├── .bridges.json             # Cross-process bridge registry
├── .paths_aliases.json       # Path drift alignment records
├── .inbox.jsonl              # Notification egress persistence log
├── auth.json                 # Wallet + device fingerprint (plaintext)
├── global_settings.json      # Global preferences
├── USER.md                   # User personal profile
├── IDENTITY.md               # Global identity description
├── AGENTS.md                 # Project-level agent rules
├── audit.log                 # Tool call / approval / usage audit
├── .bridge.log               # Bridge process log
├── reports/                  # Report templates
├── agents/                   # Agent profiles
│   └── agent_<id>/
│       ├── IDENTITY.md, USER.md, AGENTS.md, config.json
│       ├── dialogue_<n>/     # Dialogue history (with embeddings)
│       ├── logs/*.jsonl      # Daily event streams
│       ├── memory/           # scope×category memory
│       ├── reports/          # Daily/weekly/monthly/annual reports
│       └── skill_runs/       # Skill execution traces
├── skills/                   # Custom skills
│   └── <skill_id>/SKILL.md
├── manager/
│   ├── brokers/              # Installed brokers
│   ├── flows/                # Committed flow templates
│   ├── pipelines/            # Multi-agent pipelines
│   └── skill_workshop_runs/  # Skill workshop traces
├── _playwright/              # Chrome automation profile (with cookies)
├── monitor_debug/            # Monitor debug screenshots
├── operate/                  # operate() OmniParser output
├── _cache/rag/               # RAG embedding index
└── agent_recipes/            # Recipe external KB

6 · Database Migration List ​

SQLite migrations are in src/storage/migrations/, supporting both .sql and .py formats. The migration runner is in src/storage/db.py.

VersionFilenameContent
v1v1__init.sqlInitial tables
v2v2__cron_jobs.sqlCron jobs
v3v3__rag_feedback.sqlRAG feedback
v4v4__memory_category.sqlMemory categories
v5v5__schedules.sqlSchedules
v6v6__todos.sqlTodos
v7v7__cron_runs.sqlCron run records
v8v8__schedules_status.sqlSchedule status
v9v9__reminders.sqlReminders
v10v10__proactive_feedback.sqlProactive feedback
v11v11__node_origin.sqlNode origin
v12v12__watch_jobs.sqlWatch jobs
v13v13__recurrence.sqlRecurrence
v14v14__watch_jobs_metadata.sqlWatch job metadata
v15v15__agent_turn_counter.sqlAgent turn counter
v16v16__schedule_dedup_and_unique.pyPython migration: Schedule dedup + unique constraints
v17v17__cron_last_fired_and_feedback.sqlCron last-fired + feedback
v18v18__broker.sqlBroker layer core tables
v19v19__broker_workshop.sqlBroker workshop tables
v20v20__guild.sql + v20__broker_local_package_dir.pyGuild + broker local package directory
v21v21__broker_identity_assets.sql + v21__guild_task_type.pyBroker identity assets + guild task types
v22v22__broker_messages.sqlBroker messages
v23v23__broker_member_caps.sqlBroker member capabilities
v24v24__broker_approvals.sqlBroker approvals
v25v25__flow_core.pyPython migration: Flow core tables
v26v26__flow_trace_index.sqlFlow trace index
v27v27__guild_medal_images.sqlGuild medal images
v28v28__broker_author_crl.sqlBroker author CRL
v29v29__broker_trusted_authors.sqlBroker trusted authors
v30v30__broker_room_federation.sqlBroker room federation
v31v31__broker_thread_federation.sqlBroker thread federation
v32v32__broker_message_federation.sqlBroker message federation
v33v33__guild_task_federation.sqlGuild task federation
v34v34__guild_medal_federation.sqlGuild medal federation
v35v35__guild_ledger_federation.sqlGuild ledger federation
v36v36__broker_user_consents.sqlBroker user consents
v37v37__guild_scope_approvals.sqlGuild scope approvals
v38v38__guild_task_lifecycle.sqlGuild task lifecycle
v39v39__guild_merge_requests.sqlGuild merge requests
v40v40__task_edit_history.sqlTask edit history
v41v41__guild_modification_requests.sql + v41__message_reactions.pyGuild modification requests + message reactions
v42v42__guild_experience_reports.sql + v42__guild_modification_votes.sqlGuild experience reports + modification votes
v43v43__guild_task_recall_votes.sqlGuild task recall votes
v44v44__guild_scope_members.sqlGuild scope members
v45v45__task_message_channels.sqlTask message channels
v46v46__guild_task_tags.sqlGuild task tags

7 · Bridge Route Catalog ​

All route files are in src/bridge/routes/, mounted by src/bridge/app.py at import time. There are currently 63 route files:

Route FileMain Endpoints
chat.py/api/chat/stream (SSE conversation)
agents.py/api/agents (agent CRUD + list)
tree.pyDialogue tree operations
settings.pyGlobal settings
schedule.pySchedule management
todo.pyTodo management
cron.pyCron jobs
reminders.pyReminders
monitor.pyActivity monitors
skills.pySkill management
skill_forge.pySkill forge
skill_proposals.pySkill proposals
skill_workshop.pySkill workshop runs
tool_skills.pyTool skills
tools_catalog.pyTools catalog
tools_source.pyTool source
digital_human.pyDigital human
asr.pyASR speech recognition
phone_call.pyPhone calls
auth.pyAuthentication
user.pyUser
user_profile.pyUser profile
usage.pyUsage
feedback.pyFeedback
status.pyStatus
dev.pyDeveloper tools
draft.pyDrafts
quick_inputs.pyQuick inputs
quick_ask.pyQuick ask
reports.pyReports
gift.pyGifts
cg.pyCG
agent_workshop.pyAgent workshop
agent_recipes.pyAgent recipes
agent_assets.pyAgent assets
agent_activity.pyAgent activity
broker.pyBroker core
broker_workshop.pyBroker workshop
broker_app.pyBroker app
broker_assets.pyBroker assets
broker_dev.pyBroker dev
marketplace_artifacts.pyMarketplace artifacts
flow_templates.pyFlow template CRUD + custom field renderers
flows.pyFlow instance lifecycle (list/get/trace/cancel)
flow_dev.pyFlow dev
recipe_dev.pyRecipe dev
feishu.pyFeishu integration
background.pyBackground tasks
desktop_notify.pyDesktop notifications
broadcast.pyBroadcast
memory_status.pyMemory status
memory.pyMemory operations
onboarding.pyOnboarding wizard
vram.pyVRAM management
learn.pyLearning
responses.pyResponses
setup.pySetup wizard
demo.pyPublic demo sandbox
guild.pyGuild (Ventaris)
xun_da.pyXunDa (wayfinding)
_relay_dev_common.pyRelay dev shared utilities

8 · Environment Variable Reference ​

8.1 Required (.env) ​

VariableDescriptionDefault
BASE_URLOpenAI-compatible API base URL(required)
API_KEYLLM provider API key(required)
DEFAULT_MODELDefault chat model name(required)
MANAGER_MODELModel for manager executive summariesgpt-4o

8.2 Models & Embeddings ​

VariableDescriptionDefault
MINI_MODELLightweight local model nameQwen2.5-1.5B
FAST_MODELLow-latency cloud model (draft/classify). Empty = fall back to DEFAULT_MODEL""
EMBEDDING_MODELEmbedding modelBAAI/bge-m3
RERANKER_MODELReranker modelBAAI/bge-reranker-v2-m3
MEMORIZE_MODELMemory writer model. Unset = DEFAULT_MODEL""
CONSOLIDATE_MODELMemory consolidator model. Unset = MANAGER_MODEL""
MEMORY_TEACHER_BASE_URLMemory teacher model URL""
MEMORY_TEACHER_KEYMemory teacher API key""
DATAGEN_BASE_URLData generation model URL""
DATAGEN_API_KEYData generation API key""

8.3 Infrastructure Tuning ​

VariableDescriptionDefault
TIMEOUTHTTP timeout (seconds)300
MAX_TURNSMaximum tool-loop turns50
DIALOGUE_EXPIRE_TIMEDialogue expiry time (seconds)3600
SLIDE_WINDOW_SIZEDialogue history sliding window5
TOP_KRAG retrieval top-K5
WORKSPACE_ROUTEWorkspace root directorycwd
PORTBridge listen port18711

8.4 RAG Tuning ​

VariableDescriptionDefault
RAG_DENSE_TOPKDense recall candidate count20
RAG_CHUNK_SIZETarget chunk size (characters)800
RAG_RERANK_MIN_SCORERerank minimum score (0 = keep all)0.0
RAG_REFINER_MAX_RETRIESRefiner JSON parse retries3
RAG_FILE_WEIGHTFile-level rerank weight α0.4
RAG_CHUNK_WEIGHTChunk-level rerank weight β0.6
RAG_RRF_KReciprocal rank fusion constant60
RAG_FEEDBACK_WEIGHTHistorical success rate weight0.0
RAG_ANN_MIN_NMinimum candidates to build HNSW ANN index64
RAG_MULTIQUERY_NMulti-query variant count1

8.5 Circuit Breaker / Concurrency ​

VariableDescriptionDefault
CB_FAILURE_THRESHOLDCircuit breaker open threshold5
CB_RECOVERY_SECONDSCircuit breaker recovery time (seconds)30.0
LLM_MAX_RETRIESMaximum retry count3
LLM_RETRY_BASE_DELAYInitial backoff delay (seconds)1.0
LLM_RETRY_MAX_DELAYMaximum backoff delay (seconds)30.0
LLM_MAX_CONCURRENT_PER_URLMax concurrent LLM calls per URL8
LLM_MIN_CONCURRENT_PER_URLMin concurrent per URL1
LLM_QUEUE_WAIT_SMaximum queue wait seconds120
LLM_AIMD_GROW_AFTERAIMD growth interval (consecutive successes)20
LLM_AIMD_SHRINK_FACTORAIMD shrink factor0.5
LLM_GATE_DISABLEDDisable concurrency gatefalse
RESPONSES_API_ENABLEDForce Responses API on/off"" (auto)

8.6 Security & Approval ​

VariableDescriptionDefault
FAMILIARS_APPROVAL_DISABLEDGlobally disable approval gate""
FAMILIARS_DB_PATHSQLite database pathworkspace/familiars.db
FAMILIARS_HTTP_INSECUREFall back to plain HTTP + uvicorn""
FAMILIARS_DIAG_ACTOR_DRIFTApproval misroute stack traces1
FAMILIARS_TIER4_MAX_MBGPU Tier4 max MBPlatform-dependent
FAMILIARS_FRAMEWORK_DOCS_TOPKFramework docs retrieval top-KPlatform-dependent

8.7 Feature Toggles ​

VariableDescriptionDefault
MEMORY_WRITER_DISABLEDDisable memory writing""
WECHAT_TRIGGER_ENABLEDEnable WeChat listener0
QQ_TRIGGER_ENABLEDEnable QQ listener0
SCAN_PRESIDIO_DISABLEDDisable Presidio scanning""
DAILY_MONITOR_DISABLEDDisable daily monitor modulefalse
GITLEAKS_BINgitleaks binary path""

8.8 Broker / Federation ​

VariableDescriptionDefault
FAMILIARS_BROKER_ADVERTISE_URLThis broker's public/LAN base URL""
FAMILIARS_BROKER_BINDBridge HTTP bind address"" (127.0.0.1)
FAMILIARS_BROKER_DIRECT_TIMEOUTDirect peer federation timeout (seconds)10.0

8.9 Daily Monitoring ​

VariableDescriptionDefault
DAILY_MONITOR_MAX_TASKSMax concurrent daily monitors per agent8
DAILY_MONITOR_EMBEDDING_THRESHOLDEmbedding similarity threshold0.54
DAILY_MONITOR_KEYWORD_ENABLEDEnable keyword fast-pathtrue
DAILY_MONITOR_MINI_CONFIRM_ENABLEDEnable mini-model confirmationtrue
DAILY_MONITOR_CLIENT_TIMEOUTClient dispatch timeout (seconds)60.0

8.10 Updates ​

VariableDescriptionDefault
UPDATE_URLOTA update feed base URL""
UPDATE_CHECK_INTERVAL_HOURSAuto-update check interval (hours)24

9 · User Settings (DialogConfig / AssistantConfig) ​

FieldTypeDefaultDescription
security_levelstr"medium"Approval threshold: low/medium/high
intense_modebooltrueAuto mode (skip approvals until success)
turbo_modeboolfalseSkip approvals but keep plan verification
need_figurebooltrueNeed digital human image
need_audiobooltrueNeed voice
need_videobooltrueNeed video call
need_reportbooltrueNeed reports
need_initiativebooltrueProactive conversation
verify_planboolfalseVerify plan before execution
skill_auto_applyboolfalseAuto-apply skill proposals
colorstr"blue"Theme color

10 · Key Runtime Flows ​

  1. Conversation: renderer → /api/chat/stream (SSE) → ConversationSession tool loop (≤MAX_TURNS) → model → tools → memory → reply
  2. Memory: DialogueManager builds RAG history each turn (α·cos + e^{−β·Δt} + γ·tree_distance); persona/identity writes to USER.md/IDENTITY.md
  3. Proactive decision: Decider small model decides "should I proactively do something"
  4. Broker: Transaction chain + installable apps (manifest+UI+plugins); marketplace runs through deploy/relay
  5. Flow: FlowEngine owner-thread + per-role worker-thread concurrent execution; resume.py rehydrates from DB
  6. Recipe: compile → dry-run → execute (in sandbox) → verify → register

11 · Inclusion & Omission Policy ​

  • The repository treats documentation (ARCHITECTURE/OPERATION/SECURITY/REPOSITORY/CLAUDE/CLI/BROKER_DEVELOPMENT.md) as the manager's built-in knowledge base (indexed by framework_docs.py:render_framework_index + read via framework_tools.py)
  • Training artifacts / large model weights are not included in git (models/, training/, dataset/ are gitignored)
  • Scratch agent directories (demon, angel, etc.) go under runs/; workspace/agents/ is scanned by the bridge at startup

This file is based on the actual repository structure and CLAUDE.md / ARCHITECTURE.md / SECURITY.md. For detailed architecture, see ARCHITECTURE.md.

Familiars · 多 Agent AI 桌面应用