Pattern is two things.
The first is a platform for building stateful agents, based on the MemGPT paper, similar to Letta. It's flexible and extensible.
Core Library Framework Complete:
In Progress:
Pattern agent constellation:The second is a multi-agent cognitive support system designed for the neurodivergent. It uses a multi-agent architecture with shared memory to provide external executive function through specialized cognitive agents.
All documentation is organized in the docs/ directory:
Create custom agent configurations through the builder API or configuration files. See Architecture docs for details.
Add pattern-core to your Cargo.toml:
[dependencies]
pattern-core = { git = "https://github.com/orual/pattern" }
pattern-db = { git = "https://github.com/orual/pattern" }
See the docs/ directory for API usage and examples.
The pattern CLI lets you interact with agents directly:
# Build the CLI (binary name is `pattern`)
cargo build --release -p pattern-cli
# Create a basic config file (optional)
cp pattern.toml.example pattern.toml
# Edit pattern.toml with your preferences
# Create a .env file for API keys (optional)
echo "GEMINI_API_KEY=your-key-here\nOPENAI_API_KEY=your-key-here" > .env
# Or use environment variables directly
export GEMINI_API_KEY=your-key-here
export OPENAI_API_KEY=your-key-here
# List agents
pattern agent list
# Create an agent (interactive TUI builder)
pattern agent create
# Chat with an agent
pattern chat --agent Archive
# or with the default from the config file
pattern chat
# Show agent status
pattern agent status Pattern
# Search conversation history
pattern debug search-conversations Flux --query "previous conversation"
The CLI stores its database in ./constellation.db by default. You can override this with --db-path or in the config file.
system_integrity → receives the SystemIntegrityTool.memory_management → receives the ConstellationSearchTool.@<supervisor_name> when a supervisor is present.When the CLI prints messages, the sender label is chosen from the message origin:
@handleDiscordsource_idCLIAPIorigin_typeRuntimePattern looks for configuration in these locations (first found wins):
pattern.toml in the current directory~/Library/Application Support/pattern/config.toml (macOS)~/.config/pattern/config.toml (Linux)~/.pattern/config.toml (fallback)See pattern.toml.example for all available options.
Pattern can be run from a custom location by specifying the path to the pattern.toml file using the -c flag.
# Invoke the CLI with a custom configuration file
cargo run --bin pattern -c path/to/pattern.toml chat --group "Lares Cluster"
# Subsequent commands should be invoked with the same configuration file
cargo run --bin pattern -c path/to/pattern.toml agent list
Pattern can tee live agent/group output to additional sinks from the CLI.
PATTERN_FORWARD_FILE: When set to a filepath, Pattern appends timestamped event lines to this file for both single-agent chats and group streams (including Discord→group and Jetstream→group).Example:
export PATTERN_FORWARD_FILE=/tmp/pattern-stream.log
# Check compilation
cargo check
# Run tests
cargo test --lib
# Full validation (required before commits)
just pre-commit-all
# Build with all features
cargo build --features full
pattern/
├── crates/
│ ├── pattern_api/ # API types and contracts
│ ├── pattern_auth/ # Credential storage (ATProto, Discord, providers)
│ ├── pattern_cli/ # Command-line testing tool
│ ├── pattern_core/ # Agent framework, memory, tools, coordination
│ ├── pattern_db/ # SQLite database layer with FTS5 and vector search
│ ├── pattern_nd/ # Neurodivergent-specific tools and personalities
│ ├── pattern_mcp/ # MCP client and server implementation
│ ├── pattern_discord/ # Discord bot integration
│ └── pattern_server/ # Backend server binary
├── docs/ # Architecture and integration guides
└── CLAUDE.md # Development reference (LLM-focused, but...it's written in english so)
Pattern is dual-licensed:
This dual licensing ensures Pattern remains open for the neurodivergent community while supporting sustainable development. Any use of Pattern in a network service or application requires either compliance with AGPL-3.0 (sharing source code) or a commercial license.
Rust
99.7%
Pattern is two things.
The first is a platform for building stateful agents, based on the MemGPT paper, similar to Letta. It's flexible and extensible.
Core Library Framework Complete:
In Progress:
Pattern agent constellation:The second is a multi-agent cognitive support system designed for the neurodivergent. It uses a multi-agent architecture with shared memory to provide external executive function through specialized cognitive agents.
All documentation is organized in the docs/ directory:
Create custom agent configurations through the builder API or configuration files. See Architecture docs for details.
Add pattern-core to your Cargo.toml:
[dependencies]
pattern-core = { git = "https://github.com/orual/pattern" }
pattern-db = { git = "https://github.com/orual/pattern" }
See the docs/ directory for API usage and examples.
The pattern CLI lets you interact with agents directly:
# Build the CLI (binary name is `pattern`)
cargo build --release -p pattern-cli
# Create a basic config file (optional)
cp pattern.toml.example pattern.toml
# Edit pattern.toml with your preferences
# Create a .env file for API keys (optional)
echo "GEMINI_API_KEY=your-key-here\nOPENAI_API_KEY=your-key-here" > .env
# Or use environment variables directly
export GEMINI_API_KEY=your-key-here
export OPENAI_API_KEY=your-key-here
# List agents
pattern agent list
# Create an agent (interactive TUI builder)
pattern agent create
# Chat with an agent
pattern chat --agent Archive
# or with the default from the config file
pattern chat
# Show agent status
pattern agent status Pattern
# Search conversation history
pattern debug search-conversations Flux --query "previous conversation"
The CLI stores its database in ./constellation.db by default. You can override this with --db-path or in the config file.
system_integrity → receives the SystemIntegrityTool.memory_management → receives the ConstellationSearchTool.@<supervisor_name> when a supervisor is present.When the CLI prints messages, the sender label is chosen from the message origin:
@handleDiscordsource_idCLIAPIorigin_typeRuntimePattern looks for configuration in these locations (first found wins):
pattern.toml in the current directory~/Library/Application Support/pattern/config.toml (macOS)~/.config/pattern/config.toml (Linux)~/.pattern/config.toml (fallback)See pattern.toml.example for all available options.
Pattern can be run from a custom location by specifying the path to the pattern.toml file using the -c flag.
# Invoke the CLI with a custom configuration file
cargo run --bin pattern -c path/to/pattern.toml chat --group "Lares Cluster"
# Subsequent commands should be invoked with the same configuration file
cargo run --bin pattern -c path/to/pattern.toml agent list
Pattern can tee live agent/group output to additional sinks from the CLI.
PATTERN_FORWARD_FILE: When set to a filepath, Pattern appends timestamped event lines to this file for both single-agent chats and group streams (including Discord→group and Jetstream→group).Example:
export PATTERN_FORWARD_FILE=/tmp/pattern-stream.log
# Check compilation
cargo check
# Run tests
cargo test --lib
# Full validation (required before commits)
just pre-commit-all
# Build with all features
cargo build --features full
pattern/
├── crates/
│ ├── pattern_api/ # API types and contracts
│ ├── pattern_auth/ # Credential storage (ATProto, Discord, providers)
│ ├── pattern_cli/ # Command-line testing tool
│ ├── pattern_core/ # Agent framework, memory, tools, coordination
│ ├── pattern_db/ # SQLite database layer with FTS5 and vector search
│ ├── pattern_nd/ # Neurodivergent-specific tools and personalities
│ ├── pattern_mcp/ # MCP client and server implementation
│ ├── pattern_discord/ # Discord bot integration
│ └── pattern_server/ # Backend server binary
├── docs/ # Architecture and integration guides
└── CLAUDE.md # Development reference (LLM-focused, but...it's written in english so)
Pattern is dual-licensed:
This dual licensing ensures Pattern remains open for the neurodivergent community while supporting sustainable development. Any use of Pattern in a network service or application requires either compliance with AGPL-3.0 (sharing source code) or a commercial license.
Rust
99.7%