Skip to main content

OpenFin Agent System

A filesystem-based agent definition and runtime system for long-running AI agents with persistent memory, action logging, and reflection capabilities.

Overview

OpenFin allows you to define agents through filesystem organization, enabling:

  • Long-running processes that persist state across sessions
  • Temporal memory of actions and context
  • Action logging for understanding agent behavior over time
  • Reflection on capabilities, tools, and skills
  • Filesystem-based definition - define agents, skills, and tools through directory structure

Filesystem Structure

agent/
├── PERSONALITY.md    # Agent personality definition
└── BEHAVIOUR.md      # Agent behavior definition

skills/
├── technical-writing/
├── coding/
├── marketing/
└── growth-hacking/

tools/
├── file-io/
├── network-io/
├── websearch/
├── sandbox/
├── docker/
├── code-running/
└── terminal-access/

Each directory can contain:

  • README.md - Documentation describing the capability
  • prompt.md - Versioned prompt definitions
  • tool.py or skill.py - Executable Python modules

Features

Memory & State

  • Persistent state across sessions
  • Temporal memory with importance weighting
  • Action logging with full context
  • Memory retrieval by tags and importance

Reflection

  • Automatic capability discovery
  • Tool and skill evaluation
  • Self-awareness of available capabilities
  • Reflection history

Long-Running Agents

  • Graceful shutdown handling
  • Session management
  • State persistence
  • Context continuity

Usage

Running an Agent

python cli.py --base-path . --agent-id my-agent

Viewing Logs

View action logs:

python utils/view_logs.py --agent-id my-agent --limit 100

View memories:

python utils/view_logs.py --agent-id my-agent --memories

Filter by tool:

python utils/view_logs.py --agent-id my-agent --filter-tool file-io

Interactive Commands

  • help - Show available commands
  • context - Show full agent context
  • memory - Show recent memories
  • capabilities - Show available tools and skills
  • action <type> <description> [tool:<name>] - Execute an action
  • memory <content> [importance:<0.0-1.0>] [tags:<tag1,tag2>] - Add a memory
  • exit - Shutdown the agent

Example

# Start the agent
python cli.py

# In the agent shell:
> capabilities
> action read_file Read config file tool:file-io
> memory Important configuration loaded importance:0.8 tags:config,setup
> context
> exit

Architecture

Core Components

  • AgentRuntime - Main runtime for executing agents
  • MemoryStore - Manages persistent memory and state
  • ReflectionEngine - Handles capability discovery and reflection
  • AgentDefinition - Loads agent personality and behavior

Memory Structure

Memory is stored in memory/<agent-id>/:

  • actions.jsonl - Action log (append-only)
  • memory.json - Important memories
  • state.json - Agent state

Development

Adding a Tool

  1. Create directory: tools/my-tool/
  2. Add README.md with description and capabilities
  3. Optionally add tool.py with execute(input_data, context) function

Adding a Skill

  1. Create directory: skills/my-skill/
  2. Add README.md with description and capabilities
  3. Optionally add skill.py with execute(input_data, context) function

Versioning

Files can include version information in their content. The system will parse version numbers from markdown files.

Requirements

  • Python 3.8+
  • No external dependencies (uses only standard library)

License

MIT

Release files for openfin 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openfin 0.1.0
File Size Uploaded
openfin-0.1.0.tar.gz 67.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for openfin 0.1.0
File Interpreter ABI Platform
openfin-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 142.7 kB

Release files / openfin-0.1.0.tar.gz

Download URL openfin-0.1.0.tar.gz
Size 67.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a731d2b69a779b9b36248bb9bd31277187322342d811f16febdb0a92b75b2b1d
BLAKE2b-256 checksum
How to use checksums
743ab026ace8886cec6cd0a03d330ca4f7fc2fbf9b64903c9d082dd32b529b9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.5

Release files / openfin-0.1.0-py3-none-any.whl

Download URL openfin-0.1.0-py3-none-any.whl
Size 74.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
579b0cb68897c07c4deaa3652f36e36fc65828c88ae233e3ae8c0a4c844672ea
BLAKE2b-256 checksum
How to use checksums
0636c9a5b89b9f1ffc8eb69add74c6e6677f9451b9060d5a9a7ae4c2bce57bff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.5

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page