Skip to main content

AgentFoundry

AgentFoundry is a modular, extensible AI library designed to support the construction and orchestration of autonomous agents across a variety of complex tasks. The system is built in Python and leverages modern AI tooling to integrate large language models (LLMs), vector stores, rule-based decision logic, and dynamic tool discovery in secure and performance-conscious environments.

Features

  • Modular agent architecture with support for specialization (e.g., memory agents, reactive agents, compliance agents)
  • Cython-compiled backend for performance and IP protection
  • Integration with popular frameworks such as LangChain, LangGraph, Milvus, and OpenAI
  • Workflow lifecycle management with delivery waves (pause/resume/cancel/retry/replan)
  • Support for licensed or embedded deployments via license file verification or compiled-only distribution
  • Configurable with runtime enforcement of execution licenses (PQC-signed, optionally machine-bound)
  • Fail-fast initialization with eager backend verification (LLM ping, vector store connectivity, KGraph health)
  • Comprehensive structured logging with INFO-level startup diagnostics and DEBUG-level per-request tracing

Use Cases

AgentFoundry is designed to be embedded as a core intelligence engine in:

  • Secure enterprise AI platforms
  • Compliance monitoring and rule-based alerting systems
  • Applications with dynamic tool execution
  • SaaS and on-premise environments

Requirements

  • Python 3.11+
  • Cython
  • Compatible dependencies (see requirements.txt)

Quick Start

from agentfoundry.utils.agent_config import AgentConfig
from agentfoundry.registry.tool_registry import ToolRegistry
from agentfoundry.agents.orchestrator import Orchestrator

config = AgentConfig.from_dict({
    "AF_LLM_PROVIDER": "openai",
    "AF_OPENAI_API_KEY": "sk-...",
    "AF_OPENAI_MODEL": "gpt-5.4",
    "AF_VECTORSTORE_PROVIDER": "milvus",
    "AF_MILVUS_URI": "http://localhost:19530",
})

registry = ToolRegistry(config=config)
registry.load_tools_from_directory()
orchestrator = Orchestrator(registry, config=config)

# Run a task
result = orchestrator.run_task("Summarize recent activity", config={
    "configurable": {"user_id": "u1", "thread_id": "t1", "org_id": "myorg"}
})

Configuration

AgentFoundry supports two configuration paths. The recommended approach is explicit configuration with AgentConfig.

from agentfoundry.utils.agent_config import AgentConfig

config = AgentConfig.from_dict({
    "AF_LLM_PROVIDER": "openai",
    "AF_OPENAI_API_KEY": "sk-...",
    "AF_OPENAI_MODEL": "gpt-5.4",
    "AF_VECTORSTORE_PROVIDER": "milvus",
    "AF_MILVUS_URI": "http://localhost:19530",
})

Legacy config (backward compatibility)

Set a config file explicitly and/or use environment variables:

export AGENTFOUNDRY_CONFIG_FILE="$HOME/.config/agentfoundry/agentfoundry.toml"
export OPENAI_API_KEY="sk-..."
from agentfoundry.utils.agent_config import AgentConfig
config = AgentConfig.from_legacy_config()

See docs/Configuration_Guide.md for full key reference and precedence rules.

Provider notes

  • LLM provider is selected by LLM_PROVIDER (openai, ollama, grok, gemini). OpenAI requires OPENAI_API_KEY when selected.
  • Vector store provider is selected by VECTORSTORE_PROVIDER (milvus, faiss).
    • Milvus: set MILVUS_URI or MILVUS_HOST + MILVUS_PORT.
    • FAISS: requires an existing index at FAISS_INDEX_PATH.
  • ThreadMemory uses OpenAI embeddings by default but falls back to deterministic hash embeddings if AF_DISABLE_OPENAI_EMBEDDINGS=1 or no API key is present.
  • The DuckDB KGraph backend requires duckdb and its ADBC drivers.

Workflow Lifecycle

AgentFoundry includes a workflow engine that organises execution plans into dependency-ordered delivery waves. See docs/Workflow_Lifecycle_Guide.md for full documentation.

