Skip to main content

Bytecode instruction set for agent runtimes — language-agnostic opcode spec

Project description

flux-opcodes

Bytecode instruction set for agent runtimes. Language-agnostic opcode spec: define, validate, encode, decode. The instruction set that agents speak natively.

Usage

from flux_opcodes import Opcode, Instruction, InstructionSet

isa = InstructionSet().define_defaults()
program = [
    Instruction(Opcode.LOAD, [0, 100]),
    Instruction(Opcode.ADD, [0, 1]),
    Instruction(Opcode.EMIT, [0]),
    Instruction(Opcode.HALT),
]

# Encode to bytes
data = isa.encode_program(program)

# Decode back
decoded = isa.decode_program(data)

Includes agent-specific opcodes: EMIT (tile), RECEIVE (message), SLEEP (yield).

Zero deps. pip install flux-opcodes

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

flux_opcodes-0.1.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

flux_opcodes-0.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: flux_opcodes-0.1.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for flux_opcodes-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ceaf132cbb9784fa16f8cb6aada8083dfc4899836c832e7703ab01386e5d8d9d
MD5 a1ab3ef4fdbaad1546c11f358a6e3b59
BLAKE2b-256 b5262e8db50bb4151f01911810e0876ff8fa942fc171c9754eacbe6258078d8b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: flux_opcodes-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for flux_opcodes-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88cdef4eb2f468758c1a41044f433e8aeed55b4d3b6630fc2665d065132bf92d
MD5 2052f5554bdd23583c9423ae39160bd4
BLAKE2b-256 8b5975803a036b3f7f956aedd968fdc57b962621c1b2470cdc33ab9c209d0042

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