Skip to main content

nFactorial

Build distributed agents that spawn more distributed sub-agents.

nFactorial is a distributed task queue for building reliable multi-agent systems. It makes the following trivial to implement:

  • Agent Reliability: Automatic retries, backoff strategies, and recovery of dropped tasks from crashed workers.
  • In-flight Task Management: Cancel, steer, and monitor running tasks.
  • Spawning Sub Agents: Having an agent spawn multiple sub agents and wait for their completion before continuing.
  • Deferred Tools: Pause the agent while it waits for long running tools to complete externally or wait for user approval before continuing.
  • Observability: Built-in metrics dashboard and comprehensive logging

Dashboard

Installation

pip install nfactorial

Quick Start

from factorial import Agent, Orchestrator, AgentWorkerConfig, gpt_41


def get_weather(location: str) -> str:
    return f"The weather in {location} is sunny and 72°F"


agent = Agent(
    instructions="You help users get weather information.",
    model=gpt_41,
    tools=[get_weather],
)

# Create orchestrator
orchestrator = Orchestrator(
    redis_host="localhost",
    redis_port=6379,
    redis_db=0,
    redis_max_connections=50,
)
orchestrator.register_runner(
    agent=agent, agent_worker_config=AgentWorkerConfig(workers=1)
)

# Run the system
if __name__ == "__main__":
    orchestrator.run()

Usage Examples:

IDE Coding Agent

/docs/examples/code_agent

Dashboard

Multi-Agent

/docs/examples/multi_agent

Dashboard

Deliberations.ai

Check it out

Dashboard

Download files

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

Source Distribution

nfactorial-0.1.30.tar.gz (77.0 kB view details)

Uploaded Source

Built Distribution

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

nfactorial-0.1.30-py3-none-any.whl (88.9 kB view details)

Uploaded Python 3

File details

Details for the file nfactorial-0.1.30.tar.gz.

File metadata

  • Download URL: nfactorial-0.1.30.tar.gz
  • Upload date:
  • Size: 77.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for nfactorial-0.1.30.tar.gz
Algorithm Hash digest
SHA256 e5d94c0610ddde064443325db5afa4cdcae44371c7f6d7bbecc29d9f50348d0c
MD5 5eb460aeb922b48ff390f39660bca33e
BLAKE2b-256 4a09fe7156efefef8853cac6b4c546bf2c36d776e198949d312c725e1388d77c

See more details on using hashes here.

File details

Details for the file nfactorial-0.1.30-py3-none-any.whl.

File metadata

  • Download URL: nfactorial-0.1.30-py3-none-any.whl
  • Upload date:
  • Size: 88.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for nfactorial-0.1.30-py3-none-any.whl
Algorithm Hash digest
SHA256 5e46166d5c345e4e78b9fe04dd87821e306cc9eff1fd044d84be605a1c7e971d
MD5 216895a978403634b00d008270d36b8d
BLAKE2b-256 12cc14b12be98252157b8ee1610d7a89b99d52cd125032a8258807851f3798a1

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.30 This release

2 files

0.1.29

2 files

0.1.28

2 files

0.1.27

2 files

0.1.26

2 files

0.1.25

2 files

0.1.24

2 files

0.1.23

2 files

0.1.22

2 files

0.1.21

2 files

0.1.20

2 files

0.1.19

2 files

0.1.18

2 files

0.1.17

2 files

0.1.16

2 files

0.1.15

2 files

0.1.14

2 files

0.1.13

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

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