Skip to main content

Governed autonomous development and production-readiness for AI coding agents.

Project description

Niyam

The AgentOps control plane for governed autonomous development.

One .niyam/ source of truth. Many AI runtimes. Policy-driven autonomy. Portable memory. Evidence-backed delivery.

PyPI version License: MIT


What is Niyam?

Niyam bridges the gap between fast "vibe coding" and production-grade safety. It turns any repository into a governed AI-development workspace where you define the rules, and AI agents (Claude Code, Codex, Gemini) follow them.

Niyam is an AgentOps control plane for teams that need to govern what agents do, what tools they use, what memory they rely on, and what evidence they produce. It is built for AI agent governance, AI coding agent safety, MCP tool governance, portable agent memory, approval gates, browser-agent supervision, and audit-ready evidence.


Niyam in Action

1. Interactive Development (Day-to-Day)

Niyam acts as a governance layer inside your AI agent. Use team-standard slash commands:

/implement "add password complexity rules to auth service"

Niyam ensures the agent writes tests first, respects file freezes, and follows the approved TDD workflow.

2. Autonomous Missions (Batch Tasks)

Orchestrate complex migrations or large-scale refactors with ease:

niyam run "migrate all API endpoints to v2"

Niyam plans the mission, executes dependency-aware task layers, can isolate write tasks in Git worktrees, and records validation evidence.


Key Features

Active Action Governance & Approvals

  • Command Guardrails: Intercept and block dangerous shell commands (e.g., destructive database drops or global file deletions) before execution.
  • Path Freezing: Restrict agents to specific scopes. Protect core files like LICENSE or sensitive infra/ folders from unauthorized AI writes.
  • Credential Redaction: A built-in engine that identifies and redacts secrets, API keys, and PII from agent logs and CLI outputs in real-time.
  • Enterprise Approval Gates: Role-based (e.g., Product, QA, Security) manual approval gates for critical tasks and mission plans directly from the CLI or Portal UI.

Niyam Action Governance

Multi-Agent Orchestration & Resilience

  • Agent Roles: Define specialized AI personas (e.g., security-reviewer, qa-engineer) with tailored system prompts and dedicated toolsets.
  • Isolated Multi-Worktree Parallelism: Run tasks in parallel using isolated Git Worktrees, preventing agent cross-talk and ensuring clean, atomic PRs.
  • Swarm Coordination: Track active agents, heartbeats, file locks, and negotiation requests through local swarm state.
  • Autonomous Environment Healing: Experimental auto-heal retries feed validation failures back into task prompts and can trigger AI re-planning.

Compliance & Readiness Checking

  • Repo Audits: Scan your repository against strict profiles (startup, team, enterprise, regulated) to detect missing documentation, unpinned dependencies, or secret exposures.
  • Readiness Scoring: Get a numerical Readiness Score (0-100) and a clear GO / NO-GO decision for every branch or mission.
  • CI/CD Pipeline Scaffolding: Generate ready-to-use CI/CD workflows (niyam ci generate [github/gitlab/azure]) that run strict policy validations (niyam ci verify) directly in your pull requests.

Evidence, Memory, Control Room, and FinOps

  • Joint Evidence Reports: Automatically synthesize scan findings, observed command logs, MCP registry posture, Memory Ledger posture, Control Room activity, browser actions, approvals, and cost data into standardized, audit-ready compliance documents.
  • Memory Ledger: Portable, inspectable, policy-governed agent memory with structured records, import/export, diffing, redaction, recall lineage, policy checks, and an MCP-compatible memory server.
  • Control Room: Local-first supervised human-agent task rooms with workspace sessions, append-only timelines, approval gates, browser-action recording, takeover state, and task evidence exports.
  • FinOps Cost Tracking: A local ledger that logs every token consumed and estimates USD spend against customizable pricing tables.

Live Mission Dashboard & Web Portal

Niyam provides both terminal-based and browser-based interfaces to monitor your autonomous agents and manage approvals:

1. Terminal Dashboard

