Skip to content
lzbgtPublic

About

Production-oriented agentic platform with architecture review support

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Agent-C

A portable agent core, durable process execution and a lean workspace for autonomous work.

Documentation index — start here for current contracts, deployment guides and recorded evidence. For the local 4B setup, use the AI Model runbook and Agent C web integration.

Agent-C serves three connected uses:

Use Current foundation
Embedded agent core Portable C sessions, bounded tool loops, streaming, compaction, completion/cancellation hooks and embedded wire/authentication helpers. Host services stay outside the core.
Customizable process pipelines Versioned SOP stages/actions compile into a durable workflow DAG. Retries, evidence, scheduling and guarded HTTP effects support office, industrial and other defined processes.
Autonomous agents Durable requirements, dependencies and scoped human-action blockers drive continued work. The CLI, daemon and optional broker share execution capabilities.

Authorized work runs autonomously by default, without routine permission prompts. A genuine human dependency identifies the required action and affected requirements; unrelated work remains runnable. Explicit stops, resource limits, access controls and SOP business decisions remain effective.

This is a rolling project. We prefer coherent refactoring and fresh deployments over compatibility layers and migrations. Current snapshot, architecture and primary-source research distinguish implemented behavior from the remaining work.

A workspace built around the answer

Chat shows your messages and the agent's replies naturally, once, in chronological order. Files, notes and interactive results remain useful outputs. Tool outputs makes captured results available during a run without waiting for an assistant transcription. System context, detailed tool records, timestamps, traces and execution settings are grouped under closed Activity & details.

Presentations keep their keyboard events and animation clocks local; typing in the composer leaves them running.

Messages have one renderer: expanding Activity & details never repeats the chat. Tool pages lead with saved knowledge, summaries, voice calls and run outputs; technical evidence stays closed.

The composer focuses on Attach and Send. Settings leads with model, capabilities and conversation; technical controls and conversation management are collapsed by default. Desktop, phone and tablet layouts share these defaults. UI design records the attention hierarchy and verification contract.

Workflows has separate Runs, Create workflow and Schedules sections. Its SOP templates define ordered stages and sequential or parallel actions, including explicit durable review decisions and external JSON signal waits that release workers while waiting. The saved SOP library persists immutable versions and loads exact hash-pinned references without starting a run; JSON and graph authoring remain available. SOP guide

What is implemented

  • Portable core: C tool execution with bounded budgets and cancellation; hosts can continue a premature final response within the original limits.

  • Autonomous work state: a SQLite requirement/blocker ledger shared by work_state and agent work, with dependency validation, revision checks and evidence-gated transitions.

  • Durable workflows: immutable saved SOP versions, hash-pinned run snapshots, SOP compilation, task recovery, scheduling, dataflow and inspectable evidence.

  • Deterministic host actions: workflow/SOP tools run under existing policy with durable intent and saved-result replay. Interrupted effects are not blindly repeated; independent work continues. Host action contract

  • Conditional process actions: optional actions compare a bounded prior result without expressions or coercion. Non-matches have explicit non-execution receipts; missing/wrong-typed results fail closed. Guided authoring and executed/skipped progress are included. Condition contract

  • External process input: signal waits accept one authenticated, bounded JSON payload. Optional early-input slots retain it from submission without bypassing dependencies or conditions; expiry begins at activation. Immutable receipts, restart/stop safety and honest buffered/unused progress are included. Signal contract

  • HTTP effects: stable effect identity, intent/receipt journaling and reconciliation for guarded writes. Independent branches continue when another branch needs recovery. Effect contract

  • Device dispatch: immutable operation/node identity and transactional assignment, capacity and outbox publication prevent retry-driven command duplication. Uncertain outcomes expose a scoped human action while independent work continues. Device contract

  • Workflow budgets: per-attempt transactional grants, atomic settlement/refunds and conservative crash charges prevent duplicate capacity admission. Observed token/time overages remain explicit. Budget contract

  • CLI harness: exec, stdin, resume, sessions, explicit work/session directories, versioned JSONL events and successful final-message files. Coalesced streams drain without transport-boundary truncation. CLI

  • Host platform: native daemon APIs/SSE, revision-checked memory with durable promotion provenance, revision-checked source retirement, explicit archive expiry, cache invalidation, provenance-checked summaries and scoped current/historical evidence retrieval, artifacts, policy/limits, diagnostic tools and optional broker routing, teams and event replay.

  • Realtime voice: Aliyun Omni streams microphone audio, spoken replies and shared images through the authenticated gateway. Captions stay concise and provider keys stay on the server. Voice

  • Authenticated deployment: an Arch-hosted gateway serves the UI and protects the private daemon using shared Hubstack OAuth, server-held credentials and verified administrator identities.