from agentfoundry.agents.workflow import WorkflowManager, build_waves

manager = WorkflowManager(task_executor=my_executor)
wf = manager.create_workflow(plan, config=config)
manager.run(wf.workflow_id)        # execute all waves
manager.pause(wf.workflow_id)      # pause between waves
manager.resume(wf.workflow_id)     # continue from pause
manager.retry(wf.workflow_id)      # retry failed tasks
manager.cancel(wf.workflow_id)     # cancel and skip remaining
manager.replan(wf.workflow_id)     # regenerate plan from current state

Fail-Fast Initialization

By default, the Orchestrator verifies all backends (LLM, vector store, knowledge graph) at startup. If any backend is unreachable, a FatalInitializationError is raised. This exception inherits from BaseException (not Exception), so it escapes generic except Exception handlers — ensuring broken deployments are caught immediately.

To allow degraded startup (e.g. for development without all backends available):

config = AgentConfig.from_dict({
    "AF_LLM_PROVIDER": "openai",
    "AF_OPENAI_API_KEY": "sk-...",
    "AF_FAIL_FAST": "false",  # warn on backend failures instead of crashing
})

To catch the error explicitly:

from agentfoundry.utils.exceptions import FatalInitializationError

try:
    orchestrator = Orchestrator(registry, config=config)
except FatalInitializationError as exc:
    logger.critical("Backends unavailable: %s", exc)

See docs/Configuration_Guide.md for the full FAIL_FAST reference.

Logging & Debugging

AgentFoundry uses standard Python logging throughout. Every module uses logging.getLogger(__name__) for hierarchical logger naming.

Logging strategy

  • INFO level — Startup and initialization events: backend connections, LLM ping results, config loading, tool registration summaries, and warm-up status.
  • DEBUG level — Per-request operations: similarity searches, cache hits/misses, tool calls, LangGraph invocations, timing details.
  • Timing measurements — Critical operations (LLM invoke, vector store queries, architect planning) are timed and logged with durations in milliseconds.

Controlling log level

config = AgentConfig.from_dict({
    "AF_LOG_LEVEL": "DEBUG",
})

Or configure logging directly:

from agentfoundry.utils.logger import setup_logging
setup_logging(level="INFO", logfile="agentfoundry.log")

Notes

  • ThreadMemory falls back to hash embeddings if OpenAI embeddings are unavailable.
  • FAISS provider raises if FAISS_INDEX_PATH does not exist; initialize with your ingestion tooling.

Author

Christopher Steel AI Practice Lead, AlphaSix Corporation Founder, Syntheticore, Inc. Email: csteel@syntheticore.com

© Syntheticore, Inc. All rights reserved.

This software is proprietary and confidential. Any use, reproduction, modification, distribution, or commercial deployment of AgentFoundry or any part thereof requires explicit written authorization from Syntheticore, Inc.

Unauthorized use is strictly prohibited and may result in legal action.


For licensing inquiries or permission to use this software, please contact: csteel@syntheticore.com

Metadata

Release files for agentfoundry 1.5.89

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

Built distributions (wheels)

Table of built distributions (wheels) for agentfoundry 1.5.89
File Interpreter ABI Platform
agentfoundry-1.5.89-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
agentfoundry-1.5.89-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ ARM64, Linux glibc 2.28+ ARM64 Details

Total release size: 15.3 MB

Release files / agentfoundry-1.5.89-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL agentfoundry-1.5.89-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 7.7 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
ae578f85325449b9c7d1aefccc7ead8b8cabd818e8da9b019a9164c4a56ba58c
BLAKE2b-256 checksum
How to use checksums
331265151d4a93487f8bb19be88f0577a5f436088e6cb2eeadeb3a419ac3c3cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / agentfoundry-1.5.89-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl

Download URL agentfoundry-1.5.89-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Size 7.6 MB
Tags CPython 3.12 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
f3a4c73a4e6814e2e952b14aa367e51f1ba755e9760ca59ac462ae4125734914
BLAKE2b-256 checksum
How to use checksums
401c76ebe91afc16f977fc6133818f59f25a82be723b1f2a77514489d509541e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release history Release notifications | RSS feed