niyam dashboard --watch
  • Live Task Progress: Visual status of all mission tasks (Planned, Running, Completed, Failed).
  • Real-time Logs: View active output from implementation agents as they work in isolated worktrees.
  • Validation Monitor & Resource Efficiency: Watch unit tests and lint checks run and report results live, alongside actual token spend.

2. Browser-Based Portal UI

niyam portal
  • Policy Analytics: Visual cards detailing Active Guardrails, Command Filters, Security Isolation, and active Path Freezing.
  • Interactive Approval Center: Review pending tasks/missions and authorize execution by role directly from the Web UI.
  • FinOps & Agent Metrics: Monitor token consumption, cost breakdowns, and agent success rates.

Installation

Global Install (Recommended)

pipx install niyam

Run on the fly (No install)

uvx --from niyam niyam --help

Quick Start

  1. Initialize your workspace:
    niyam init --profile fullstack --runtime claude
    
  2. Synchronize with AI agent:
    niyam sync
    
  3. Start building: Open your agent (e.g. claude) and use /implement, /review, or /ship.

AgentOps Workflows

Govern portable agent memory:

niyam memory init
niyam memory validate
niyam memory recall "deployment preference"
niyam memory policy-check
niyam memory serve-mcp

Register the Memory Ledger MCP server:

niyam mcp register-memory-server

Run a supervised Control Room task:

niyam workspace create "Research competitor pricing" --session-id TASK-001
niyam workspace browser-start TASK-001 --url https://example.com
niyam workspace browser-action TASK-001 --type submit --target "#publish"
niyam workspace evidence TASK-001 --format markdown

Generate audit-ready evidence with AgentOps sections:

niyam evidence --include scan,guard,mcp,cost,memory,workspace

Maturity Guide

Capability Status
Workspace init, runtime sync, context refresh Stable
Scan, guard, evidence, cost tracking Experimental but covered by tests
Memory Ledger, MCP memory server, Control Room workspace, browser recorder Preview
Mission planning/execution, worktree isolation Experimental
Swarm coordination, RAG indexing, auto-heal Preview

Preview features are local-first and test-covered, but their command shape and defaults may evolve before GA.


Documentation & Architecture


Roadmap

See ROADMAP.md for the AgentOps roadmap, including Memory Ledger, Control Room, web dashboards, and enterprise CI/CD integration.

License

Distributed under the MIT License. See LICENSE for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

niyam-1.0.0rc1.tar.gz (326.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

niyam-1.0.0rc1-py3-none-any.whl (467.6 kB view details)

Uploaded Python 3

File details

Details for the file niyam-1.0.0rc1.tar.gz.

File metadata

  • Download URL: niyam-1.0.0rc1.tar.gz
  • Upload date:
  • Size: 326.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for niyam-1.0.0rc1.tar.gz
Algorithm Hash digest
SHA256 b392067eeac34306294138d241a7124d4efbc85a797ae63365ac04585f8fbae7
MD5 d190b83a3d63a3ae155ce60148c8392b
BLAKE2b-256 5a3efbc411d5f901c90696891da9a0e016a3c26a18b985dbdc1018900237cfac

See more details on using hashes here.

Provenance

The following attestation bundles were made for niyam-1.0.0rc1.tar.gz:

Publisher: release.yml on sairintechnologycom/niyam

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file niyam-1.0.0rc1-py3-none-any.whl.

File metadata

  • Download URL: niyam-1.0.0rc1-py3-none-any.whl
  • Upload date:
  • Size: 467.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for niyam-1.0.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 17c1b4e9b3b25b6252a7543453d76c97b00d50c5a092eeba7ad134593c95c987
MD5 0f816c01ce35b7b0f208ea2b4325fe26
BLAKE2b-256 51dbacf3977dfc1a018678316b6da09be90e0a2b01485324543d4534008b3d31

See more details on using hashes here.

Provenance

The following attestation bundles were made for niyam-1.0.0rc1-py3-none-any.whl:

Publisher: release.yml on sairintechnologycom/niyam

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page