Skip to main content

Amsha

Amsha is a lightweight library for CrewAI orchestration. It provides configuration management, agent/task definition, knowledge integration, and monitoring utilities — letting you define crews in YAML and run them with minimal boilerplate.


Key Features

Crew Forge & Orchestration

  • File-Based: Define agents and tasks in version-controlled YAML files.
  • Flows: Multi-crew pipelines via CrewAI Flow — ordered execution with shared state.
  • Memory & Checkpointing: Opt-in per crew (memory: true, checkpoint: config) — off by default.
  • Tracing: Opt-in CrewAI native tracing (tracing: true) — off by default, sends prompts to CrewAI's hosted dashboard.

Tools & MCP

  • Tool Registry: Agents and tasks declare tools by name in YAML (tools: [file_read, directory_read]). Ships with built-in tools; extend with register_tool().
  • MCP Servers: Agents connect to MCP servers via structured YAML (mcp_servers:) — stdio, HTTP, or SSE transports.

Knowledge Management

  • Multi-Format: Docling-powered sources for Markdown, PDF, DOCX, HTML, XLSX, PPTX, images.
  • JSON Native: CrewAI's JSONKnowledgeSource for structured JSON files.
  • Auto-Routing: .json paths route to JSON source; everything else to Docling.

Skills

  • Runtime Skills: Agents reference CrewAI skills by name in YAML (skills: ["domain-skills"]). Amsha resolves names to skill search paths.

Monitoring & Observability

  • CrewPerformanceMonitor: Real-time CPU/GPU/memory tracking during execution.
  • AmshaEventListener: Event-bus subscriber for per-task, per-LLM-call, per-tool-call lifecycle logs — local, no cloud dependency.
  • Contribution Analysis & Reporting: Feature attribution analysis and Excel report generation.

LLM Factory

  • Unified Config: One YAML for all LLM providers (Ollama, LM Studio, OpenRouter, Gemini).
  • Purpose Profiles: Creative (high temperature) vs. Evaluation (deterministic) modes.

Installation

pip install amsha

Amsha currently declares Docling as a runtime dependency. See release guidance for the publishing process.


Migration to 3.0

Migration: Azure-qualified LLM models (azure/ and azure_ai/) are no longer supported. Configure another provider before upgrading to the next major version.

Quick Start

from amsha.crew_forge.orchestrator.file.amsha_crew_file_application import AmshaCrewFileApplication
from amsha.llm_factory.domain.model.llm_type import LLMType

config_paths = {
    "app": "config/app_config.yaml",
    "job": "config/job_config.yaml",
    "llm": "config/llm_config.yaml"
}

app = AmshaCrewFileApplication(config_paths=config_paths, llm_type=LLMType.CREATIVE)

Agent YAML with Tools, Skills, and MCP

# agents/researcher_agent.yaml
agent:
  role: "Researcher"
  goal: "Research topics thoroughly"
  backstory: "Expert researcher with access to web and files"
  tools: [file_read, directory_read]
  skills: ["domain-skills"]
  mcp_servers:
    - transport: stdio
      command: python
      args: [servers/db_server.py]
      env:
        DB_HOST: localhost

Crew Config with Memory, Checkpointing, Tracing

# job_config.yaml
crews:
  research_crew:
    memory: true
    checkpoint:
      enabled: true
      provider: json
      location: "./.Amsha/execution/checkpoints"
    tracing: true      # opt-in: sends prompts to CrewAI dashboard
    steps:
      - task_key: research_task
        agent_key: researcher_agent

Multi-Crew Pipeline

pipeline:
  - "research_crew"
  - "writing_crew"
outputs = app.run_pipeline({"brief": "..."})

Configuration Structure

  • app_config.yaml: Global settings (directories, output paths).
  • job_config.yaml: Crew definitions, steps, pipelines, knowledge sources.
  • llm_config.yaml: LLM provider, model, API keys, creative/evaluation profiles.

Testing

python -m pytest tests/unit/

With coverage:

python -m pytest tests/unit/ --cov=amsha --cov-report=term-missing

Documentation

  • Crew Forge — orchestration, YAML schema, tools, MCP, flows
  • Crew Monitor — performance monitoring, event observability
  • LLM Factory — LLM configuration and profiles

License

Copyright (c) 2025 Nikhil Vijayakumar. Licensed under the MIT License.

Metadata

Release files for Amsha 3.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 Amsha 3.0.1
File Size Uploaded Provenance Actions
amsha-3.0.1.tar.gz 61.1 kB With provenance Details for amsha-3.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for Amsha 3.0.1
File Interpreter ABI Platform Actions
amsha-3.0.1-py3-none-any.whl Python 3 none any Details for amsha-3.0.1-py3-none-any.whl

Total release size: 152.7 kB

Release files / amsha-3.0.1.tar.gz

Download URL amsha-3.0.1.tar.gz
Size 61.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5c7113e74146c3a996d1907b505395dde81400d16fe1f36b370fe41b0c981fe3
BLAKE2b-256 checksum
How to use checksums
8fde1e320edfbdf44950d9affcaf16f7ede98172ad318ae6144aa406beaf3ce8
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 10, 2026.

Transparency log

Release files / amsha-3.0.1-py3-none-any.whl

Download URL amsha-3.0.1-py3-none-any.whl
Size 91.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d7d3d5392a4015a56709c14078b26c032e0a7e59afa6bc3246bd6fce2bec89d
BLAKE2b-256 checksum
How to use checksums
f8878dc9153f2a5bc1535daa431ca9468b1439641415f9c1f33b07e76e62b365
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 10, 2026.

Transparency log

Security for Amsha 3.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 amsha-3.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 10, 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.

Release history Release notifications | RSS feed

This release

3.0.1 This release

2 release files Full provenance

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