Skip to content

Commit e8763f5

Browse files
committed
Initial commit
0 parents  commit e8763f5

91 files changed

Lines changed: 21772 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
quality:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.11"
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
python -m pip install ".[dev]"
25+
26+
- name: Check spec sync
27+
run: python scripts/check_spec_sync.py
28+
29+
- name: Run quality gate
30+
run: bash scripts/quality_gate.sh

.github/workflows/docs.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Python
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: "3.11"
29+
30+
- name: Install docs dependencies
31+
run: |
32+
python -m pip install --upgrade pip
33+
python -m pip install ".[docs]"
34+
35+
- name: Build docs
36+
run: python -m mkdocs build --strict
37+
38+
- name: Upload Pages artifact
39+
uses: actions/upload-pages-artifact@v3
40+
with:
41+
path: site
42+
43+
deploy:
44+
needs: build
45+
runs-on: ubuntu-latest
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
49+
steps:
50+
- name: Deploy to GitHub Pages
51+
id: deployment
52+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# macOS
2+
.DS_Store
3+
4+
# Local environment
5+
.env
6+
.env.*
7+
.python-version
8+
9+
# Editors
10+
.vscode/
11+
.idea/
12+
13+
# Python artifacts
14+
__pycache__/
15+
*.py[cod]
16+
*$py.class
17+
18+
# Test/cache tools
19+
.pytest_cache/
20+
.mypy_cache/
21+
.ruff_cache/
22+
23+
# Build/distribution
24+
build/
25+
dist/
26+
*.egg-info/
27+
28+
# Documentation build output
29+
/site/
30+
31+
# Virtual environment
32+
.venv/
33+
venv/
34+
35+
# Agent tooling
36+
.claude/
37+
.codex/
38+
.worktree/
39+
40+
# Local git worktrees
41+
.worktrees/
42+
43+
# Runtime logs
44+
logs/
45+
*.log
46+
47+
# Node.js / frontend artifacts
48+
node_modules/
49+
**/.vite/
50+
*.tsbuildinfo
51+
npm-debug.log*
52+
yarn-debug.log*
53+
yarn-error.log*
54+
package-lock.json
55+
pnpm-lock.yaml
56+
yarn.lock
57+
58+
# Playwright
59+
/test-results/
60+
/playwright-report/
61+
/blob-report/
62+
/playwright/.cache/
63+
/playwright/.auth/
64+
.playwright-mcp/
65+
66+
# Local workspace
67+
reference/
68+
.fp-demo/
69+
70+
# GitHub (local only)
71+
.github/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 FoundationAgents
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.es.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Foundation Protocol
2+
3+
[English](README.md) | [中文](README.zh.md) | [한국어](README.ko.md) | [日本語](README.ja.md) | Español | [Tiếng Việt](README.vi.md)
4+
5+
[![GitHub Stars](https://img.shields.io/github/stars/FoundationAgents/foundation-protocol)](https://github.com/FoundationAgents/foundation-protocol) [![License](https://img.shields.io/github/license/FoundationAgents/foundation-protocol)](LICENSE)
6+
7+
Un runtime de Python para la colaboración de IA multi-entidad — agentes, humanos y herramientas en una capa de protocolo compartida.
8+
9+
> [AI-Link-Net](https://github.com/FoundationAgents/ai-link-net) es una aplicación full-stack construida sobre este protocolo.
10+
11+
## Características
12+
13+
- **Modelo de entidad unificado** — agentes, humanos, herramientas y servicios comparten un sistema común de identidad y direccionamiento
14+
- **Sesiones multipartitas** — colaboración estructurada con gestión estricta del ciclo de vida y reproducción de eventos
15+
- **Políticas y gobernanza** — hooks de checkpoint con registro de procedencia para confianza y control de acceso
16+
- **Comercio y pagos** — contratos, custodia, liquidación y resolución de disputas mediante máquinas de estado
17+
- **Federación** — enrutamiento de entidades locales y remotas a través de nodos host distribuidos
18+
19+
## Instalación
20+
21+
Instalar como dependencia git:
22+
23+
```bash
24+
pip install "foundation-protocol @ git+https://github.com/FoundationAgents/foundation-protocol.git"
25+
```
26+
27+
## Uso
28+
29+
```python
30+
import asyncio
31+
from fp import EntityKind, Host, Message, MessageKind
32+
33+
async def main():
34+
host = Host(name="LocalHost")
35+
36+
alice = host.register_entity(name="Alice", kind=EntityKind.HUMAN)
37+
bot = host.register_entity(name="Bot", kind=EntityKind.AGENT)
38+
39+
await alice.send_message(
40+
to=bot.entity_card,
41+
message=Message(kind=MessageKind.TEXT, payload={"text": "Hello!"}),
42+
)
43+
44+
asyncio.run(main())
45+
```
46+
47+
Consulte el directorio [`example/`](example/) para más escenarios, incluyendo mensajería entre hosts, integración de herramientas MCP y flujos de comercio.
48+
49+
## Documentación
50+
51+
- [Especificación del protocolo (Draft)](docs/foundation-protocol-spec-draft.md)
52+
- [Diseño de checkpoints](docs/checkpoint-design.md)
53+
- [Protocolo de comercio y pagos](docs/Trade&Trust-Payment-Protocol.md)
54+
55+
## Licencia
56+
57+
MIT

README.ja.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Foundation Protocol
2+
3+
[English](README.md) | [中文](README.zh.md) | [한국어](README.ko.md) | 日本語 | [Español](README.es.md) | [Tiếng Việt](README.vi.md)
4+
5+
[![GitHub Stars](https://img.shields.io/github/stars/FoundationAgents/foundation-protocol)](https://github.com/FoundationAgents/foundation-protocol) [![License](https://img.shields.io/github/license/FoundationAgents/foundation-protocol)](LICENSE)
6+
7+
マルチエンティティAIコラボレーションのためのPythonランタイム — エージェント、人間、ツールが共通のプロトコルレイヤー上で連携します。
8+
9+
> [AI-Link-Net](https://github.com/FoundationAgents/ai-link-net)は、このプロトコル上に構築されたフルスタックアプリケーションです。
10+
11+
## 特徴
12+
13+
- **統一エンティティモデル** — エージェント、人間、ツール、サービスが共通のIDとアドレス体系を共有
14+
- **マルチパーティセッション** — 厳格なライフサイクル管理とイベントリプレイによる構造化コラボレーション
15+
- **ポリシーとガバナンス** — 信頼とアクセス制御のためのチェックポイントフックと来歴記録
16+
- **取引と決済** — ステートマシンによる契約、エスクロー、精算、紛争解決
17+
- **フェデレーション** — 分散ホストノード間のローカル・リモートエンティティルーティング
18+
19+
## インストール
20+
21+
git依存としてインストール:
22+
23+
```bash
24+
pip install "foundation-protocol @ git+https://github.com/FoundationAgents/foundation-protocol.git"
25+
```
26+
27+
## 使い方
28+
29+
```python
30+
import asyncio
31+
from fp import EntityKind, Host, Message, MessageKind
32+
33+
async def main():
34+
host = Host(name="LocalHost")
35+
36+
alice = host.register_entity(name="Alice", kind=EntityKind.HUMAN)
37+
bot = host.register_entity(name="Bot", kind=EntityKind.AGENT)
38+
39+
await alice.send_message(
40+
to=bot.entity_card,
41+
message=Message(kind=MessageKind.TEXT, payload={"text": "Hello!"}),
42+
)
43+
44+
asyncio.run(main())
45+
```
46+
47+
クロスホストメッセージング、MCPツール統合、取引ワークフローなどのシナリオは[`example/`](example/)ディレクトリをご覧ください。
48+
49+
## ドキュメント
50+
51+
- [プロトコル仕様 (Draft)](docs/foundation-protocol-spec-draft.md)
52+
- [チェックポイント設計](docs/checkpoint-design.md)
53+
- [取引・決済プロトコル](docs/Trade&Trust-Payment-Protocol.md)
54+
55+
## ライセンス
56+
57+
MIT

README.ko.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Foundation Protocol
2+
3+
[English](README.md) | [中文](README.zh.md) | 한국어 | [日本語](README.ja.md) | [Español](README.es.md) | [Tiếng Việt](README.vi.md)
4+
5+
[![GitHub Stars](https://img.shields.io/github/stars/FoundationAgents/foundation-protocol)](https://github.com/FoundationAgents/foundation-protocol) [![License](https://img.shields.io/github/license/FoundationAgents/foundation-protocol)](LICENSE)
6+
7+
다중 엔티티 AI 협업을 위한 Python 런타임 — 에이전트, 인간, 도구가 하나의 프로토콜 레이어에서 함께 작동합니다.
8+
9+
> [AI-Link-Net](https://github.com/FoundationAgents/ai-link-net)은 이 프로토콜 위에 구축된 풀스택 애플리케이션입니다.
10+
11+
## 특징
12+
13+
- **통합 엔티티 모델** — 에이전트, 인간, 도구, 서비스가 공통 ID 및 주소 체계를 공유
14+
- **다자간 세션** — 엄격한 생명주기 관리와 이벤트 리플레이를 갖춘 구조화된 협업
15+
- **정책 및 거버넌스** — 신뢰와 접근 제어를 위한 체크포인트 훅 및 출처 기록
16+
- **거래 및 결제** — 상태 머신 기반의 계약, 에스크로, 정산 및 분쟁 해결
17+
- **페더레이션** — 분산 호스트 노드 간 로컬 및 원격 엔티티 라우팅
18+
19+
## 설치
20+
21+
git 의존성으로 설치:
22+
23+
```bash
24+
pip install "foundation-protocol @ git+https://github.com/FoundationAgents/foundation-protocol.git"
25+
```
26+
27+
## 사용법
28+
29+
```python
30+
import asyncio
31+
from fp import EntityKind, Host, Message, MessageKind
32+
33+
async def main():
34+
host = Host(name="LocalHost")
35+
36+
alice = host.register_entity(name="Alice", kind=EntityKind.HUMAN)
37+
bot = host.register_entity(name="Bot", kind=EntityKind.AGENT)
38+
39+
await alice.send_message(
40+
to=bot.entity_card,
41+
message=Message(kind=MessageKind.TEXT, payload={"text": "Hello!"}),
42+
)
43+
44+
asyncio.run(main())
45+
```
46+
47+
크로스 호스트 메시징, MCP 도구 통합, 거래 워크플로우 등 더 많은 시나리오는 [`example/`](example/) 디렉토리를 참고하세요.
48+
49+
## 문서
50+
51+
- [프로토콜 사양 (Draft)](docs/foundation-protocol-spec-draft.md)
52+
- [체크포인트 설계](docs/checkpoint-design.md)
53+
- [거래 및 결제 프로토콜](docs/Trade&Trust-Payment-Protocol.md)
54+
55+
## 라이선스
56+
57+
MIT

0 commit comments

Comments
 (0)