The optional host retrieval research command adds bounded reranking and one source-grounded expansion with a pluggable scorer. It preserves lexical defaults; quality evaluation and production promotion are separate gates.

These capabilities do not establish distributed exactly-once execution, arbitrary-tool effect safety, broker-authoritative requirements, complete SOP decisions/compensation or hardware qualification. Those boundaries and delivery priorities are explicit in the snapshot and roadmap.

Build and run

Install the CMake/C/C++ and host dependencies listed in Operations, then build an assertion-enabled development snapshot:

cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug \
  -DAGENT_BUILD_HOST=ON -DAGENTD_ENABLE_HTTP=ON
cmake --build build --target agent agentd -j 4

Configure provider credentials on the host using the CLI guide. Keep provider keys and service credentials out of browser configuration and committed files.

./build/agent exec "Inspect this project and implement the requested change"
printf '%s' 'Summarize this build result' | ./build/agent exec - --no-session
./build/agent exec --json -o final.txt "Verify the completed work"
./build/agent sessions
./build/agent resume <session-id>
./build/agent work

--json emits agentd.cli.event.v1; -o publishes the exact final text only after successful execution and session saving. Machine-output protocol

For WebUI development:

cd ui
npm ci
npm run dev

Connection and production build details are in WebUI. Tool extensions are documented in Tools.

Signed original-device receipts can recover an uncertain workflow without another device command. The API and Check device receipt control preserve cancellation, deadlines and completed independent work. Device receipt contract. Source availability is separate from installation and live qualification; see the source/deployment record.

Reproduce the checked snapshot

The full verifier uses Debug native builds, local model stubs and mocked browser APIs. It does not need production provider keys:

cd ui
npm ci
npx playwright install chromium
cd ..
tools/verify_current_snapshot.sh

The canonical lane covers native/CLI/API contracts, Go broker/gateway packages, browser workflows, generated OpenAPI types and the production UI build. It includes chat submission recovery, accepted-job preservation across preference sync and reload, durable job admission/cancellation, remote workflow admission/recovery, bounded session pages and CLI snapshot preservation. Browser cases also cover greeting clarity, streaming handoff, repeated identical turns, IME-safe sends, hidden metadata, subject-oriented settings and responsive workflow tools. Dated results and qualification limits are recorded in the current snapshot.

For the embedded-safe build:

tools/verify_current_snapshot.sh --core-only

Set AGENT_E2E_BROWSER_EXECUTABLE for an existing supported Chromium and AGENT_E2E_UI_PORT for an unused test port. Physical MCU and phone keyboard qualification remain separate from host/browser checks. Broader verification and Docker development lanes are documented in Operations.

Deployment

The production reference topology uses agent.hubstack.cn with shared Hubstack login: Arch hosts execution, UI and its dedicated database; the VPS supplies HTTPS ingress and the existing identity service. The production daemon, gateway and PostgreSQL container remain stopped under the owner hold. Source integration does not restart them or update installed binaries.

The on-demand local 4B profile uses separate loopback processes and state. Arch deployment retains production configuration, authorization, installation and qualification procedures; Deployment covers other supported paths. The general Docker/Keycloak stack remains a verification option.

Source map

Area Source / documentation
Portable C library core/ · Embedded API
Native executor and CLI cli/ · CLI · Autonomous work
Daemon and workflow engine daemon/ · Daemon · SOPs
Broker and authenticated gateway broker/ · Arch deployment
Responsive workspace ui/ · WebUI · UI design
Reproducible checks and deployment tools/ · Operations

Embedded example and support

The existing ESP32 voice-agent demonstration illustrates an integration; it is not board-level qualification evidence for every current feature.

Support Agent-C.

About

Production-oriented agentic platform with architecture review support

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages