Skip to main content

A code-first FactoryMind AgentOS package for defining, running, and safely improving reusable agents.

Project description

FactoryMind AgentOS

FactoryMind AgentOS is a Python library for building reusable, reliable, self-improving agents with a typed runtime contract.

Current status: v1.3.0 (stable).

Install

pip install agent-os==1.3.0

For local repo usage:

pip install -e .

Stable Core API

  • AgentOS
  • AgentOS.load(...)
  • AgentOS.create_agent(...)
  • AgentOS.sessions
  • AgentOS.memory
  • AgentOS.learning
  • AgentOS.flame
  • AgentOS.tools
  • AgentOS.capabilities
  • AgentOS.monitor
  • Core models: AgentDefinition, Session, SessionEvent, AgentOutput, MemoryItem, LearningRun, ToolManifest, ToolCallResult, ModelCapability, UsageRecord, CostRecord, AgentStatus, PoolItem, ReflectionBatchRun

Breaking change in v1.2.0: candidate-era learning APIs are removed from stable surface. FLAME temporary-memory reflection is the authoritative learning path.

v1.3.0 adds dual output modes per agent:

  • output_mode="text" (default)
  • output_mode="json_schema" with output_schema and typed AgentOutput.content_json

Agent Capability Tiers

  • basic_agent: short-term session context only, no long-term memory retrieval, no learning
  • self_learning_agent: short-term + long-term memory (agent-owned memory only) + learning

Example:

from agent_os import AgentTier

app.create_agent(
    agent_id="project-selector",
    goal="Select best project",
    model="gpt-4.1-mini",
    agent_tier=AgentTier.BASIC_AGENT,
)

Library Quickstart

from pathlib import Path
from agent_os import AgentOS

root = Path(".agent-os")
app = AgentOS.load(root=root, runtime_mode="local")
app.create_agent(
    agent_id="proposal-agent",
    goal="Draft project proposals",
    model="gpt-4.1-mini",
    tenant_id="default",
    output_mode="text",
)

session = app.sessions.init("proposal-agent", "Draft a proposal for Project Orion")
output = app.sessions.run(session.session_id)
print(output.type.value, output.content)

app.sessions.feedback(session.session_id, "Make it concise and include delivery timeline.")
app.sessions.accept(session.session_id, note="Accepted")

Learning and Tools

# learning.run remains as a compatibility alias and dispatches to FLAME trigger.
run = app.learning.run(agent_id="proposal-agent", window_size=20)
runs = app.flame.list_runs("proposal-agent")
pool = app.flame.list_pool("proposal-agent")
from agent_os import ToolManifest, ToolScope

tool = app.tools.register(
    ToolManifest(
        name="project_lookup",
        scope=ToolScope.READ,
        input_schema={"type": "object", "properties": {"q": {"type": "string"}}, "required": ["q"]},
        output_schema={"type": "object"},
    )
)
app.tools.bind("proposal-agent", tool.tool_id)
result, audit = app.tools.call("proposal-agent", session.session_id, tool.tool_id, {"q": "orion"})

Canonical Examples

  • examples/proposal_agent_app.py
  • examples/project_selection_agent_app.py
  • examples/keyword_extraction_agent_app.py

v1 Docs

  • docs/stable-sdk-contract.md
  • docs/migration-v1-memory-only.md
  • docs/migration-v1.2.0-flame-cutover.md
  • docs/migration-v1.3.0-structured-output.md

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

factorymind_agent_os-1.3.0.tar.gz (180.5 kB view details)

Uploaded Source

Built Distribution

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

factorymind_agent_os-1.3.0-py3-none-any.whl (85.7 kB view details)

Uploaded Python 3

File details

Details for the file factorymind_agent_os-1.3.0.tar.gz.

File metadata

  • Download URL: factorymind_agent_os-1.3.0.tar.gz
  • Upload date:
  • Size: 180.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for factorymind_agent_os-1.3.0.tar.gz
Algorithm Hash digest
SHA256 c5bb74031c7af351e92c76da98e9a57520f6f4279f625d18f10e138046473285
MD5 1ef0cbf35c83f96ea379ceb8802163f6
BLAKE2b-256 86abd3b7d6effaa31fba86d48e5a2a8bcabd7daf8c4b56ee24e3d5ba4ccebd68

See more details on using hashes here.

File details

Details for the file factorymind_agent_os-1.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for factorymind_agent_os-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8beb75ced8785b9918ac36b2ae774e88d54491a60ff2645b18e4b558b60f50c8
MD5 8cbd0410155a81e00ed09f2b2e1b8e62
BLAKE2b-256 4b28652f1d6c0170065cdcf8eeb21ccda85397b6643c315a5030f586adde5a81

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