Amplifier AI Development Platform

repository·main·Indexed 25 days ago

https://github.com/microsoft/amplifier

An AI-powered modular development assistant for the command line. Amplifier uses a modular architecture where providers, tools, and behaviors are composed using 'bundles'. It supports multiple AI providers including Anthropic Claude, OpenAI, Azure OpenAI, and Ollama, and features session persistence, agent delegation, and an extensible module system for building specialized CLI tools and agents.

Tokens
21.1K
Snippets
66
Records
104
Agent score
84%

What's inside Amplifier

  1. Overview of Amplifier capabilities

    main
    Amplifier is a CLI tool designed for AI-assisted development. In its current early preview state, it supports core AI interactions (specifically using Anthropic Claude), bundle-based configuration, agent delegation, session persistence, and loading modules from git sources.
  2. Access Amplifier branding assets

    main

    The assets/branding/ directory contains official Amplifier branding assets, including icons, favicons, and PWA assets. The directory structure is as follows:

    • icons/: App icons in various sizes and formats (PNG, ICNS, ICO).
    • favicons/: Web favicons for browsers and iOS.
    • pwa/: Progressive Web App icons.
  3. Explore the Amplifier Component Catalog

    main

    Amplifier uses a modular architecture consisting of core infrastructure, applications, documentation, libraries, and bundles.

    Core Infrastructure

    • amplifier-core: The ultra-thin kernel that serves as the foundation for the entire modular AI agent system.

    Applications

    Applications are user-facing tools that compose libraries and modules. Key applications include:

    • amplifier: The main entry point. Installing this provides the amplifier-app-cli via uv tool install.
    • amplifier-agent: A thin wrapper around the kernel that runs as a per-turn stdio subprocess. It emits one JSON envelope per invocation and can be used by any process (shell scripts, Node, Python, etc.) as an agentic AI backend.
    • amplifierd: A localhost HTTP daemon that exposes amplifier-core and amplifier-foundation over REST and SSE, allowing you to drive sessions from any language or framework.
    • amplifier-app-cli: The reference CLI application implementing the Amplifier platform.
    • amplifier-app-nanoclaw: Integration for running NanoClaw on top of amplifier-agent.
    • amplifier-app-opencode: A one-command launcher (amplifier-opencode) that configures the opencode TUI using amplifier-agent's OpenAI-compatible HTTP face.
    • amplifier-app-paperclip: Integration for running paperclip agents via the amplifier_local adapter on the Amplifier engine.
    • amplifier-eval-harness: A test harness for evaluating Amplifier bundles in isolated environments, capturing metrics like wall time, LLM time, and token usage.
    • amplifier-app-log-viewer: A web-based log viewer for real-time session debugging.
    • amplifier-chat: A browser-based Chat UI plugin for amplifierd.
    • amplifier-voice: A WebRTC voice interface plugin for amplifierd using the OpenAI Realtime API.

    Libraries

    Libraries are used by applications (like amplifier-app-cli) but are not used directly by runtime modules. Runtime modules only depend on amplifier-core.

    • amplifier-foundation: Provides module resolution and shared utilities for bundles.
    • amplifier-lib: The Python library for Amplifier.
    • amplifier-module-resolution: A library dedicated to module resolution.
  4. Module Architecture and Types

    main

    Amplifier uses a Linux kernel model where amplifier-core acts as an ultra-thin kernel and everything else is implemented as modules.

    Module Types:

    • Orchestrators: Control the AI execution loop.
    • Providers: Connect to AI models (e.g., Anthropic, OpenAI).
    • Tools: Add capabilities (e.g., file ops, web access, git, databases).
    • Hooks: Extend lifecycle (e.g., logging, security, metrics).
    • Context Managers: Handle conversation state.
    • Agents: Specialized sub-sessions (configuration-based).
  5. Understand the Amplifier Ecosystem

    main

    The amplifier bundle serves as the primary entry point for the entire Amplifier ecosystem. It provides ecosystem overviews, getting started guidance, and access to the amplifier-expert agent for authoritative consultation.

    Key components of the ecosystem include:

    • amplifier-foundation: A library for building applications and bundles.
    • amplifier-core: An ultra-thin kernel providing mechanism only.
    • Modules: Swappable capabilities such as providers and tools.
  6. Understand Amplifier Bundles

    main

    Bundles are capability packages that define what tools and agents are available to you. They are independent of the Provider (the AI service).

    BundlePurposeToolsAgents
    foundationBare minimumfilesystem, bashNone
    devFull developmentbase + web, search, taskzen-architect, bug-hunter, modular-builder, explorer, researcher
    recipesMulti-step workflowsbase + taskRecipe execution agents
    fullDemo/ShowcaseAlmost everythingBroad showcase

    Note: You can use the dev bundle with any provider (Anthropic, OpenAI, etc.).

  7. Understand Amplifier Core Mechanisms

    main

    Amplifier operates as a mechanism rather than a policy engine. The Kernel provides small, stable interfaces that modules implement.

    Key core components include:

    • Request Envelope: The standard message model.
    • Streaming Grammar: For data streaming.
    • Adapter Protocol: For connecting different components.
    • Identity Model: For managing identity.
    • Event Taxonomy Bridge: For standardized event handling.

    Policies (such as provider choice, logging detail, and privacy redaction) are handled by edge modules, while the core remains text-first and inspectable using JSON schemas and a canonical JSONL stream for observability.

  8. Understand the Amplifier Repository Hierarchy

    main

    The Amplifier ecosystem is organized into a modular hierarchy. Understanding where specific information or components reside helps you navigate the project and its dependencies:

    • Entry Point (amplifier): The main starting point for users. Contains getting started guides, ecosystem overviews, and links to all components. Use this for initial setup.
    • Kernel (amplifier-core): The ultra-thin core providing mechanisms like sessions, coordinators, and events. It defines core contracts like the Mount Plan and event taxonomies.
    • Libraries (e.g., amplifier-foundation): Provide APIs and primitives. amplifier-foundation is the primary library for bundle primitives (composition, validation, resolution), shared utilities (deep_merge, file I/O), and reference bundles.
    • Modules (e.g., amplifier-module-provider-openai): Kernel extensions categorized into Context Managers, Hooks, Orchestrators, Providers, and Tools. They implement specific functionalities and are mounted via kernel contracts.
    • Bundles (e.g., amplifier-bundle-recipes): Composable configuration packages that combine providers, behaviors, agents, and context. They are consumed by applications via amplifier bundle use.
    • Applications (e.g., amplifier-app-cli): End-user tools that consume libraries and modules. The CLI provides command references and specific implementation details.
  9. Understand the Amplifier Ecosystem Architecture

    main

    Amplifier is a modular AI agent framework based on a kernel-and-module philosophy. The architecture is divided into four main layers:

    • Kernel (amplifier-core): An ultra-thin layer providing session lifecycle management, module loading, event systems, and coordinator infrastructure. It provides mechanisms, not policies.
    • Foundation Library (amplifier-foundation): The primary library for building applications, providing bundle primitives, reference behaviors, and shared utilities.
    • Modules: Swappable capabilities that plug into the kernel. There are exactly 5 types:
      • Provider: LLM backends (e.g., anthropic, openai, azure, ollama).
      • Tool: Agent capabilities decided by the LLM (e.g., filesystem, bash, web, search).
      • Orchestrator: The main engine driving sessions (e.g., loop-basic, loop-streaming). Swapping this changes the entire execution loop.
      • Context: Memory management (e.g., context-simple, context-persistent).
      • Hook: Lifecycle observers decided by code (e.g., logging, redaction).
    • Bundles: Composable configuration packages that combine providers, tools, orchestrators, behaviors, agents, and context files.
  10. Configure Runtime Modules in Bundles

    main

    Modules are loaded dynamically at runtime based on your bundle configuration. You can define tools within a bundle using a YAML frontmatter block. This allows you to specify the module ID and its source (e.g., a git URL) to extend the agent's capabilities.

    ---
    bundle:
      name: my-bundle
      version: 1.0.0
    
    tools:
      - module: tool-web
        source: git+https://github.com/microsoft/amplifier-module-tool-web@main
      - module: tool-custom
        source: git+https://github.com/you/your-custom-tool@main
    ---
    
    # My Bundle Instructions
    
    Your system prompt here.
  11. Implement a custom Amplifier module

    main

    All Amplifier modules must follow a consistent architectural pattern to ensure compatibility with the kernel. When building a module, follow these four steps:

    1. Entry point: Implement the mount(coordinator, config) function.
    2. Registration: Register your module's capabilities with the coordinator.
    3. Isolation: Implement robust error handling to ensure your module never crashes the kernel.
    4. Contracts: Adhere to one of the stable interfaces (e.g., Tool, Provider, or Hook).

    For low-level kernel interfaces and protocols, refer to the amplifier-core repository.

  12. Use Specialized Agents

    main

    In interactive chat mode, you can delegate tasks to specialized agents. These agents work in focused sub-sessions with specific capabilities.

    Available Agents (in dev bundle):

    • zen-architect: System design and architecture reviews.
    • bug-hunter: Systematic debugging and root cause analysis.
    • modular-builder: Creating new, self-contained components/modules.
    • researcher: Researching and synthesizing external information.
    • explorer: Mapping local files and assets.

    How to use: Simply ask the agent to perform a task in chat:

    • > Delegate to zen-architect: Design a caching system
    • > Use bug-hunter to find issues in src/main.py