Skip to main content

Next-Gen workflow engine.

Project description

Logo

AmritaSense

PyPI Version Python Version License Discord QQ Group

"Any is thing all you need."

"Let developers return with Python again."

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—Core interpreter is ~300 lines. 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

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())
pc.run_sync()

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

LGPL V2. See LICENSE.

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

amrita_sense-0.1.0.tar.gz (40.1 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.1.0-py3-none-any.whl (40.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: amrita_sense-0.1.0.tar.gz
  • Upload date:
  • Size: 40.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","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.1.0.tar.gz
Algorithm Hash digest
SHA256 d68141c562385616374a8bf06e117f47c9ed2c3050552f43ab0c2476a0ae9206
MD5 a2eae9b48b6c932eb6f169173128c661
BLAKE2b-256 c523df0b94586867c772baa49d77cf05b0631cd15ca472e5c83c3a0beae8c889

See more details on using hashes here.

File details

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

File metadata

  • Download URL: amrita_sense-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 40.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 02a26ad38f0f5a5ce49cc1f39d7aad1226c59ceafe5afc033255017d772795cf
MD5 c47e89e0dc4f9a734139badac60e2a0e
BLAKE2b-256 fcc251032731878125287bb95c6a4e7e2b490442e106f489a23553f16f42695e

See more details on using hashes here.

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