Skip to main content
Logo

AmritaSense

PyPI Version Python Version License Discord QQ Group

"Sense is all you need."

AmritaSense is a general-purpose workflow orchestration engine that replaces traditional graph-based models with an instruction set architecture—treating workflows not as nodes-and-edges diagrams, but as programmable execution streams driven by a lightweight virtual machine.

Why AmritaSense?

Most workflow engines force you into a graph mindset: define nodes, connect edges, manage state objects. AmritaSense takes a different path. You compose nodes and control flow just like writing ordinary code—the engine compiles them into a linear instruction sequence, then executes them step by step. The result: zero scheduling overhead, native interrupt support, and the expressive power of assembly-level control flow.

Core Features

  • Complete Instruction SetIF/ELIF/ELSE, WHILE/DO-WHILE, GOTO/CALL, TRY/CATCH/THEN/FIN, NOP, INTERRUPT. All control flow is first-class, not simulated through graph routing.
  • VM-Style Execution—A program counter (PointerVector) and call stack drive execution. Jumps are integer operations, not graph traversals.
  • Async-Native Suspend/Resume—Two Future callbacks enable full workflow interruption at any node boundary. Built for debuggers and human-in-the-loop systems.
  • Declarative Dependency Injection—Nodes declare dependencies via function signatures. The engine resolves them at runtime with type matching and concurrent resolution.
  • Ultra Lightweight— Compiles 100,000 nodes in ~200ms. Runs anywhere from Raspberry Pi to cloud.
  • Self-Compile Instructions—Extend the instruction set with SelfCompileInstruction. Compile-time expansion, zero runtime overhead.

Installation

pip install amrita-sense

Quick Look

import asyncio
from amrita_sense import Node, WorkflowInterpreter as WorkflowPC, IF, NOP

@Node()
def condition() -> bool: return True

@Node()
def action(): print("Done")

flow = IF(condition, action) >> NOP
pc = WorkflowPC(flow.render())

if __name__ == "__main__":
  asyncio.run(pc.run())

See more demos in demos/

Documentation

Full guides, concept explanations, and API reference at sense.amritabot.com.

Contributing

Contributions are welcome. See CONTRIBUTING.md and our Code of Conduct.

License

Apache V2. See LICENSE.

AIGC Content Licensing Policy

AACLP V1. See POLICY_OF_AIGC (Official Link) for details.

Download files

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

Source Distribution

amrita_sense-0.4.5.tar.gz (75.5 kB view details)

Uploaded Source

Built Distribution

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

amrita_sense-0.4.5-py3-none-any.whl (67.3 kB view details)

Uploaded Python 3

File details

Details for the file amrita_sense-0.4.5.tar.gz.

File metadata

  • Download URL: amrita_sense-0.4.5.tar.gz
  • Upload date:
  • Size: 75.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for amrita_sense-0.4.5.tar.gz
Algorithm Hash digest
SHA256 9cec45b039854e00eabb42cad728c53d66e1d9c0b074d67c3c0b4b7ba2fe5f99
MD5 37c337aecf415bfaff7cf54aad4bdf27
BLAKE2b-256 484889a39b94e858182534636f47ddf1f97dc474ffb2e4aa90747a286d3bf024

See more details on using hashes here.

File details

Details for the file amrita_sense-0.4.5-py3-none-any.whl.

File metadata

  • Download URL: amrita_sense-0.4.5-py3-none-any.whl
  • Upload date:
  • Size: 67.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for amrita_sense-0.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8e55a7f133e2d3003b3b23de3d475921b48db29dba47d1f980496a8d3ee7fab8
MD5 f1c901f8910e7edd2b0ee07ed0e82b2e
BLAKE2b-256 49c582c2732e877a4fe0aac6179dad2e40715e757b5458c61c24b0f10d02c587

See more details on using hashes here.

Release history Release notifications | RSS feed

0.7.0

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.1

2 files

0.5.0

2 files

0.4.6

2 files

0.4.5.1

2 files

This release

0.4.5 This release

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.3.1

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1.post1

2 files

0.3.1

2 files

0.3.0

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

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