1.5.94

2 release files

1.5.93

2 release files

1.5.92

2 release files

1.5.91

2 release files

1.5.90

2 release files

This release

1.5.89 This release

2 release files

1.5.87

1 release file

1.5.84

1 release file

1.5.83

1 release file

1.5.81

1 release file

1.5.80

1 release file

1.5.79

1 release file

1.5.78

1 release file

1.5.76

1 release file

1.5.74

1 release file

1.5.73

1 release file

1.5.70

1 release file

1.5.69

1 release file

1.5.68

1 release file

1.5.67

1 release file

1.5.65

1 release file

1.5.64

1 release file

1.5.63

1 release file

1.5.62

1 release file

1.5.61

1 release file

1.5.60

1 release file

1.5.59

1 release file

1.5.58

1 release file

1.5.57

1 release file

1.5.56

1 release file

1.5.55

1 release file

1.5.54

1 release file

1.5.51

1 release file

1.5.50

1 release file

1.5.49

1 release file

1.5.48

2 release files

1.5.47

1 release file

1.5.46

1 release file

1.5.45

1 release file

1.5.44

1 release file

1.5.43

1 release file

1.5.42

1 release file

1.5.41

1 release file

1.5.40

1 release file

1.5.38

1 release file

1.5.36

1 release file

1.5.32

1 release file

1.5.30

1 release file

1.5.28

1 release file

1.5.26

1 release file

1.5.24

1 release file

1.5.23

1 release file

1.5.21

1 release file

1.5.20

1 release file

1.5.18

1 release file

1.5.16

1 release file

1.5.14

1 release file

1.5.9

1 release file

1.5.7

1 release file

1.5.6

1 release file

1.5.5

1 release file

1.5.3

1 release file

1.5.2

1 release file

1.4.69

1 release file

1.4.68

1 release file

1.4.66

1 release file

1.4.64

1 release file

1.4.61

1 release file

1.4.59

1 release file

1.4.58

1 release file

1.4.56

1 release file

1.4.52

1 release file

1.4.51

1 release file

1.4.49

1 release file

1.4.47

1 release file

1.4.45

1 release file

1.4.42

1 release file

1.4.40

1 release file

1.4.38

1 release file

1.4.36

1 release file

1.4.34

1 release file

1.4.32

1 release file

1.4.30

1 release file

1.4.29

2 release files

1.4.28

2 release files

1.4.27

2 release files

1.4.26

3 release files

1.4.25

1 release file

1.4.24

1 release file

1.4.23

1 release file

1.4.22

1 release file

1.4.21

1 release file

1.4.20

1 release file

1.4.19

1 release file

1.4.18

1 release file

1.4.17

1 release file

1.4.16

1 release file

1.4.15

1 release file

1.4.12

1 release file

1.4.11

1 release file

1.4.10

1 release file

1.4.9

1 release file

1.4.8

1 release file

1.4.7

1 release file

1.4.6

1 release file

1.4.3

1 release file

1.4.2

1 release file

1.3.81

1 release file

1.3.68

1 release file

1.3.66

1 release file

1.3.63

1 release file

1.3.62

1 release file

1.3.61

1 release file

1.3.60

1 release file

1.3.56

1 release file

1.3.55

1 release file

1.3.54

1 release file

1.3.48

1 release file

1.3.47

1 release file

1.3.44

1 release file

1.3.35

1 release file

1.3.32

1 release file

1.3.31

1 release file

1.3.30

1 release file

1.3.29

1 release file

1.3.28

1 release file

1.3.27

1 release file

1.3.25

1 release file

1.3.24

1 release file

1.3.23

1 release file

1.3.22

1 release file

1.3.21

1 release file

1.3.20

1 release file

1.3.18

1 release file

1.3.17

1 release file

1.3.15

2 release files

1.3.13

1 release file

1.3.11

1 release file

1.3.10

1 release file

1.3.9

1 release file

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