Harness Framework
=================

Copyright 2026 Nguyễn Trường Lâu and octopusai

Harness Framework is licensed under the Apache License, Version 2.0. See the LICENSE file.

Harness Framework is an independent implementation. Parts of it are adapted from, or keep the
public interface of, Microsoft Agent Framework (agent-framework-core 1.26.0 and
agent-framework-openai 1.18.2, and agent-framework-redis 1.0.0b261112), which is
distributed under the MIT License reproduced below.

Adapted code and text:

- src/harness_framework/harness/files/store.py: relative-path normalization and confinement, the
  line split used for line numbers, line replacement with expected-line checks, the
  bounded regex search and per-file scanning, the storage-key segment derivation, and
  the per-folder write lock.
- src/harness_framework/harness/files/memory.py: the file memory layout (description sidecars, the
  memories.md index), tool names, tool messages and input schemas.
- src/harness_framework/harness/planning/todos.py, src/harness_framework/harness/planning/modes.py,
  src/harness_framework/harness/files/access.py: tool names, inputs, instructions, mode texts and
  the todo store layout.
- src/harness_framework/harness/background.py: background task tool names, task records and the
  session-release behavior (the restrictions are new).
- src/harness_framework/harness/files/filesystem.py: the disk store's interface and behavior (the
  descriptor-based confinement and atomic writes are new).
- src/harness_framework/harness/skills.py: skill name and description rules, the skills prompt
  template and the resources block format (the YAML parser was replaced).
- src/harness_framework/harness/middleware/agent_loop.py: the agent loop's callback protocol, progress log and
  judge prompts.
- src/harness_framework/harness/factory.py: create_harness_agent's signature, assembly order and
  default harness instructions.
- src/harness_framework/harness/middleware/tool_approval.py and
  src/harness_framework/core/tools/approvals.py: the
  approval request/response protocol shape and the "always approve" response helpers.
- src/harness_framework/core/compaction/: message grouping and the strategy names and parameters.
- src/harness_framework/redis/: Redis history key and retention behavior.
- Public names and signatures throughout src/harness_framework (Message, Content, ChatResponse,
  ResponseStream, AgentSession, ContextProvider, HistoryProvider, FunctionTool, tool,
  FunctionInvocationLayer, BaseChatClient, OpenAIResponsesClient, ...), kept so
  that applications can switch by renaming imports.

-------------------------------------------------------------------------------

Microsoft Agent Framework

MIT License

Copyright (c) Microsoft Corporation.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
