Internet of Cognition (IOC) - Cognition Fabric Node (CFN) MAS Client Library
Python SDK client library for the Internet of Cognition (IoC) Cognition Fabric Node.
Compatibility
Current Version: 0.3.0 supports CFN Public API v0.2.1
Overview
This library provides a Python client for forwarding L9 protocol messages to the CFN (Cognition Fabric Node) service, which routes them to appropriate Cognition Engines based on the message header.
The L9 protocol (SSTP - Semantic State Transfer Protocol) enables standardized communication between Multi-Agent Systems and Cognition Engines in the IoC ecosystem.
Installation
Requires Python >= 3.10
pip install ioc-cfn-mas-client-lib
Quick Start
Forwarding L9 Messages
from ioc_cfn_mas_client import Client
# Initialize the CFN client
client = Client(cfn_url="http://localhost:9002")
# Construct and forward an L9 message
response = client.forward_l9_message(
message={
"header": {
"protocol": "sstp", # Always "sstp" for L9
"version": "1.0", # Protocol version
"subprotocol": "ioc", # Subprotocol identifier
"kind": "knowledge", # Message kind: intent, contingency, exchange, commit, knowledge
"subkind": "query", # Optional message subtype
"participants": {
"actors": [ # Sending agents/actors
{
"id": "agent-123",
"role": "requester"
}
],
"groups": { # Routing information
"workspace_id": "550e8400-e29b-41d4-a716-446655440000", # Target workspace UUID
"mas_id": "660e8400-e29b-41d4-a716-446655440001" # Target MAS UUID
}
}
},
"payload": {
"type": "application/json", # Payload MIME type
"data": { # Custom payload data
"query": "What are the latest system metrics?",
"context": {
"source": "monitoring-agent",
"timestamp": "2026-07-15T10:30:00Z"
}
}
}
}
)
print(f"Message forwarded successfully: {response}")
L9 Message Structure
L9 messages follow the SSTP specification and consist of two main components:
Header (Required)
protocol: Always"sstp"for L9 messagesversion: Protocol version (e.g.,"1.0")subprotocol: Subprotocol identifier (e.g.,"ioc")kind: Message type - one of:intent- Agent intentions and goalscontingency- Conditional actions and fallbacksexchange- Data exchange between agentscommit- State commitments and confirmationsknowledge- Knowledge queries and updates
subkind(optional): Additional message classificationparticipants: Routing and actor informationactors: Array of participating agents/actors withidandrolegroups: Routing groups withworkspace_idandmas_id(both UUIDs)
Payload (Required)
type: Payload MIME type (e.g.,"application/json","text/plain")data: Custom payload data (object or any JSON-serializable data)
Routing Logic
CFN routes L9 messages to Cognition Engines based on:
- Workspace ID - Identifies the workspace boundary
- MAS ID - Identifies the specific Multi-Agent System
- Message kind - Determines the type of processing required
The appropriate Cognition Engine is selected and the message is forwarded for processing.
Configuration
The Client constructor accepts:
cfn_url(required): CFN API endpoint URL (e.g.,"http://localhost:9002")timeout(optional): Request timeout in secondsconfiguration(optional): Pre-configuredConfigurationobject (advanced)api_client(optional): Pre-configuredApiClientobject (advanced)
Environment Variables
Optional environment variable:
CFN_URL: CFN API endpoint URL (defaults tohttp://localhost:9002)
Development
For development setup, OpenAPI code generation, and contribution guidelines, see docs/DEVELOPMENT.md.
API Documentation
This SDK is auto-generated from the CFN Public API OpenAPI specification. For detailed API documentation, see the upstream repository.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
uv run pytest - Submit a pull request
For more details, see docs/DEVELOPMENT.md.
License
This project is licensed under the Apache License, Version 2.0 - see the LICENSE.md file for full details.
Copyright (c) 2024-2026 Cisco Systems, Inc. and its affiliates. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Metadata
Release files for ioc-cfn-mas-client-lib 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ioc_cfn_mas_client_lib-0.3.0.tar.gz | 59.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ioc_cfn_mas_client_lib-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 208.9 kB
Release files / ioc_cfn_mas_client_lib-0.3.0.tar.gz
| Download URL | ioc_cfn_mas_client_lib-0.3.0.tar.gz |
|---|---|
| Size | 59.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4aeb76086b96ce28a3737112fefa916fca8a79ff7858a6f4327ed1386b222fbc
|
|
BLAKE2b-256 checksum How to use checksums |
cec3900b9c509e9d698648e45fed7e12da39c1803c6ebad5da549f644c21e20c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 15, 2026.
Transparency logRelease files / ioc_cfn_mas_client_lib-0.3.0-py3-none-any.whl
| Download URL | ioc_cfn_mas_client_lib-0.3.0-py3-none-any.whl |
|---|---|
| Size | 149.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4e6a067ae9f2ef8733fd3af231acc0b173d603692f8517f5280bfaea9269c781
|
|
BLAKE2b-256 checksum How to use checksums |
f8a3c017b60a9c779d0a4d6bb78d109938851bfe5c403a0fbc552cd71ff77d4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 15, 2026.
Transparency log