Skip to main content

aicf-core

Python CI Tests Local First Modalities License

The floor that makes an agent unkillable. Specialized for companion systems — online for the long haul, responding the moment you speak.

[English] | 简体中文

pip install aicf-core

What is aicf-core

aicf-core is agent infrastructure specialized for one job: companion systems that stay online for the long haul and respond the moment you speak. A system like that cannot go down with the machine or drop a sentence mid-conversation — so the floor under it must be unkillable and always awake.

Most agent frameworks assume the process stays alive. aicf-core assumes the opposite: the process gets killed — a crash, an OOM, a deploy restart, a stray kill -9 — and the task still finishes. State lives in a journal, effectful calls are never replayed, and another instance can take over.

Around that runtime sits everything an agent system needs before it can be trusted: a policy gate and human approval in front of every tool call, an audit trail the application cannot delete, layered memory, multi-agent collaboration, local speech and vision, and an evaluation loop that decides what may be released.

AICF = Agent Infrastructure Cybernetics Framework · Apache-2.0. It is a library, not an app — applications grow on top of it, in their own repositories (the web console is aicf-ui).

Three guarantees

Run one long task safely, idempotently, and measurably.

The guarantee How to verify
Safe Every tool call passes a policy gate; anything with side effects waits for a human; anything undecided is denied. aicf tool exec proc.run --args '{"command":"rm -rf /"}' → refused
Unkillable Kill it mid-run and it resumes where it stopped — without repeating side effects. Fault injection with a real kill -9: 46/46 recovered. pytest tests/fault/
Measurable Every run produces a trace; every change is scored against a dataset and can be blocked from release by a four-gate report. aicf eval → aicf gate

One honest caveat: tools run with the operator's privileges — path scope, ulimits and an environment whitelist are checked before a process starts, but there is no OS-level sandbox yet. docs/security.md states exactly what is and is not protected.

Ninety seconds

# scaffold a project: entry points wired, no business logic
aicf init demo && cd demo

Every step below runs offline — no API key — and the walkthrough ends green.

# 1. Try to run a shell. It has side effects — so it waits for a human.
aicf tool exec proc.run --args '{"command":"rm -rf /"}' --policy strict
#    → refused

# 2. Run a whole dataset offline: one turn, one trace per case.
aicf run --dataset offline --trace-dir traces/

# 3. Score it. A regression, a cost overrun or a safety violation stops the release.
aicf eval --dataset offline --traces traces/ --out run.json
aicf gate --run run.json --out gate.json

An agent in five lines:

from aicf.harness import create_agent, tool

@tool
def add(a: int, b: int) -> int:
    """Add two numbers."""
    return a + b

agent = create_agent(
    model="deepseek-chat",
    base_url="https://api.deepseek.com/v1",
    api_key="sk-...",                 # or just export OPENAI_API_KEY
    tools=[add],
)
print(agent.run("what is 17 + 25?"))

Any OpenAI-compatible endpoint works. For a local model, point base_url at your llama-server / LM Studio.

What is inside

your app / skills
   ▲
aicf/harness    turn loop · tools · context · memory · sessions · multi-agent
   ▲
aicf/infra      model routing · resource pool · storage · gateway · auth · policy

Dependencies point downward only: harness never imports an application, infra never imports business semantics. The module map lives in docs/architecture.md.

Also in the box, one line each:

  • Multi-agent — roles, delegation, mailbox, blackboard; every delegation is on the record
  • Voice & vision — local ASR / TTS / VLM in one scheduled pool; perception mode (silence means listening), an idle heartbeat that speaks first, a resident profile that keeps models warm
  • Skills — out-of-tree packages, validated by the framework before an agent ever sees them
  • Learning loop — trajectory → dataset → judge → promotion, gated by the same four gates

Install

pip install aicf-core

aicf --version must print 1.0.0 or newer. Releases before 1.0.0 shipped no aicf command; they are yanked on PyPI, but some mirrors still serve them — install from official PyPI: pip install -U --index-url https://pypi.org/simple aicf-core

Optional extras, installed only when you need them:

pip install "aicf-core[personality]"   # personality dynamics
pip install "aicf-core[decisions]"     # System-1 decision head
pip install "aicf-core[learning]"      # trajectory → dataset → judge → promotion
pip install "aicf-core[finetune]"      # local SFT (pulls torch)
pip install "aicf-core[mcp]"           # external MCP tool servers
pip install "aicf-core[all]"           # everything

Documentation

I want to… Read this
Get from zero to a running agent docs/getting-started.md
The module map and dependency rules docs/architecture.md
The security model (deny-by-default, approval, sandbox tiers, audit) docs/security.md
The managed runtime (journal, idempotency, recovery) docs/runtime.md
The evaluation loop (datasets, gates, regression) docs/evaluation.md
The core as a library docs/sdk_guide.md
The skill-package spec docs/skill-spec.md
Reproducible numbers benchmarks/README.md
Roadmap and workstream status docs/roadmap_1.0.0-rc0.md
Everything else docs/

Core docs also have English translations in docs/en/; the Chinese originals remain authoritative.

Community

License

Apache-2.0


Site: https://ccjjfdyqlhy.github.io/aicf-core/

Metadata

Release files for aicf-core 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aicf-core 1.0.1
File Size Uploaded Provenance Actions
aicf_core-1.0.1.tar.gz 925.7 kB With provenance Details for aicf_core-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aicf-core 1.0.1
File Interpreter ABI Platform Actions
aicf_core-1.0.1-py3-none-any.whl Python 3 none any Details for aicf_core-1.0.1-py3-none-any.whl

Total release size: 1.8 MB

Release files / aicf_core-1.0.1.tar.gz

Download URL aicf_core-1.0.1.tar.gz
Size 925.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7cba0dd81a1e4265d1f1eae4306691db4260609b1021bf85b1fff245d353b14a
BLAKE2b-256 checksum
How to use checksums
e36707a8972e8530eee7bbed4da92db9bc3876fbf115628404aa5922597a49f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / aicf_core-1.0.1-py3-none-any.whl

Download URL aicf_core-1.0.1-py3-none-any.whl
Size 871.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
48e898b0f1d02aac56bec0975b002c73f74e8a4413ee7fe031c792af0fa2f65c
BLAKE2b-256 checksum
How to use checksums
f44062a64582b5eac79775aa23878048bd95d32721ddb2e4fac1f061b1e45849
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Security for aicf-core 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for aicf_core-1.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page