How nvidia/agentiq works
Main Components
• Plugins and Extensions: The “packages” directory holds provider-specific plugins (e.g., agentiq_langchain, agentiq_llama_index, agentiq_mem0ai, agentiq_semantic_kernel, etc.). These extend the core capabilities by providing integrations with different frameworks and tools.
• Evaluation, Profiling, and Observability: Within the “src/aiq/eval”, “src/aiq/profiler”, and “src/aiq/observability” directories you have dedicated code for profiling workflows, evaluating results, and monitoring operations (including OpenTelemetry integration).
• Front-End and API Interfaces: The “src/aiq/front_ends” contain the FastAPI server, console, and other interfaces. This layer exposes the system for CLI commands or web-based interactions.
• Data Models and Registry Handlers: Directories like “src/aiq/data_models” and “src/aiq/registry_handlers” encapsulate data definitions and interactions with external package registries (both local and remote, e.g., PyPI or REST endpoints).
Component Relationships and Interactions
• User Interaction Layer: Start with the UI or CLI. Users interact through the CLI (the “src/aiq/cli” module) or via the FastAPI front-end provided in “src/aiq/front_ends/fastapi”, which accepts workflow configurations and inputs.
• Workflow Orchestration: The CLI commands parse configuration files (like the workflow.yaml shown in the README) and trigger workflows. The “builder” components are responsible for constructing and coordinating the execution of agent workflows.
• Evaluation and Observability: The evaluator and profiler components monitor the performance of each workflow step (tracking token usage, timing, etc.) and report to external observability tools (using OpenTelemetry support).
• Repository and Plugin Management: The registry handlers manage the registration, discovery, and publication of workflows, agents, and plugins. This is how the system self-updates or shares components.
• CI/CD and Deployment: The presence of a “.devcontainer”, “ci”, and Docker configurations indicate that the system is designed to be deployed both locally and in containers. Include these aspects to show the environmental and deployment perspectives.
Architectural Patterns and Technologies
• Plugin-Based Extensibility: Emphasize the decoupling introduced by plugins (in the “packages” directory) and how they interface with the main library.
• Modular and Composable Design: Show that each workflow is built as a series of function calls that can be reused and repurposed. Reflect that in the segmentation between agents, tools, and workflow builders.
• Observability and Profiling: Underline that the system has built-in methods for tracing, profiling, and collecting metrics.
• Multi-Interface Support: Note the separation between command line usage, API-based interactions (FastAPI), and potential UI components.
Elements
• Annotations: Where needed, annotate the use of key technologies (Python, uv for virtual environments, Docker, FastAPI, etc.) and reference some key modules (for example, “src/aiq/agent/react_agent” for composable agent-driven workflows).