Skip to main content

A distributed task queue for building reliable multi-agent systems.

Project description

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

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

nfactorial-0.1.26.tar.gz (71.9 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.26-py3-none-any.whl (83.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nfactorial-0.1.26.tar.gz
  • Upload date:
  • Size: 71.9 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.26.tar.gz
Algorithm Hash digest
SHA256 f483944705336b4844330a93cf33700d9cc4bd60d08bf727d5d2a3a1ad3fe9ac
MD5 c1b4ba675e187807d7b619d41a84c14e
BLAKE2b-256 121dce65b4a8d486cf29633e4ef91b2261b855fab98270cd89f4b1b154892f70

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nfactorial-0.1.26-py3-none-any.whl
  • Upload date:
  • Size: 83.4 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.26-py3-none-any.whl
Algorithm Hash digest
SHA256 70e399807ab6d46a6f537570edbf7dfb9b268842f2d755bc8d5da42ed5fddaee
MD5 027b86fce76315b5cb19d59b9b2a4bbe
BLAKE2b-256 0e179a4af6f8ee34d85361902a296b50da67c5bcb428d4b975f1c2578ce0cdfb

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