KINTOテクノロジーズのブログ - TECH PLAY

TECH PLAY

KINTOテクノロジーズ

KINTOテクノロジーズ の技術ブログ

全1132件

Introduction Hello. My name is Shiode, and I do payment-related backend development in the Toyota Woven City Payment Solution Development Group. As mentioned in my previous article , our group uses Kotlin for development, with Ktor as our web framework and Exposed as the ORM. We also adopt Clean Architecture in our code architecture. Initially, we used Kotlin's Result type for error handling, but as the number of developers increased, we started seeing a mix of Result and throw used in code. Mixing throw into code that uses Result defeats the purpose of expressing error handling through types, as it still requires try-catch blocks. Since Kotlin doesn't have Java's checked exceptions, it's easy to forget to call a try-catch block, which can lead to unhandled errors. To improve this situation, we discussed within the team and decided to standardize our error handling using Kotlin's Result type. In this article, I'll walk you through how our group writes error handling in practice. This article does not include the following. Explanation of Clean Architecture Explanation of Ktor and Exposed Comparison between kotlin-result and Kotlin's official Result type Application Directory Structure Before getting into the main topic, I will explain the directory structure of the application in this group. Below is the well-known diagram of Clean Architecture along with our group's directory structure. As we've adopted Clean Architecture, our application's directory structure is generally organized in line with its principles. (Source: The Clean Code Blog ) App Route/ ├── domain ├── usecase/ │ ├── inputport │ └── interactor └── adapter/ ├── web/ │ └── controller └── gateway/ ├── db └── etc The correspondence between our directory structure and the Clean Architecture diagram is as follows: domain directory: entities usecase directory: Use Cases adapter/web/controller directory: Controllers adapter/gateway directory: Gateways The terminology doesn't match exactly, but basically the domain directory sits at the core, the usecase directory surrounds it, and everything under adapter forms the outermost layer. Therefore, the allowed direction of dependency is as follows: usecase -> domain Everything under adapter -> usecase or domain This direction of dependency makes it possible to develop business logic without being affected by factors such as web frameworks or database types. Error Handling Policy Basically, our error handling is based on the following policies: Use Result type instead of throw in case of processing failure When a function returns a Result type, do not use throw When returning an exception, use a custom-defined exception type In the next section, I'll go over each of these policies in more detail, with code examples. Use the Result type When a Function May Fail Since Kotlin doesn't have checked exceptions like Java, there's no mechanism to force the caller to handle errors. By using the Result type, you can explicitly indicate that an error may be returned to the caller, reducing the chances of error handling being missed. However, in cases like Result<Unit> , where the return value isn't used, error handling cannot be enforced unless a custom lint rule is defined. But as of now, we haven't defined one yet. Code Examples Below is a simple code example. When defining a function that performs division, it typically results in an error if the denominator is zero. If a function might fail, specify Result as its return type. In this example, Result<Int> is specified. fun divide(numerator: Int, denominator: Int) : Result<Int> { if (denominator == 0) { return Result.failure(ZeroDenominatorException()) } return Result.success(numerator/denominator) } When Returning an Exception as a Result Type, Wrap the Exception in a Custom-defined Exception Repositories are defined as interfaces in the domain layer, with their implementations residing in the adapter layer. If a use case layer calls a repository function and handles errors, and the adapter layer returns a third-party library exception as is, then the use case layer must be aware of that third-party exception. In that case, the use case layer becomes dependent on the adapter layer. Here's what that looks like in a diagram: ![依存関係](/assets/blog/authors/reona-shiode/error-handling/dependency.png =400x) Interface-based Dependency and Exception-based Dependency (bad example) To avoid this, we always make sure to wrap any exception returned via Result in a custom-defined exception. One tricky point when applying Clean Architecture is deciding which layer exceptions belong to, but I personally think it should be in the domain layer. Our group uses a shared set of custom exceptions across multiple services, so we've extracted them into a separate domain library. Another tricky point with Kotlin's official Result type is that it doesn't allow you to specify the exception type, which means you can't enforce returning only custom exceptions. In cases like this, it may be worth considering the use of kotlin-result . However, we chose not to adopt it in order to avoid introducing third-party types into the domain code. Code Examples Let's say the following interface is defined in the domain layer. data class Entity(val id: String) interface EntityRepository { fun getEntityById(id: String): Result<Entity> } Now, consider a case where a third-party library exposes a method like the one shown below, and it's used as-is. fun thirdPartyMethod(id: String): Entity { throw ThirdPartyException() } Bad Example If the implementation in the adapter layer returns the exception from the third-party library directly. As shown below, this causes it to leak into the caller such as UseCase . class EntityRepositoryImpl : EntityRepository { override fun getEntityById(id: String): Result<Entity> { return kotlin.runCatching { thirdPartyMethod(id) } // This returns the third party exception } } Good Example To prevent third-party exceptions from leaking to the caller, wrap them in a custom-defined exception. class EntityRepositoryImpl : EntityRepository { override fun getEntityById(id: String): Result<Entity> { return kotlin.runCatching { thirdPartyMethod(id) }.onFailure { cause -> // wrap with our own exception CustomUnexpectedException(cause) } } } Avoid Using throw in Functions that Return Result If a function returns a Result type or throws an exception, the caller must handle both. Even if the function author thinks a particular exception doesn't need to be handled by the caller, there may be cases where the caller wants to handle it. For this reason, we have standardized on using the Result type and avoid throwing exceptions explicitly. In some cases such as database connection errors, it might seem acceptable to throw an exception from the adapter layer and let it propagate directly to the API response, since recovery at the use case level is impossible. However, for issues like failure to update the database, we may still want to log inconsistencies with third-party SaaS. In that case, if we scope out using throw, there's a risk that alerts won't be triggered appropriately. We believe it's up to the caller to decide whether error handling is necessary, so even if the function author considers it unnecessary, the exception is returned using a Result. Code Examples Let's take the save function of a repository as an example. The save function receives the entity class and returns the result as a Result<Entity> . Examples of what not to do As shown below, assume that a connection error was thrown, while other errors are returned using the Result type. class EntityRepository(val db: Database) { fun saveEntity(entity: Entity): Result<Entity> { try { db.connect() db.save(entity) } catch (e: ConnectionException) { // return result instead throw OurConnectionException(e) } catch (e: throwable) { return Result.failure(OurUnexpectedException(e)) } return Result.success(entity) } } Now, suppose the use case layer wants to take some kind of action if an error occurs during the save operation. In this case, you must use runCatching (which internally uses try-catch to convert to Result type). class UseCase(val repo: EntityRepository) { fun createNewEntity(): Result<Entity> { val entity = Entity.new() return runCatching { // need this runCatching in order to catch an exception repo.saveEntity(entity).getOrThrow() }.onFailure { // some error handling here } } } Good Example In the good example, all exceptions are wrapped in a custom-defined exception and returned using the Result type. This allows the caller to remove runCatching , simplifying the code. class EntityRepository(val db: Database) { fun saveEntity(entity: Entity): Result<Entity> { try { db.connect() db.save(entity) } catch (e: ConnectionException) { return Result.failure(OurConnectionException(e)) } catch (e: Exception) { return Result.failure(OurUnexpectedException(e)) } return Result.success(entity) } } class UseCase(val repo: EntityRepository) { fun createNewEntity(): Result<Entity> { val entity = Entity.new() return repo.saveEntity(entity).onFailure { // some error handling here } } } Useful Custom Function for Using the Result Type andThen When using a Result type, there are often times when you want to use that value of a successful Result to return a different Result type. For example, updating the status of a specific entity might look like this: fun UseCaseImpl.updataStatus(id: Id) : Result<Entity> { val entity = repository.fetchEntityById(id).getOrElse { return Result.failure(it) } val updatedEntity = entity.updateStatus().getOrElse { return Result.failure(it) } return repository.save(updatedEntity) } In such cases, writing code becomes easier when the operations can be connected by a method chain. While the kotlin-result provides the andThen function for this purpose, Kotlin's official Result type does not. Therefore, our group defined and uses the following method: inline fun <T, R> Result<T>.andThen(transform: (T) -> Result<R>): Result<R> { if (this.isSuccess) { return transform(getOrThrow()) } return Result.failure(exceptionOrNull()!!) } By using this, the previous example can be rewritten as shown below. The result is a bit cleaner, with less repetitive code. fun UseCaseImpl.updataStatus(id: Id) : Result<Entity> { return repository.fetchEntityById(id).andThen { entity -> entity.updateStatus() }.andThen { updatedEntity -> repository.save(updatedEntity) } } doInTransaction for Exposed Our group uses Exposed as the ORMapper. With Exposed, all database operations must be written within the lambda scope called transaction . If an exception is thrown within this transaction scope, it automatically performs a rollback. Since using the Result type avoids throwing exceptions, we created a function that performs a rollback automatically when the Result indicates failure. fun <T> doInTransaction(db: Database? = null, f: () -> Result<T>): Result<T> { return transaction(db) { f().onFailure { rollback() }.onSuccess { commit() } } } Applying this to the previous example of UseCaseImpl , it can be used as follows. fun UseCaseImpl.updataStatus(id: Id) : Result<Entity> { return doInTransaction { repository.fetchEntityByIdForUpdate(id).andThen { entity -> entity.updateStatus() }.andThen { updatedEntity -> repository.save(updatedEntity) } } } respondResult for Ktor Our group uses Ktor as the web framework. A function called respondResult was created to allow Result types from use cases to be returned directly as HTTP responses. suspend inline fun <reified T : Any> ApplicationCall.respondResult(code: HttpStatusCode, result: Result<T?>) { result.onSuccess { when (it) { null, is Unit -> respond(code) else -> respond(code, it) } }.onFailure { // defined below respondError(it) } } suspend fun ApplicationCall.respondError(error: Throwable) { val response = error.toErrorResponse() val json = serializer.adapter(response.javaClass).toJson(response) logger.error(json, error) respondText( text = json, contentType = ContentType.Application.Json, status = e.errType.toHttpStatusCode(), ) } Although it's simple, using this function eliminates the need to call Result.getOrThrow , making the code a bit cleaner. fun Route.route(useCase: UseCase) { val result = useCase.run() call.respondResult(HttpStatusCode.OK, result.map {it.toViewModel()} ) } By the way, respondError is a function that returns an error response from the throwable. We use this function to handle exceptions thrown in the Ktor pipeline and return appropriate responses. We've also created a custom Ktor plugin to handle exceptions. val ErrorHandler = createApplicationPlugin("ErrorHandler") { on(CallFailed) { call, cause -> call.respondError(cause) } } Conclusion I introduced how our group handles errors, along with some helpful custom functions for the Result type. From what I've seen in various tech blogs, many companies seem to use kotlin-result , while there's relatively little information out there on using Kotlin's official Result type. We've found Kotlin's official Result type to be sufficient for error handling, so we encourage you to give it a try!
Hello! My name is Mayu, and I work as a designer in the Creative Office at KINTO Technologies. I usually focus on UI/UX design for apps, but this time, I was in charge of creating novelty items to distribute at a company event. In this article, I'll share a behind-the-scenes look at the process, from planning to design. I hope this will offer some helpful insights for those involved in novelty production. Novelty Selection The theme is "something that gives a sense of unity" For this event, we aimed to create a novelty item that fosters a sense of unity. We developed ideas based on the following conditions: Creates opportunities to communicate with people you don't usually interact with. Strengthens a sense of unity. Promotes innovation. Appeals to all, regardless of age or gender. Meets the needs of multiple people. Easy for anyone to use immediately. Budget: a few hundred to around a thousand yen per person. Offers lasting value. After considering various ideas, we ultimately decided to produce a " Magnetic Card Stand " and an " Original Name Card ". Reasons for choosing the "Magnetic Card Stand" and "Name Card" Magnetic Card Stand: Placing it on the desk makes it easier to naturally engage with others, promoting communication. Featuring the KINTO Technologies logo and car shape helps foster attachment to the company and boost motivation. Its simple design makes it easy for anyone to use in daily situations. Name Card: Creating name cards with each employee's name makes it easier to approach one another even on first meetings, promoting communication across the company. The cut-off KTC lettering design visually expresses a sense of unity throughout the organization. The cards can be used as name tags during the event and placed on desks afterward for continued use. Production of Magnetic Card Stand **1. Contractor Selection and Request ** We commissioned the production of the magnetic card stand to the original goods specialty website " MOKU ." The deciding factor was MOKU's high level of customization, which made it possible to create original magnetic card stands simply by submitting design data. 2. Prototyping We created a simple paper prototype to check the size and usability. We then placed it on an actual desk to evaluate visibility and practicality. **3. Design of Magnetic Card Stand ** Using Adobe Illustrator, we created a design with the logo positioned on a specified template. The result is a simple design that highlights the KINTO Technologies logo. 4. Design of Instruction Manual To ensure ease of use, we created an original instruction manual. Here too, we used Adobe Illustrator and produced the design data based on the specified template. 5. Data Submission and Delivery The design data was submitted, and delivery was completed in about three weeks! (Order quantity: 500 pieces) Production of Name Card 1. Create a Name Card Design Using Figma, we created an original design featuring names, division, and custom Slack emojis. We made a prototype to ensure it fit properly with the magnetic card stand. The key feature is this half-cut KTC lettering . KTC stands for "KINTO Technologies." The small squares represent employees, symbolizing the idea that "each individual comes together to form KTC." With a simple, stylish black-based design, it also brings out the essence of a tech company. 2. Automatic Data Generation Creating data manually for everyone would have been overwhelming, so we enlisted our in-house engineers to help automatically generate the data in HTML. We built a system that imports employee information from a CSV file and automatically populates it into a template. 3. Printing and Cutting Printed the materials using the office printer and cut them all by hand. It was tough, but it saved a lot of money! lol Project Results and Learnings After distributing the giveaways, we received a lot of encouraging feedback from employees, such as: "It's easier to start conversations now!" "The design is so cute!" "The Slack icon makes it feel even more personal!" The giveaways helped foster a sense of unity, and the project was incredibly rewarding for me as well. This experience also reinforced the importance of not just designing something attractive, but thinking carefully about how it will actually be used. I believe we were able to showcase the true power of purpose-driven design. Finally I hope to apply what I've learned from this project to future design work. If you thought, "KINTO Technologies sounds like a fun place!" please check out our recruitment page ! Looking forward to hearing from you! Thank you for reading!
こんにちは。KINTOテクノロジーズのクリエイティブ室でデザイナーをしている桃井( @momoitter )です。 この記事では、Midjourney v7に新たに搭載された「Omni-Reference」機能を使って、オリジナルキャラクター「しぇるぱ」の見た目を統一したプロセスをご紹介します。 この記事はこんな方におすすめです Midjourney v7のOmni-Referenceについて詳しく知りたい キャラクターの一貫性を保った画像生成に挑戦したい AIツールで高クオリティなビジュアル制作をしたい 実際のプロンプトや生成画像も交えながら、Omni-Referenceの活用ポイントや調整のコツを解説していきます。 Omni-Referenceとは? 2025年5月、Midjourney v7に「Omni-Reference」という待望の機能が登場しました。 これは、特定の画像を参照しながら一貫性のあるビジュアルを維持しつつ、新しい画像を生成できる機能です。 これまでv7では難しかった「キャラクター性の維持」が可能になり、人物だけでなく物体や乗り物にも対応しています。 また、「Omni Strength(ow)」というパラメータによって、どの程度参照画像に忠実に生成するかを数値で調整できます。 「しぇるぱ」について しぇるぱとは? 2024年11月、KINTOテクノロジーズの社内イベント「超本部会」のオープニングムービーに、AIで生成されたキャラクター「しぇるぱ」が登場しました。 その後、エンジニア向けのイベントや人事採用イベントなどで、KINTOテクノロジーズを説明するナビゲーター的存在として活躍しています。 誕生のエピソードはこちら https://blog.kinto-technologies.com/posts/2025-03-07-creating_a_mascot_with_generative_AI/ なぜ見た目を統一したかったのか? しぇるぱの誕生以降、画像生成AIや動画生成AIは急速に進化しました。 その結果、当初のビジュアルはやや古さを感じさせるものになってしまいました。 ちょうどその少し後に、Midjourney v7やRunway Gen-4がリリースされ、生成クオリティが飛躍的に向上。「しぇるぱ」のビジュアルもこのタイミングでアップデートすることにしました。 アップデートの過程はこちら https://blog.kinto-technologies.com/posts/2025-06-06-ai-character-movie-making/ ただし、v7の表現力は非常に高い一方で、リリース当時は同じキャラクターの見た目を一貫して再現する機能がなく、生成するたびに微妙に顔が異なるという課題がありました。 しかもアップデートによりクオリティが上がった分、初期のしぇるぱが持っていた「キャラクターとしての親しみやすさ」が薄れてしまうという副作用も。 そんな中、2025年5月、Midjourney v7に「Omni-Reference」という新機能が追加されました。 私はこの機能を使って、元の見た目を活かしながら、v7らしい美しさとリアルさを兼ね備えた「進化したしぇるぱ」の再構築に挑戦しました。 いざ実践! ChatGPTに相談 まずはChatGPTにこう相談しました。 「Midjourney v7のOmni-Referenceに添付の画像をアップして、このピンク髪の女性のキャラクターの見た目を固定しながら、クリーンな背景を付けた正面向きの画像をMidjourneyで生成したいです。Midjourney用のプロンプトを教えてください。」 そうすると、このようなプロンプトが返ってきました。 upper body portrait of a female virtual operator in a clean futuristic interior, facing camera directly, symmetrical composition, looking straight ahead, centered, gentle expression, slightly relaxed face, subtle smile, brightly illuminated face, soft front lighting, high key lighting on the face, studio-style lighting setup, clear and vivid facial features, softly lit background, minimalistic sci-fi control room, white and silver tones, crisp details Omni-Referenceの使い方 Step1:画像をドラッグ&ドロップ 参照させたい画像を、Midjourneyのプロンプト入力欄へドラッグすると、画面上部のバーに「Omni-Reference」が表示されるので、そこにドロップ。 Step2:Omni Strength(ow)の調整 「Omni Strength」では、一貫性の強度(=元画像への忠実度)を調整できます。数値はowというパラメータで指定します。 Step3:生成開始 ChatGPTから取得したプロンプトを入力して、生成スタート! 「ow」値による変化 owが低い(例:100〜200) → 元画像とはあまり似ないが、Midjourney特有の繊細で美しい描写が得られる owが高い(例:800〜1000)→ 元画像には似るが、引っ張られすぎてMidjourneyらしさが失われてしまう。 ow100 ow200 ow400 ow600 ow800 ow1000 最適なバランスを探して 試行錯誤の末、「しぇるぱ」アップデートにはow 200〜400が最適という結論に。 このあたりの数値だと、元の面影を保ちつつもMidjourneyらしさのある美しい描写が可能でした。 ある瞬間、「これだ!」と思える1枚が現れました。 元のしぇるぱの面影を残しつつ、Midjourneyらしい美しさと繊細さもある理想のビジュアルです。 シーン展開と世界観づくり 決定画像をベースに、Omni-Referenceで構図や背景を展開していきました。 ChatGPTにも再度相談し、シーンのアイデアやMidjourney用のプロンプトを取得。 しっかりしたベースがあると、それに沿った世界観の展開もスムーズでした。 こうしてアップデートした「しぇるぱ」の新しい見た目は、会社紹介動画の冒頭にも使われています。 https://www.youtube.com/watch?v=8Df_0StDAiw 応用:社内の他コンテンツにも展開 さらに先日の社内勉強会の登壇資料でも、しぇるぱを活用。 Omni-Referenceのおかげで「似てる・似てない」を気にする手間が省け、資料やイベントビジュアルなどにもスムーズに導入できるようになりました。 実践でわかったコツ Omni-Referenceは非常に強力な機能ですが、その分「参照が強すぎる」こともあります。 服装まで自由にしたい → 顔のみの画像を添付 髪型も変えたい → 目元中心など、必要最低限の情報だけにする このように参照範囲を調整することで、顔の一貫性を保ちつつも、Midjourneyらしい自由な表現の恩恵を受けることができます。 まとめ:誰でも「しぇるぱ」を作れる時代へ Omni-Referenceの登場によって、キャラクターのビジュアルを一貫して保ちながら高クオリティなシーン展開ができるという制作環境が整いました。 これはつまり、「しぇるぱ」のような存在を、誰でも再現できる時代が来たということ。 私ひとりの中に閉じこめておくのはもったいない。 だからこそ、これからは社内の皆の創造性でしぇるぱを育てていけたらと思っています。 表現を拡張し、「しぇるぱ」をもっと羽ばたかせていきたい。 AI技術の進化とともに、「しぇるぱ」も進化を続けていきます。
EncryptedSharedPreferencesからTink + DataStoreに置き換えた話 こんにちは。Toyota Woven City Payment 開発グループの大杉です。 私たちのチームでは、 Woven by Toyota の Toyota Woven City で使用される決済システムの開発をしており、バックエンドからWebフロントエンド、そして、モバイルアプリケーションまで決済関連の機能を幅広く担当しています。 今回は公式にDeprecatedになってしまったEncryptedSharedPreferencesを実装していたAndroidアプリの置き換えをした話をまとめました。 はじめに EncryptedSharedPreferencesがv1.1.0-alpha07からDeprecatedになり、 Android KeyStoreへの置き換えが公式から推奨 されました。 ![Updates of security-crypto](/assets/blog/authors/osugi/20250616/security-crypto.png =600x) EncryptedSharedPreferencesの代替技術調査 EncryptedSharedPreferencesがDeprecatedとなったことで、永続化手段と暗号化技術の調査を始めました。 永続化手段の選定 私たちのアプリにおけるユースケースでは、設定データの保存にEncryptedSharedPreferencesを使用していただけであったので、SharedPreferencesを使用するだけでも十分ではありました。 ですが、せっかくの置き換えタイミングであったので公式推奨に則り、永続化手段として DataStore を採用しました。 暗号ライブラリの選定 こちらも前述の公式推奨の通り、 Android KeyStore を使用する方針で進めていこうとしたのですが、APIレベルによって機能の制約があるだけでなく、セキュリティレベルの高い実装(StrongBox)を使用するにはデバイスのスペックも関係するため、単純にプログラミングするだけでは想定したセキュリティレベルを担保できない可能性もありました。 今回のアプリは、MDMで管理されたデバイス上で動作する前提であり、StrongBoxにも対応しているデバイスを元々選定していたため、この制約については問題になりませんでした。 また、暗号ライブラリ調査の中で、 Tink というGoogleが提供している暗号ライブラリの存在を知りました。 Tinkのリポジトリ を見ると、マスターキーの保存にAndroid KeyStoreを利用されていることがわかります。 メンテナンスの容易さやパフォーマンスの観点でAndroid KeyStoreとTinkを比較するため、サンプル実装を行いました。 暗号ライブラリの実装比較 Android KeyStoreのStrongBoxとTEEを使用した場合とTinkを使用した場合のサンプルコードを以下にまとめています。 両者とも基本的な実装はそこまで苦労せず着手できたと感じました。 一方で、Android KeyStoreは 暗号アルゴリズムによってAndroid KeyStoreの鍵発行設定を変える必要がある 初期化ベクトル(IV)の管理が開発者依存になる 実装サンプルが少ない Tinkはこの辺りをうまくラップしてくれている良さがあります。 Android KeyStoreを使用した暗号・復号処理の実装例 class AndroidKeyStoreClient( private val useStrongKeyBox: Boolean = false ) { private val keyStoreAlias = "key_store_alias" private val KEY_STORE_PROVIDER = "AndroidKeyStore" private val keyStore by lazy { KeyStore.getInstance(KEY_STORE_PROVIDER).apply { load(null) } } private val cipher by lazy { Cipher.getInstance("AES/GCM/NoPadding") } private fun generateSecretKey(): SecretKey { val keyStore = keyStore.getEntry(keyStoreAlias, null) if (keyStore != null) { return (keyStore as KeyStore.SecretKeyEntry).secretKey } return KeyGenerator.getInstance(KeyProperties.KEY_ALGORITHM_AES, KEY_STORE_PROVIDER) .apply { init( KeyGenParameterSpec.Builder( keyStoreAlias, KeyProperties.PURPOSE_ENCRYPT or KeyProperties.PURPOSE_DECRYPT ).setBlockModes(KeyProperties.BLOCK_MODE_GCM) .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE) .setIsStrongBoxBacked(useStrongKeyBox) .setKeySize(256) .build() ) }.generateKey() } fun encrypt(inputByteArray: ByteArray): Result<String> { return runCatching { val secretKey = generateSecretKey().getOrThrow() cipher.init(Cipher.ENCRYPT_MODE, secretKey) val encryptedData = cipher.doFinal(inputByteArray) cipher.iv.joinToString("|") + ":iv:" + encryptedData.joinToString("|") } } fun decrypt(inputEncryptedString: String): Result<ByteArray> { return runCatching { val (ivString, encryptedString) = inputEncryptedString.split(":iv:", limit = 2) val iv = ivString.split("|").map { it.toByte() }.toByteArray() val encryptedData = encryptedString.split("|").map { it.toByte() }.toByteArray() val secretKey = generateSecretKey() val gcmParameterSpec = GCMParameterSpec(128, iv) cipher.init(Cipher.DECRYPT_MODE, secretKey, gcmParameterSpec) cipher.doFinal(encryptedData) } } } Tinkを使用した暗号・復号処理の実装例 class TinkClient( context: Context ) { val keysetName = "key_set" val prefFileName = "pref_file" val packageName = context.packageName var aead: Aead init { AeadConfig.register() aead = buildAead(context) } private fun buildAead(context: Context): Aead { return AndroidKeysetManager.Builder() .withKeyTemplate(KeyTemplates.get("AES256_GCM")) .withSharedPref( context, "$packageName.$keysetName", "$packageName.$prefFileName" ) .withMasterKeyUri("android-keystore://tink_master_key") .build() .keysetHandle .getPrimitive(RegistryConfiguration.get(), Aead::class.java) } fun encrypt(inputByteArray: ByteArray): Result<String> { return runCatching { val encrypted = aead.encrypt(inputByteArray, null) Base64.getEncoder().encodeToString(encrypted) } } fun decrypt(inputEncryptedString: String): Result<ByteArray> { return runCatching { val encrypted = Base64.getDecoder().decode(inputEncryptedString) aead.decrypt(encrypted, null) } } } 暗号ライブラリのパフォーマンス検証 Android KeyStoreとTinkの暗号化処理時間のベンチマークを計測しました。 Android KeyStoreについては、 StrongBox と TEE の2つの実行基盤を利用したケースで評価しています。 テストコードでは、共通の暗号化アルゴリズム(AES_GCM)を設定し、10KBのデータを繰り返し暗号化する処理を Microbenchmark を使用して計測しました。Microbenchmarkを使用することで、Google Pixel Tabletの実機上でかつUIスレッド以外のスレッドを利用して計測を行っています。 テストコードは以下です。 import androidx.benchmark.junit4.BenchmarkRule import androidx.benchmark.junit4.measureRepeated import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.platform.app.InstrumentationRegistry import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith @RunWith(AndroidJUnit4::class) class ExampleBenchmark { @get:Rule val benchmarkRule = BenchmarkRule() @Test fun benchmarkTinkEncrypt() { val context = InstrumentationRegistry.getInstrumentation().context val client = TinkClient(context) val plainText = ByteArray(1024 * 10) benchmarkRule.measureRepeated { client.encrypt(plainText).getOrThrow() } } @Test fun benchmarkStrongBoxEncrypt() { val context = InstrumentationRegistry.getInstrumentation().context val client = AndroidKeyStoreClient(context, true) val plainText = ByteArray(1024 * 10) benchmarkRule.measureRepeated { client.encrypt(plainText).getOrThrow() } } @Test fun benchmarkTeeEncrypt() { val context = InstrumentationRegistry.getInstrumentation().context val client = AndroidKeyStoreClient(context, false) val plainText = ByteArray(1024 * 10) benchmarkRule.measureRepeated { client.encrypt(plainText).getOrThrow() } } } 以下に計測結果をまとめました。 暗号化基盤 平均処暗号理時間 (ms) アロケーション数 Android KeyStore (StrongBox) 209 4646 Android KeyStore (TEE) 7.07 4786 Tink 0.573 38 Android KeyStore (StrongBox)およびAndroid KeyStore (TEE)ではハードウェアへのアクセスが発生するため、ソフトウェア側で暗号化処理を行っているTinkと比べてかなり処理に時間がかかっていることがわかります。 今回採用したデバイスはAndroidの中でも比較的スペックが高いものですが、特にAndroid KeyStore (StrongBox)を採用する場合は、UXの検討が必要になりそうです。 備考 ちなみに、実際にAndroid KeyStoreの鍵生成で適用されている実行基盤は以下のコードから判別できます。 val secretKey = generateSecretKey() val kf = SecretKeyFactory.getInstance(KeyProperties.KEY_ALGORITHM_AES, KEY_STORE_PROVIDER) val ki = kf.getKeySpec(secretKey, KeyInfo::class.java) as KeyInfo val securityLevelString = when (ki.securityLevel) { KeyProperties.SECURITY_LEVEL_STRONGBOX -> "STRONGBOX" KeyProperties.SECURITY_LEVEL_TRUSTED_ENVIRONMENT -> "TEE" KeyProperties.SECURITY_LEVEL_SOFTWARE -> "SOFTWARE" else -> "UNKNOWN" } Log.d("KeyStoreSecurityLevel", "Security Level: ${ki.securityLevel}") まとめ EncryptedSharedPreferencesがDeprecatedとなったため、移植先の技術選定を行いました。 公式推奨に則り、永続化手段としてDataStoreを採用しました。 暗号化技術に関してはAndroid KeyStoreとTinkの比較検証を行い、Tinkの方が鍵の発行や暗号化処理が抽象化されていて利用しやすく、また、処理速度も優れていることがわかり、セキュリティ要件としても十分であるためTinkを採用することにしました。 Android KeyStoreを採用する場合は、動作環境のデバイススペックも考慮した実装が求められるため、セキュリティ要件とのバランスを考慮する必要がありそうです。
はじめに こんにちは、KINTO テクノロジーズ Security CoE グループの多田です。普段は大阪のオフィスで勤務しています。我々のグループでは、マルチクラウド環境の「ガードレール監視とカイゼン活動をリアルタイムで実施する」をミッションに、クラウドセキュリティに関する多くのことにチャレンジしています。メンバが日々、どのような活動を実施しているかは、 こちらのブログ にもまとめていますので、ぜひご覧ください。 背景 世間の LLM ( 大規模言語モデル ) アプリケーション開発の流れに乗り、当社のプロダクトチームでは、多くの LLM アプリケーションを開発しており、PoC やプロダクトレディの状態に進展しています。一方で、クラウドセキュリティを監視するグループとしては、これらのアプリケーションのセキュリティについても適切な対策を講じる必要があります。 当社の LLM アプリケーションは、主に AWS、Google Cloud、Azure 上で開発されており、クラウドベンダーが提供する生成 AI サービスを活用して構築されることが多い状況です。当グループでは Cloud Security Posture Management ( CSPM ) の監視および運用を行っています。しかし、現時点では、生成 AI 関連サービスに特化した CSPM のコントロールは提供されていないのが現状です。例えば、AWS の場合、AWS Foundational Security Best Practices ( FSBP ) や Center for Internet Security ( CIS ) では、生成 AI サービスに関する直接的なコントロールが提供されていません。 そこで当グループでは、各クラウドベンダーの生成 AI サービスを利用して LLM アプリケーションを開発する際に遵守すべきガイドラインを策定しました。このガイドラインには、クラウドベンダーが提供する生成 AI 関連サービスの利用推奨や設定方法についても記載しています。言い換えれば、ガイドラインに記載した設定方法は、CSPM として監視すべきコントロールとなります。さらに、コントロールを Rego 言語 で実装し、AWS Bedrock の CSPM として運用を行っています。 タイトルにある、 AI-SPM は、AI Security Posture Management の略で、「 AI や機械学習 ( ML ) 、生成 AI モデルなどの AI 関連資産のセキュリティリスクやコンプライアンスリスクを可視化・管理・軽減するためのソリューション」というような定義がされているようなので、今回の取組みについても、あえて、AI-SPM という名前にしてみました。 LLM アプリケーションで遵守すべきセキュリティガイドライン ガイドラインを作成するにあたっては、 OWASP Top 10 for LLM Applications 2025 を参考にしました。おそらく、LLM アプリケーションのセキュリティを語るうえでは、最早、鉄板ともいうべき資料かと思います。この OWASP の資料では、LLM アプリケーションでよく見られる最も重大な脆弱性 Top 10 がリストされており、「概要」「脆弱性の例」「防御や軽減策」「攻撃シナリオ」などが記載されています。これらの内容を基に、各クラウドサービスで LLM アプリケーションを開発する場合、利用するサービス、機能の選定やベストプラクティスについて検討を行いました。 Top 10 の最初に記載のあるリスクは「 LLM01:Prompt Injection 」です。 このリスクは、 悪意ある入力によって LLM の振る舞いが意図せず操作され、情報漏洩や不正な動作を引き起こすリスク です。このリスクの予防・緩和策としては、 LLM への入力の検証・フィルタリング が有効となります。 そして、この予防・緩和策をクラウドサービス上で実装する場合にどうすべきかというと、AWS であれば、 Amazon Bedrock Guardrails に Prompt Attack をフィルタする機能があるので、この機能を有効化することが対策となります。あとは、CSPM のコントロールとして、この機能が有効化されているかどうかをチェックすることで、可視化とカイゼンが実施できるようになります。 以下に、Top 10 の中の代表的なリスクと AWS サービスでの「予防・緩和策」と「 CSPM コントロールとしての実装」をまとめますので参考にしてください。 Top 10 リスク概要 予防・緩和策 AWSでの実装 CSPM コントロールの実装 LLM01: Prompt Injection 悪意ある入力 ( プロンプト ) によって LLM の振る舞いが意図せず操作され、情報漏洩や不正な動作を引き起こすリスク モデル動作の制約、入力・出力の検証、フィルタリング、権限制御、人間の承認導入など Amazon Bedrock Guardrails の content filters「Prompt attacks」を利用する Amazon Bedrock Guardrails の Prompt attacks Configure prompt attacks filter を有効化 し、 Block アクション かつ 閾値が HIGH に設定されていることを確認する LLM02: Sensitive Information Disclosure モデルの応答や挙動から、個人情報や機密データなどのセンシティブな情報が漏洩するリスク 出力の検証・フィルタ、学習データの管理、アクセス制御 Amazon Bedrock Guardrails の「sensitive information filters」を利用する Amazon Bedrock Guardrails Sensitive information filters が Output で 有効化 されていることを確認する LLM06: Excessive Agency LLM やそのエージェントに過剰な自律性や権限を与えることで、意図しない行動や操作が発生するリスク 最小権限の徹底、人間の承認、権限監査 Amazon Bedrock Builder tools の「Agent」を利用する Amazon Bedrock Builder tools の Agents を利用する場合は、 Guardrail details が 関連付けられている ことを確認する LLM09: Misinformation LLM が誤情報やバイアスを含む出力を生成し、ユーザーや社会に悪影響を及ぼすリスク 多様かつ信頼性のあるデータで学習、ファクトチェック、出典表示 Amazon Bedrock Guardrails の「contextual grounding check」を利用する Amazon Bedrock Guardrail の contextual grounding check が 有効化 されていることを確認する LLM10: Unbounded Consumption LLM のリソース消費が制御されず、DoS やコスト増大、サービス停止などを招くリスク、リクエストや計算資源の無制限利用が原因 リソース制限、クォータ設定、利用状況の監視 Amazon Bedrock 「Model invocation logging」を利用する Amazon Bedrock の Model invocation logging が 有効 になっていることを確認する 上記の内容については、5 月に実施した共催イベント Cloud Security Night #2 で登壇していますので、 こちらの資料 も参考していただければと思います。 Rego による CSPM コントロールの実装 CSPM のコントロールの定義はできたので、コントロールの内容をチェックする仕組みを開発していきます。当グループでは、CSPM の運用に、AWS であれば、Security Hub、Google Cloud であれば、 Sysdig 、Azure であれば Defender for Cloud を利用しています。もちろん、統合したツールを使う方が良いのでしょうが、コンソールをゴリゴリ使うというよりは、それぞれ、API 等を通じて、CSPM のアラート状況を確認し、必要に応じてSlack 通知するなどしていますので、ツールが統合されてないことに不自由は感じていません。 LLM アプリケーションの CSPM コントロールについては、Sysdig の CSPM 機能で利用されている Rego で開発することにしました。Rego を採用した理由は、OSS であることと CSPM のようなクラウドインフラの設定の判定ロジックを記載するのであれば、それほど学習コストも必要なく開発できると思ったからです。 以下が LLM01:Prompt Injection コントロールを Rego で実装したものになります。やってることは、 risky == true ( リスクあり ) をデフォルト値に設定し、Bedrock Guardrails の設定 ContentPolicy.Filters の値が Type == PROMPT_ATTACK と InputStrength==HIGH であれば、 Prompt attack が有効化され、閾値が High に設定されているとして、 risky == false とし、リスクなしと判断しています。 default risky := true risky := false if { some filter in input.ContentPolicy.Filters lower(filter.Type) == "prompt_attack" lower(filter.InputStrength) == "high" } この Rego を Sysdig のカスタムコントロールとして、Sysdig にデプロイする必要があります。詳細なカスタムコントロールの作成方法やデプロイ手順については、Sysdig 公式ブログで紹介されていますので、 こちら を参考にしてください。我々もこちらを参考にすることで開発を進めました。本ブログに記載していませんが、カスタムコントロールを作成するにあたっての多くのノウハウも貯まりました。 カスタムコントロールは、Sysdig に terraform としてデプロイする必要があります。以下が最終的に作成したカスタムコントロールの main.tf になります。 terraform { required_providers { sysdig = { source = "sysdiglabs/sysdig" version = ">=0.5" } } } variable "sysdig_secure_api_token" { description = "Sysdig Secure API Token" type = string } provider "sysdig" { sysdig_secure_url="https://app.us4.sysdig.com" sysdig_secure_api_token = var.sysdig_secure_api_token } resource "sysdig_secure_posture_control" "configure_prompt_attack_strength_for_amazon_bedrock_guardrails" { name = "Configure Prompt Attack Strength for Amazon Bedrock Guardrails" description = "Ensure that prompt attack strength is set to HIGH for your Amazon Bedrock guardrails. Setting prompt attack strength to HIGH in guardrails helps protect against malicious inputs designed to bypass safety measures and generate harmful content." resource_kind = "AWS_BEDROCK_GUARDRAIL" severity = "High" rego = <<-EOF package sysdig import future.keywords.if import future.keywords.in default risky := true risky := false if { some filter in input.ContentPolicy.Filters lower(filter.Type) == "prompt_attack" lower(filter.InputStrength) == "high" } EOF remediation_details = <<-EOF ## Remediation Impact This control will help you ensure that your Amazon Bedrock guardrails are configured with high prompt attack strength, which is crucial for protecting against malicious inputs designed to bypass safety measures and generate harmful content. ## Remediation Steps 1. Navigate to the [Amazon Bedrock console](https://console.aws.amazon.com/bedrock/home). 2. Select the guardrail you want to modify. 3. In the guardrail settings, locate the "Content Policy" section. 4. Ensure that the "Prompt Attack" filter is set to "High" for the "Input Strength". 5. Save the changes to the guardrail configuration. 6. Repeat this process for any other guardrails in your AWS environment. ## Remediate Using Command Line You can use the AWS CLI to update the guardrail configuration. Run the following command to set the prompt attack strength to HIGH for a specific guardrail: ```bash aws bedrock update-guardrail --guardrail-id <guardrail-id> --content-policy '{"Filters": [{"Type": "prompt_attack", "InputStrength": "high"}]}' ``` Replace `<guardrail-id>` with the ID of your guardrail. Repeat this command for other guardrails in your AWS environment. ## Additional Information For more information on configuring Amazon Bedrock guardrails, refer to the [Amazon Bedrock documentation](https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html). ## Contact Information Slack Channel: #security-coe-group EOF } 実は当初、Sysdig は、CSPM の対象リソースとして Amazon Bedrock をサポートしていませんでした。Sysdig に相談したところ、ものすごい速さで対応いただき、今回の取組みに繋がりました。機能的な部分の満足度もありますが、この辺りのスピード感は、Sysdig ユーザとして非常に心強いです。 あとは、同じ要領で、 LLM アプリケーションで遵守すべきセキュリティガイドライン に記載したコントロールをいくつか Rego で実装し、Sysdig にデプロイしています。 Sysdig による AI-SPM 運用 デプロイしたいくつかのカスタムコントロールは、カスタムポリシーとして定義し、AWS Bedrock リソースを可視化しています。可視化の結果、問題があれば、カイゼンするという運用になります。当社の場合、当グループからプロダクト開発グループに対して、カイゼン依頼を行いますが、その時に、カイゼン方法と合わせて、カイゼン依頼をするようにしています。 下の画面は、Sysdig コンソール画面で、 LLM01:Prompt Injection の CSPM コントロールを確認している画面となります。コントロール名は、 Configure Prompt Attack Strength for Amazon Bedrock Guardrails です。名前は、それっぽく、こちらで付けています。状況としては、AWS Bedrock Guardrail のリソースが 3 つ存在し、1 つが Failling 、残り 2 つが Passing していることを示しています。 上記画面をドリルダウンすることで、カイゼンの影響やカイゼン方法などを参照することができます。こちらの内容も main.tf に記載した内容が反映されています。 ただ、実際の運用では、Sysdig コンソール画面にアクセスすることはそれほどなく、アラートの確認等はSysdig API を経由して確認するようにしています。 まとめ 今回は、LLM アプリケーションのセキュリティ対策として、Amazon Bedrock の 設定のチェックロジックを Rego で開発し、Sysdig で運用する方法についてご紹介しました。ガイドラインでは、Amazon Bedrock だけでなく、Azure AI Foundry や Google Cloud Vertex AI も整理しているため、今後は、同様に Rego の開発、Sysdig による運用を進めていきます。 また、従来の CSPM に加え、AI-SPM では、クラウドインフラ全体のセキュリティに留まらず、AI 固有の課題やデータ資産の保護など、従来の CSPM ではカバーしきれない領域にも取り組む必要があります。AI 技術は急速に進化しており、最近では MCP や A2A などの新しい概念が登場しています。これらの進展に対応したセキュリティ対策を推進していくことも重要です。 今後も新しい技術や課題に追随しながら、AI アプリケーションのセキュリティを強化する取り組みを続けていきます。 さいごに Security CoE グループでは、一緒に働いてくれる仲間を募集しています。クラウドセキュリティの実務経験がある方も、経験はないけれど興味がある方も大歓迎です。お気軽にお問い合わせください。 詳しくは、 こちらをご確認ください。
こんにちは。KINTOテクノロジーズのクリエイティブ室でデザイナーをしている桃井( @momoitter )です。 この記事では、Midjourney v7に新たに搭載された「Omni-Reference」機能を使って、オリジナルキャラクターの見た目を統一したプロセスをご紹介します。 この記事はこんな方におすすめです Midjourney v7のOmni-Referenceについて詳しく知りたい キャラクターの一貫性を保った画像生成に挑戦したい AIツールで高クオリティなビジュアル制作をしたい 実際のプロンプトや生成画像も交えながら、Omni-Referenceの活用ポイントや調整のコツを解説していきます。 Omni-Referenceとは? 2025年5月、Midjourney v7に「Omni-Reference」という待望の機能が登場しました。 これは、特定の画像を参照しながら一貫性のあるビジュアルを維持しつつ、新しい画像を生成できる機能です。 これまでv7では難しかった「キャラクター性の維持」が可能になり、人物だけでなく物体や乗り物にも対応しています。 また、「Omni Strength(ow)」というパラメータによって、どの程度参照画像に忠実に生成するかを数値で調整できます。 「社内向け生成AIツール」について 社内向け生成AIツールとは? 2024年11月、KINTOテクノロジーズの社内イベント「超本部会」のオープニングムービーに、AIで生成されたキャラクターが登場しました。 その後、エンジニア向けのイベントや人事採用イベントなどで、KINTOテクノロジーズを説明するナビゲーター的存在として活躍しています。 誕生のエピソードはこちら https://blog.kinto-technologies.com/posts/2025-03-07-creating_a_mascot_with_generative_AI/ なぜ見た目を統一したかったのか? キャラクターの誕生以降、画像生成AIや動画生成AIは急速に進化しました。 その結果、当初のビジュアルはやや古さを感じさせるものになってしまいました。 ちょうどその少し後に、Midjourney v7やRunway Gen-4がリリースされ、生成クオリティが飛躍的に向上。オリジナルキャラクターのビジュアルもこのタイミングでアップデートすることにしました。 アップデートの過程はこちら https://blog.kinto-technologies.com/posts/2025-06-06-ai-character-movie-making/ ただし、v7の表現力は非常に高い一方で、リリース当時は同じキャラクターの見た目を一貫して再現する機能がなく、生成するたびに微妙に顔が異なるという課題がありました。 しかもアップデートによりクオリティが上がった分、初期のオリジナルキャラクターが持っていた「キャラクターとしての親しみやすさ」が薄れてしまうという副作用も。 そんな中、2025年5月、Midjourney v7に「Omni-Reference」という新機能が追加されました。 私はこの機能を使って、元の見た目を活かしながら、v7らしい美しさとリアルさを兼ね備えた「進化したキャラクター」の再構築に挑戦しました。 いざ実践! ChatGPTに相談 まずはChatGPTにこう相談しました。 「Midjourney v7のOmni-Referenceに添付の画像をアップして、このピンク髪の女性のキャラクターの見た目を固定しながら、クリーンな背景を付けた正面向きの画像をMidjourneyで生成したいです。Midjourney用のプロンプトを教えてください。」 そうすると、このようなプロンプトが返ってきました。 upper body portrait of a female virtual operator in a clean futuristic interior, facing camera directly, symmetrical composition, looking straight ahead, centered, gentle expression, slightly relaxed face, subtle smile, brightly illuminated face, soft front lighting, high key lighting on the face, studio-style lighting setup, clear and vivid facial features, softly lit background, minimalistic sci-fi control room, white and silver tones, crisp details Omni-Referenceの使い方 Step1:画像をドラッグ&ドロップ 参照させたい画像を、Midjourneyのプロンプト入力欄へドラッグすると、画面上部のバーに「Omni-Reference」が表示されるので、そこにドロップ。 Step2:Omni Strength(ow)の調整 「Omni Strength」では、一貫性の強度(=元画像への忠実度)を調整できます。数値はowというパラメータで指定します。 Step3:生成開始 ChatGPTから取得したプロンプトを入力して、生成スタート! 「ow」値による変化 owが低い(例:100〜200) → 元画像とはあまり似ないが、Midjourney特有の繊細で美しい描写が得られる owが高い(例:800〜1000)→ 元画像には似るが、引っ張られすぎてMidjourneyらしさが失われてしまう。 ow100 ow200 ow400 ow600 ow800 ow1000 最適なバランスを探して 試行錯誤の末、アップデートにはow 200〜400が最適という結論に。 このあたりの数値だと、元の面影を保ちつつもMidjourneyらしさのある美しい描写が可能でした。 ある瞬間、「これだ!」と思える1枚が現れました。 元のキャラクターの面影を残しつつ、Midjourneyらしい美しさと繊細さもある理想のビジュアルです。 シーン展開と世界観づくり 決定画像をベースに、Omni-Referenceで構図や背景を展開していきました。 ChatGPTにも再度相談し、シーンのアイデアやMidjourney用のプロンプトを取得。 しっかりしたベースがあると、それに沿った世界観の展開もスムーズでした。 こうしてアップデートした新しい見た目は、会社紹介動画の冒頭にも使われています。 https://www.youtube.com/watch?v=8Df_0StDAiw 応用:社内の他コンテンツにも展開 さらに先日の社内勉強会の登壇資料でも、オリジナルキャラクターを活用。 Omni-Referenceのおかげで「似てる・似てない」を気にする手間が省け、資料やイベントビジュアルなどにもスムーズに導入できるようになりました。 実践でわかったコツ Omni-Referenceは非常に強力な機能ですが、その分「参照が強すぎる」こともあります。 服装まで自由にしたい → 顔のみの画像を添付 髪型も変えたい → 目元中心など、必要最低限の情報だけにする このように参照範囲を調整することで、顔の一貫性を保ちつつも、Midjourneyらしい自由な表現の恩恵を受けることができます。 まとめ:誰でもオリジナルキャラクターを作れる時代へ Omni-Referenceの登場によって、キャラクターのビジュアルを一貫して保ちながら高クオリティなシーン展開ができるという制作環境が整いました。 これはつまり、オリジナルキャラクターのような存在を、誰でも再現できる時代が来たということ。 私ひとりの中に閉じこめておくのはもったいない。 だからこそ、これからは社内の皆の創造性でキャラクターを育てていけたらと思っています。 表現を拡張し、オリジナルキャラクターをもっと羽ばたかせていきたい。 AI技術の進化とともに、進化を続けていきます。
Presentation Report by Oka (okapi) On February 20, 2025, I had the chance to speak at the " Appium Meetup Tokyo ." Here are the slides I presented: Guidelines and Practices for Efficient App Automation( https://speakerdeck.com/kintotechdev/xiao-lu-de-naapurizi-dong-hua-notamenogaidoraintoshi-jian-fang-fa ). Feel free to take a look! Background of Appium Meetup Tokyo Our newly developed apps have been showing a higher bug rate compared to our web services (sometimes nearly 10 times higher) ↓ Since the testing workload was so heavy, automating app testing became a must. ↓ Automation work started with Appium. ↓ Finding good places to learn about Appium wasn't easy. ↓ Then, Why not just host our own events? And that led me to this talk! Things I Paid Attention to in the Presentation Our company has many development engineers who are familiar with QA processes, which makes collaboration smoother and helps us work together more effectively to improve quality. To emphasize this point, I mainly talked about how our QA and development teams collaborate to build apps that are easy to automate ." I also made sure the slides were easy to follow, even for those new to Appium, which led to a lively Q&A with 14 questions, 7 online and 7 offline! Sample Questions Here's a step-by-step guide to logging in to the KINTO Kantan Moushikomi App (KINTO Easy Application App). Q1. When working with development and QA, how do you assign IDs on pages with many similar elements? For example, on the screen you showed in your slides a layout with multiple car models displayed. How do you handle such cases? A1. An ID is assigned per object and screen name, making sure each one is unique. On pages with multiple car models, we assign IDs according to the specifications document the development team uses for car information. Q2. Do you define separate IDs for iOS and Android? A2. For the IDs used in Appium, we always set a shared ID that works across both iOS and Android. Reflections on the Presentation Although this was my first time presenting externally, practicing beforehand at an internal joint study session really helped me feel fully prepared and deliver the talk smoothly. For anyone new to public speaking like we were, I definitely recommend starting by practicing with people around you or inside your company first. Here's a photo from my practice session. ↓ Looking Ahead Since there are very few places to learn about Appium in Japan, we're planning to keep sharing our insights and experiences through "Appium Meetup Tokyo" ( https://autifyjapan.connpass.com/event/342867/ ) to help build a supportive community! Presentation Report by Pann Nu Wai This time I'd like to share about my Appium efforts. Background of Appium Meetup Tokyo Hi, I'm Pann Nu Wai, primarily working on in-house test automation. To help expand the use of Appium, I've been involved in various initiatives, one of which was giving a talk at an internal study session. I took this opportunity to share how our team is advancing test automation. After refining the content based on the joint study session, I was able to present it at Appium Meetup Tokyo. Things I Paid Attention to in the Presentation I explained the four steps that our team took to use Appium to automate mobile app testing. The documentation is designed so that even non-automation engineers can understand the source code simply by reading the test specifications, covering everything from spec writing to test performance. Reflections on the Presentation As a non-native Japanese speaker, pronunciation was a challenge. But after practicing many times, the talk went smoothly. I also got great feedback and had a truly rewarding experience. Here's a photo from my practice session. ↓ Looking Ahead I also hope to continue sharing Appium-related insights beyond our company. By communicating our internal efforts to the public, I hope to exchange knowledge and experience with more people and help advance the field of test automation. I'll keep working to improve my presentation content for future sessions to provide even more value. I appreciate your continued support! Conclusion This article is a report on our presentations at Appium Meetup Tokyo. I've also written one on the first event ( https://blog.kinto-technologies.com/posts/2025-02-20-Appium-Meetup-Tokyo-開催レポート/ ) — feel free to check it out as well!
「こんな世界観の映像、作ってみたいな…」 そう思ったとき、皆さんならどうしますか? 私は迷わず、ChatGPTに丸投げしました。 こんにちは。KINTOテクノロジーズのクリエイティブ室でデザイナーをしている桃井( @momoitter )です。 この記事では、ChatGPT、Midjourney、RunwayなどのAIツールを駆使して、「しぇるぱ」というピンク髪のバーチャルキャラクターの映像を、ほぼ会話だけで形にしていった過程をまとめています。 専門的なスキルや時間がなくても、「こんな映像を作ってみたい」というアイデアさえあれば大丈夫。 AIと一緒に、そのイメージを少しずつかたちにしていくプロセスを体験してみたい方に向けて書きました。 まずは完成した映像をご覧ください。 https://www.youtube.com/watch?v=GH9CdNqTyHQ きっかけは、1体のキャラクターの“リニューアル” この「しぇるぱ」というキャラクターは、もともと2024年11月の社内イベント「超本部会」のために誕生したものでした。 制作過程はこちらの記事をご覧ください。 https://blog.kinto-technologies.com/posts/2025-03-07-creating_a_mascot_with_generative_AI/ 当時としては最先端のAI技術を使い、社内でも注目を集めたキャラクターでした。 ……が、あれからわずか4ヶ月。画像生成AIや動画生成AIはさらに進化し、当時「すごい!」と思っていた表現が、いま見ると少し古く感じてしまうように。 そこで、「せっかくなら最新の技術で、このキャラの世界をアップグレードしよう」と思い立ち、ChatGPTと一緒に再構築を始めることにしました。 Step1 世界観の共有と画像生成 まず最初に行ったのは、キャラクターとその世界観の共有です。 もともと生成していた「しぇるぱ」の画像をChatGPTにアップロードし、こう伝えました。 このキャラクターは少し前の画像生成AI技術で作られたため、見た目をアップデートしたいです。 彼女には「バーチャルオペレーター」という設定があります。 その設定をもとに世界観を膨らませ、Midjourney v7で表現できるようなシーンのバリエーションとプロンプトを提案してください。 Midjourneyを選んだ理由は、v7にアップデートされて以降、キャラクター描写の精度や質感が大きく向上したと感じていたからです。 今回のように、既存キャラの見た目をアップグレードしたい場面にぴったりだと思いました。 するとすぐに、「その世界観なら、こういうシーンはどうでしょう?」といった具体的なシチュエーション案と、それに対応するプロンプトが次々と返ってきました。 まるで映像監督とのブレストをしているような感覚です。 試しにそのプロンプトをMidjourneyに入力してみたところ、 自分の想像をはるかに超えるビジュアルが次々と生成され、その表現力に驚かされました。 この映像を作り始めた当初は、Midjourney v7に「Omni-Reference」のようなキャラクターの一貫性を保つ機能がまだ搭載されていませんでした。 そのため、「ピンク髪のショートヘア」という分かりやすい特徴を意識的にプロンプトへ含めることで、「一貫性があるように見せる」工夫をしていました。 もしイメージと違うものが出てきても、 「もう少し顔に寄って」「背景を明るくクリーンな雰囲気に」などとChatGPTに伝えるだけで、再調整されたプロンプトを即座に出力してくれます。 Step2 画像から動画生成へ 気に入った画像が生成できたら、次はそれをChatGPTに添付し、以下のように依頼します。 この画像は提案していただいた〇〇のシーンのプロンプトをMidjourneyで生成した画像です。 この画像をRunwayのGen-4のキーフレーム機能のファーストフレームとして設定し、動画を生成したいです。 よりこのシーンが魅力的になるような、動きを加えたプロンプトを生成してください。 ChatGPTは画像の内容を読み取った上で、その魅力を最大化するRunway用プロンプトを作成してくれます。 Runwayを使った理由は、バージョンがGen-4へと進化したことによって、Midjourneyの高精細なビジュアルの魅力を損なわずに動画化できると感じたからです。 Runway Gen-4のimage to videoにMidjourneyで生成した画像をアップ。 ChatGPTが出力したプロンプトを貼り付けると、画像の世界観を最大限に引き出す高クオリティな映像が生成されました。 キャラクターやカメラの動きのイメージが違った場合も、 ChatGPTに「生成された動画はこうなっていたので、ここをこう変えてほしい」と伝えるだけで、プロンプトを再提案してくれます。 Step3 BGM選定もChatGPTと一緒に 映像のBGMを探すときも、ChatGPTが大活躍。 この世界観に合うBGMをAdobe Stockでどのようなキーワードで探せばいいですか? と聞くと、「futuristic」「sci-fi」「cyberpunk」など、雰囲気に合ったワードをいくつも提案してくれました。 Step4 編集して完成 生成した動画とBGMをPremiere Proでつなぎ合わせ、構成・長さ・テンポ感を調整します。 シーンの切り替えにフェードイン・アウトを加えたり、音の入り方に緩急をつけたりすることで、映像全体の完成度がグッと高まります。 Midjourneyで作成した静止画と、Runwayで生まれた滑らかな動きが合わさることで、 静止画だけでは伝わりきらなかった「息づかい」や「空気感」が加わり、しぇるぱの世界観が一段とリアルに感じられるイメージビデオが完成しました。 https://www.youtube.com/watch?v=GH9CdNqTyHQ AIと一緒に、想像をかたちにするということ 今回のプロセスで一番感じたのは、 自分の頭の中の曖昧なイメージを、ChatGPTがどんどん「言語化&具現化」してくれること。 Midjourneyでも、Runwayでも、「ちょっと違う」「もっとこう」と伝えるだけで、理想の表現に近づいていく実感がありました。 AIと一緒に進めることで、創造の幅が大きく広がることを実感できるはずです。 ぜひ一度、体験してみてください。
Self-Introduction My name is Morino, and I work at KINTO Technologies, mainly in product security and security governance. I'm a fan of RB Omiya Ardija and Chiikawa. For the past 10 years, I've been involved in cybersecurity and information security. Prior to that, I spent many years as a web application engineer, focusing on the development and operation of web performance measurement systems and front-end platforms for e-commerce sites. In this article, I’d like to share our Kaizen efforts related to the Vulnerability Disclosure Program (VDP). What is the Vulnerability Disclosure Program (VDP)? The VDP is a system that enables companies and organizations to receive vulnerability reports from external security researchers and white hat hackers. Public awareness grew in October 2023 when Rakuten Group placed a "security.txt" on a public server and launched its VDP. Reference: Rakuten places text on public server — "security.txt" to help improve security (in Japanese) What is security.txt? Published as RFC 9116 in April 2022, security.txt: A File Format to Aid in Security Vulnerability Disclosure helps standardize how companies and organizations share vulnerability reporting information, making it easier for security researchers to report issues. We also published our own security.txt in November 2023. Reactions After Installing security.txt Most inquiries were about whether we offer rewards (we don't), and many reports didn't clearly indicate whether they actually involved vulnerabilities in KINTO/KTC. A White Hat Hacker Reported a Vulnerability! In August 2024, we received a report about a vulnerability in our service. After reviewing the report within our team, we confirmed the issue was real and asked the development team to fix it. Kaizen for Our VDP Although we recognized the value of the VDP, we identified several issues. As a result, we started using the VDP service offered by IssueHunt in November 2024. Clarify VDP guidelines, including whether a bounty is offered Specify which web services and applications are covered Provide a report template As of March 7, 2025, we've received six reports; two of which involved vulnerabilities that required action and have been fixed. Honestly, I'm surprised at the results, which exceeded my expectations. Our company is featured as a case study on the IssueHunt website. Please have a look if you're interested. A fresh perspective on boosting security! VDP success story in the car subscription industry (in Japanese) Our Contribution to the P3NFEST Bug Bounty 2025 Winter As mentioned above, we do not currently offer a rewards program. However, to evaluate the effectiveness of incentive-based systems and to support students working to secure the future of the internet we’ve decided to contribute some of our services to a student-focused bug bounty program hosted by IssueHunt. The following services are eligible for bug bounties: KINTO Technologies Corporate Site KINTO Tech Blog (this website) The event runs from Monday, February 17, 2025 to Monday, March 31, 2025. For more information, please visit the event page. We welcome students to take on the challenge. P3NFEST Bug Bounty 2025 Winter
はじめに こんにちは、2025年3月入社の tetsu です! 本記事では、2025年3月入社のみなさまに、入社直後の感想をお伺いし、まとめてみました。 KINTO テクノロジーズ(以下、KTC)に興味のある方、そして、今回参加下さったメンバーへの振り返りとして有益なコンテンツになればいいなと思います! オサダヨシヒロ 自己紹介 グループコアシステム部のオサダです。ビジネスデベロップメントチームとグローバルコミュニティサイトの“TOYOTA Community by KINTO”を担当しています。 所属チームの体制は? グループコアシステム部は約40名います。多国籍なメンバーがいて日本語、英語他様々な言語でコミュニケーションしています。ビジネスデベロップメント、システム開発グループ、共通サービス開発グループがあります。 ビジネスデベロップメントはグローバルのリースシステムを担当しています。 システム開発グループは“Global KINTO ID Platform”や“TOYOTA Community by KINTO”の企画/開発/運用しています。 共通サービス開発チームは”会員プラットフォーム”と“決済プラットフォーム”、最近立ち上げた“AIプラットフォーム”の開発/運用をしています。 KTCへ入社したときの第一印象?ギャップはあった? 業務外の部活動、イベント(任意参加の“Beer Bash”など)がとても多いと思いました。特に自動車部は活動活発な印象で、レース観戦やサーキットカートイベント等があります。部員でなくても飛び入り参加企画もあり、仕事も部活動も活発な印象です。 現場の雰囲気はどんな感じ? “Good Morning!”で元気よく1日がはじまる感じです。多国籍で様々な会社を経験しているメンバーなので、和気あいあい議論しながらお仕事進めています。 ブログを書くことになってどう思った? KTC、グループコアシステム部を知ってもらういいチャンスと思いました! また、自分自身の振り返りにもなりました。 KJさん ⇒ オサダヨシヒロさんへの質問 映画がお好きとのことですが、これ観とかないと損するぞって映画を何点か教えていただきたいです。 KTCの皆さまへは、「タッカー」を観て頂きたいです。監督はフランシス・フォード・コッポラさん、製作総指揮 はジョージ・ルーカスさんと豪華なスタッフ陣で1988年のアメリカ映画です。時代は違いますが、車への熱い想いがあります。 tetsu 自己紹介 プラットフォームGでPlatformエンジニアをしています、tetsuと申します! 所属チームの体制は? 私が所属するプラットフォームG Platform Engineeringチームは、神保町オフィスに6人、Osaka Tech Labに3人の体制となります。 東京と大阪で物理的に距離がありますが、SlackやGatherなどを使ってコミュニケーションをとっています。また東京と大阪のメンバーで一緒に勉強会を企画もしてます! KTCへ入社したときの第一印象?ギャップはあった? ギャップは特にありませんでした。オフィスが離れている他チームの人とのコミュニケーションが大変なのかなと思っていましたが、BeerBashのようなイベントや社内サークルが活発なので、他チームの人との接点も多く、仕事がしやすいです。 現場の雰囲気はどんな感じ? 真面目に技術の議論をしたり、休憩中には雑談をしたりと和気あいあいとしています。私がKubernetesの勉強をしたいと話していたら、大阪のメンバーも一緒にしたいとなり、一緒に勉強会を企画することになり、今ではCloudInfraグループ、DBREグループとグループ横断で実施しています。 ブログを書くことになってどう思った? 入社ブログを見ていて転職するかどうか考えていました。私と同じような転職を考えている人が見ているのかなと思うと、緊張しています(笑) オサダヨシヒロさん ⇒ tetsuへの質問 神保町オフィス周辺のお勧めランチを教えてほしいです! 麺類が好きなので、「丸亀製麺」や油そばの「春日亭」によく行きます!天丼の「はちまき」という店も気になっているので、神保町でお会いしたときにぜひ行きましょう! YY 自己紹介 共通サービス開発G所属で、バックエンドエンジニアです 所属チームの体制は? 室町オフィスにて13名で開発を行なっています。 KTCへ入社したときの第一印象?ギャップはあった? 入社時のフォローアップがしっかり整備されている点がとても安心できました。チームではドキュメントにしっかり残す文化が定着していて、運用ノウハウを蓄積できている点が驚きでした。 現場の雰囲気はどんな感じ? それぞれが尊重し合って仕事していると思います。チーム方針として、「遠慮しない」という点を明記していたり、困っていたら誰かが力になってくれる環境でとても心強いです。 ブログを書くことになってどう思った? こういうのってなかなか腰が上がらなかったので、機会を与えていただけてとても嬉しいですし、今後執筆するハードルが下がったらいいなと思っています。 tetsuさん ⇒ YYさんへの質問 入社時に車を持っている話をしたと思うのですが、愛車へのこだわりがあれば教えてほしいです! こだわりで合ってるのか微妙なとこですが、好きな車体カラーを選ぶとこですかね。有料色でもリセールも気にせずビビッときた色を選ぶようにしています! ナミキ ユウジ 自己紹介 コーポレートITG ID (Innovation Drive)チームのナミキ ユウジです。 主にKTCのM365環境の課題解決と新しい技術の検証・導入、販売店様の情シス業務支援を行っています。 所属チームの体制は? 私を含めて9名のチームです。 室町、神保町、名古屋という複数拠点のメンバーで構成されています。 KTCへ入社したときの第一印象?ギャップはあった? Slackのレスポンスが著しく速い!!と感じたのが第一印象ですね。コミュニケーションのスピード感に驚きました。「Slackの通知をパッと見て、すぐにアクションを返す習慣」が組織全体に根付いているんだなと感じました。 ギャップとしては、設立して間もない組織であるのに、社内向けドキュメントがきちんと整備されていることですね。また、ConfluenceやSharePointが使いこなされていることに感動しました。何かわからないことがあれば、内製の生成AIに聞いたり、社内ポータルにアクセスすれば、たいてい自己解決ができます。そのような環境であることは予想外でした。 現場の雰囲気はどんな感じ? 気軽に声を掛けたり、ご飯に誘える雰囲気です。オフィス周辺には美味しいお店がたくさんあるので、ランチが楽しいです。仕事終わりのまぜそばがこれまた最高です。 チームの別拠点の方とも良い関係性で仕事ができています。数ヶ月に1回、別拠点の方とも直接お会いして仕事できる機会があることが大きいのかなと思っています。 また、社内イベントを通じて他部署の方とも気軽に交流できていることが嬉しいです!(まだ入社3ヶ月目ですが、50~70人近くの他部署の方と交流できています。嬉しい!) ブログを書くことになってどう思った? エンジニアブログ運営チームに直接声をかけてもらって、素直に嬉しいと思いました。入社後は技術ブログを積極的に書きたいなと思っていましたし、入社同期と再び交流する機会にもなったので。これを機に、今後も継続して技術ブログを投稿していきたいと思います。(めざせ月イチ投稿!) YYさん ⇒ ナミキ ユウジさんへの質問 同じサウナ部ですが、今気になってるサウナ施設があれば教えて欲しいです! 今年の5月にオープンした 毎日サウナ越谷店 です! 1号店の前橋店、2号店の八王子店に次ぐ3号店となるのですが、越谷店には毎日サウナ初のお風呂(しかも薬草泡風呂!)があるとのことで、メチャメチャ気になっています。サウナ部で行きたいですね!! KJ 自己紹介 ゴルフが大好きでした。血豆ができるまで練習しました。30代後半から始めたのですがシニアプロになりたいと半ば本気で思ってました(笑)。ただ、コロナを境にプレー頻度が減って練習もしなくなり下手になりました。2025年4月、マスターズでのマキロイのキャリアグランドスラム達成に感動し、もう一度、出直そうと思っています。 所属チームの体制は? 出向先のKINTOでは業務PJ改善Tというリース業務の改善を行うチームに所属しており、そこは4人体制です。KTCでは部付きです。 KTCへ入社したときの第一印象?ギャップはあった? 官僚的・縦割りな組織ではなく、会社全体を見回し、そのうえで自身で出来ること、すべきことを自立的に考えることができる人が多い組織だなというのが第一印象です。 良い意味でトヨタらしさが無いことがギャップでした。 現場の雰囲気はどんな感じ? KINTOサービスの根幹であるリース業務を回す部署なのでキッチリカッチリした雰囲気がある半面、メンバーの方々は多様性あふれる面白い人ばかりです。 どうすれば業務の品質が上がり、工数/リードタイムが削減できるだろう、と日々考えており、良い意味で現状を疑う雰囲気を持っていると思います。 ブログを書くことになってどう思った? 面白い取り組みだと思いました。一般的に埋もれやすい新入社員にスポットライトを当ててもらえるのはありがたいですし、応募・入社検討中の方々にとっても近しい存在の発信として参考になる情報だと思います。 ナミキ ユウジさん ⇒ KJさんへの質問 他部署のメンバーとの関わりなどどのようにされていますか? 自部署では1人だけの名古屋採用で、普段は室町オフィスではなく名古屋オフィスにいます。名古屋オフィスのKTCメンバーは室町に比べるとかなり少ないですが、少数がゆえの距離感の近さもあり他部署の方々とはよく仕事の話や雑談をさせてもらっています。一緒にランチに行くことも多いです。また、私はKINTOの業務部に出向させていただいており、リース業務を通して交わる人も徐々に増えてきいます。向こう1-2年くらいで友達100人を達成したいです(笑)。 さいごに みなさま、入社後の感想を教えてくださり、ありがとうございました! KINTO テクノロジーズでは日々、新たなメンバーが増えています! 今後もいろんな部署のいろんな方々の入社エントリが増えていきますので、楽しみにしていただけましたら幸いです。 そして、KINTO テクノロジーズでは、まだまださまざまな部署・職種で一緒に働ける仲間を募集しています! 詳しくは こちら からご確認ください!
Hi, this is Nakanishi from the QA Group (though I also wear a few other hats at the Developer Relations Group and the KINTO FACTORY Development Group ^^) This year at KINTO Technologies, we're embracing an "AI First, Release First" mindset. As part of this shift, our QA team has been exploring ways to make the most of AI to speed up our release cycles. This time, a group of QA members who shared the same passion came together for a lively brainstorming session. "Wouldn't it be awesome if we could do this?" "I really want to try something like this!" Together, we discussed ideas and possibilities. In this article, I'll be sharing some of the most exciting concepts that emerged out of the session, exploring how AI can help transform the future of QA. Issues That Emerged from Our Discussion QA teams produce a huge volume of documents every day, but the sheer amount of information makes it hard to find what's actually needed. Specification formats also vary by project or person, which complicates sharing across teams. On top of that, there's no solid system for reviewing incidents or implementing preventive measures—making it tough to stop issues from recurring. The review process itself is also a heavy workload, and there's growing demand to streamline it. A Future Made Possible by AI Effective Information Use (RAG) RAG (Retrieval-Augmented Generation) is a cutting-edge method for retrieving and analyzing information using the latest in generative AI technology. It quickly pulls key insights from vast archives of documents and incident data, delivering the right information to users when they need it. For instance, when an incident occurs, AI can instantly scan and analyze similar past cases to suggest effective solutions on the spot. It's like having a top-tier assistant who remembers every past experience and offers instant advice right when you need it. Already in use across industries like finance and customer support, it's dramatically speeding up response times and boosting problem-solving efficiency. Organizing and Supporting Specifications and Designs AI helps identify inconsistencies and omissions in your specifications, clearly highlighting and organizing any issues. By analyzing the inputted specifications, it can also automatically generate suitable test scenarios. For example, if you provide the specs for an e-commerce site cart feature, the AI can instantly create a scenario like: "Add product → Change quantity → Payment → Order confirmation." It can even generate additional scenarios, such as error handling flows and boundary value tests. This drastically cuts down the time and effort spent on manual scenario creation, boosting both the accuracy and efficiency of QA tasks. Automate and Streamline Your QA Process AI analyzes user operation logs to catch even the small mistakes that humans might miss. Specifically, it detects frequent user errors and unusual operations, like "errors triggered during specific screen transitions" or "fields often filled in incorrectly on input forms." With this, you can refine your test scenarios and address potential problem areas in advance. AI also automates the hassle of managing test case numbering on Conflu, cutting down on manual mistakes and saving a significant amount of time. Incident Analysis and Prevention AI that analyzes past incidents and offers concrete measures to prevent them from happening again. For example, it thoroughly reviews cases like "display issues on specific browsers" or "payment system failures" on e-commerce sites. Based on the findings, it suggests actionable steps such as "regularly checking browser behavior by version" or "enhancing error handling before and after payment processing." When a critical issue arises, the AI immediately assesses the risk level and sends automatic alerts to the relevant teams, enabling swift, real-time response and resolution. Streamlining Test Data Creation AI instantly generates the data required for testing. From new vehicle and used car details to user information, it can quickly produce large volumes of diverse data tailored to realistic business scenarios. In addition, by integrating AI with browser automation tools like Selenium and Appium, tasks that once required manual input can now be automated. With just a few simple settings, you can generate massive amounts of test data in no time. This integration not only reduces human error but also slashes the workload required for data creation, greatly improving the overall efficiency of your QA process. Tool Integration and Process Automation Connect Slack with tools like JIRA or Asana to receive timely, automated updates on what matters. Streamline your workflow by centralizing information from various tools in one place. Let AI serve as the bridge between platforms, smoothing out your entire process flow. Using AI Models for QA We're exploring the use of ChatGPT fine-tuned specifically for QA tasks. By building our own in-house AI model, we dramatically improved the response speed of the AI. Furthermore, we're working to create an environment where developers can easily use AI for quick self-checks. Future Action Plans Prioritize organizing and consolidating information using AI. AI-assisted reviews will help us work more efficiently and lighten the human load. Continuous data collection for the development of dedicated AI models. Actively utilizing AI-based incident analysis for process improvement. Automation between various tools will lead to further improvements in efficiency. Even when something feels too big to handle alone, new paths can open up when we think together. Inspired by the ideas from this brainstorming session, we'll launch a range of QA initiatives powered by AI. If you're a QA engineer interested in exploring new possibilities with AI or taking on fresh challenges with us, we'd love to connect. Casual chats and info sessions are always welcome. Feel free to reach out!
Hi, this is Nakanishi from the QA Group (though I also wear a few other hats at the Developer Relations Group and the KINTO FACTORY Development Group ^^) This year at KINTO Technologies, we're embracing an "AI First, Release First" mindset. As part of this shift, our QA team has been exploring ways to make the most of AI to speed up our release cycles. This time, a group of QA members who shared the same passion came together for a lively brainstorming session. "Wouldn't it be awesome if we could do this?" "I really want to try something like this!" Together, we discussed ideas and possibilities. In this article, I'll be sharing some of the most exciting concepts that emerged out of the session, exploring how AI can help transform the future of QA. Issues That Emerged from Our Discussion QA teams produce a huge volume of documents every day, but the sheer amount of information makes it hard to find what's actually needed. Specification formats also vary by project or person, which complicates sharing across teams. On top of that, there's no solid system for reviewing incidents or implementing preventive measures—making it tough to stop issues from recurring. The review process itself is also a heavy workload, and there's growing demand to streamline it. A Future Made Possible by AI Effective Information Use (RAG) RAG (Retrieval-Augmented Generation) is a cutting-edge method for retrieving and analyzing information using the latest in generative AI technology. It quickly pulls key insights from vast archives of documents and incident data, delivering the right information to users when they need it. For instance, when an incident occurs, AI can instantly scan and analyze similar past cases to suggest effective solutions on the spot. It's like having a top-tier assistant who remembers every past experience and offers instant advice right when you need it. Already in use across industries like finance and customer support, it's dramatically speeding up response times and boosting problem-solving efficiency. Organizing and Supporting Specifications and Designs AI helps identify inconsistencies and omissions in your specifications, clearly highlighting and organizing any issues. By analyzing the inputted specifications, it can also automatically generate suitable test scenarios. For example, if you provide the specs for an e-commerce site cart feature, the AI can instantly create a scenario like: "Add product → Change quantity → Payment → Order confirmation." It can even generate additional scenarios, such as error handling flows and boundary value tests. This drastically cuts down the time and effort spent on manual scenario creation, boosting both the accuracy and efficiency of QA tasks. Automate and Streamline Your QA Process AI analyzes user operation logs to catch even the small mistakes that humans might miss. Specifically, it detects frequent user errors and unusual operations, like "errors triggered during specific screen transitions" or "fields often filled in incorrectly on input forms." With this, you can refine your test scenarios and address potential problem areas in advance. AI also automates the hassle of managing test case numbering on Conflu, cutting down on manual mistakes and saving a significant amount of time. Incident Analysis and Prevention AI that analyzes past incidents and offers concrete measures to prevent them from happening again. For example, it thoroughly reviews cases like "display issues on specific browsers" or "payment system failures" on e-commerce sites. Based on the findings, it suggests actionable steps such as "regularly checking browser behavior by version" or "enhancing error handling before and after payment processing." When a critical issue arises, the AI immediately assesses the risk level and sends automatic alerts to the relevant teams, enabling swift, real-time response and resolution. Streamlining Test Data Creation AI instantly generates the data required for testing. From new vehicle and used car details to user information, it can quickly produce large volumes of diverse data tailored to realistic business scenarios. In addition, by integrating AI with browser automation tools like Selenium and Appium, tasks that once required manual input can now be automated. With just a few simple settings, you can generate massive amounts of test data in no time. This integration not only reduces human error but also slashes the workload required for data creation, greatly improving the overall efficiency of your QA process. Tool Integration and Process Automation Connect Slack with tools like JIRA or Asana to receive timely, automated updates on what matters. Streamline your workflow by centralizing information from various tools in one place. Let AI serve as the bridge between platforms, smoothing out your entire process flow. Using AI Models for QA We're exploring the use of ChatGPT fine-tuned specifically for QA tasks. By building our own in-house AI model, we dramatically improved the response speed of the AI. Furthermore, we're working to create an environment where developers can easily use AI for quick self-checks. Future Action Plans Prioritize organizing and consolidating information using AI. AI-assisted reviews will help us work more efficiently and lighten the human load. Continuous data collection for the development of dedicated AI models. Actively utilizing AI-based incident analysis for process improvement. Automation between various tools will lead to further improvements in efficiency. Even when something feels too big to handle alone, new paths can open up when we think together. Inspired by the ideas from this brainstorming session, we'll launch a range of QA initiatives powered by AI. If you're a QA engineer interested in exploring new possibilities with AI or taking on fresh challenges with us, we'd love to connect. Casual chats and info sessions are always welcome. Feel free to reach out!
はじめに こんにちは。KINTOテクノロジーズ(以下KTC)プラットフォームグループ Platform Engineeringチームで内製ツールの開発・運用を担当している山田です。普段はアプリケーションエンジニアとして、JavaとSpring Bootを使ったバックエンドや、JavaScriptとReactを使ったフロントエンドでCMDB(Configuration Management Database)の開発をしています。ここ1年ほどは生成AIブームに乗り、CMDBにRAGやText-to-SQLを活用したチャットボットの開発にも取り組んでいます。 こちらはText-to-SQLについて書いた前回の記事です。ご興味ある方はぜひご覧ください! https://blog.kinto-technologies.com/posts/2025-01-16-generativeAI_and_Text-to-SQL/ 今回は生成AI関連で、2025年5月20日にGAされたSpring AIを試してみた内容をご紹介したいと思います。 Spring AIの概要 2025年5月20日にGAされたSpringエコシステムの一つで、生成AI関連のフレームワークです。生成AI分野ではPythonベースのLlamaIndexやLangChainが有名ですが、既存のSpringアプリケーションに生成AI機能を追加したい場合や、Javaで生成AI開発をやってみたい方にとっての選択肢になるかと思います。 https://spring.pleiades.io/spring-ai/reference/ 検証内容 今回はSpring AIを使って、以下の2つの機能を実装してみました。 チャット機能(LLM対話) : AWS BedrockのClaude 3.7 Sonnetモデルを利用した対話機能 Embedding機能 : CohereのエンベディングモデルとChroma(ベクトルデータベース)を組み合わせた文書埋め込み・類似文書検索機能 技術スタック Spring Boot 3.5.0 Java 21 Spring AI 1.0.0 Gradle Chroma 1.0.0 AWS Bedrock LLMモデル:Anthropic Claude 3.7 Sonnet Embeddingモデル:Cohere Embed Multilingual v3 環境構築 依存関係の設定 まずは build.gradle にSpring AIを使うための依存関係を追加します。 plugins { id 'java' id 'org.springframework.boot' version '3.5.0' id 'io.spring.dependency-management' version '1.1.7' } java { toolchain { languageVersion = JavaLanguageVersion.of(21) } } ext { set('springAiVersion', "1.0.0") } dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-validation' implementation 'org.springframework.ai:spring-ai-starter-model-bedrock-converse' implementation 'org.springframework.ai:spring-ai-starter-model-bedrock' implementation 'org.springframework.ai:spring-ai-bedrock' implementation 'org.springframework.ai:spring-ai-starter-vector-store-chroma' testImplementation 'org.springframework.boot:spring-boot-starter-test' } dependencyManagement { imports { mavenBom "org.springframework.ai:spring-ai-bom:${springAiVersion}" } } アプリケーション設定 application.yml でAWS Bedrockの認証情報やモデル選択、ベクトルストアの接続情報を設定します。 spring: application: name: spring-ai-sample ai: bedrock: aws: region: ap-northeast-1 access-key: ${AWS_ACCESS_KEY_ID} secret-key: ${AWS_SECRET_ACCESS_KEY} session-token: ${AWS_SESSION_TOKEN} converse: chat: options: model: arn:aws:bedrock:ap-northeast-1:{account_id}:inference-profile/apac.anthropic.claude-3-7-sonnet-20250219-v1:0 cohere: embedding: model: cohere.embed-multilingual-v3 model: embedding: bedrock-cohere vectorstore: chroma: client: host: http://localhost port: 8000 initialize-schema: true 設定はこれだけです。あとはアプリケーション内で必要なクラスを簡単にDIできるようになります。 実装例 1. 生成AI(LLM)との対話機能 Spring AIでは ChatClient インターフェースを使って、簡単にLLMとの対話を実装できます。 サービス層の実装 ChatServiceクラスでLLMとの対話機能を実装します。 @Service public class ChatService { private final ChatClient chatClient; public ChatService(ChatClient.Builder builder) { this.chatClient = builder.build(); } public String generate(String message) { return this.chatClient.prompt(message).call().content(); } } ChatClient.Builder をDIすることで、設定ファイルに基づいたクライアントを自動的に構築できます。 コントローラーの実装 RESTコントローラーでAPIエンドポイントを提供します。 @RestController public class ChatController { private final ChatService chatService; private final EmbeddingService embeddingService; public ChatController(ChatService chatService, EmbeddingService embeddingService) { this.chatService = chatService; this.embeddingService = embeddingService; } @PostMapping("/generate") public ResponseEntity<String> generate(@RequestBody ChatRequest request) { return ResponseEntity.ok(chatService.generate(request.getMessage())); } } これで /generate エンドポイントにメッセージをPOSTすると、Claude 3.7 Sonnetによる応答を受け取ることができます。 以下が呼び出し例です。 curl -X POST http://localhost:8080/generate -H "Content-Type: application/json" -d '{"message": "こんにちわわ"}' こんにちは!何かお手伝いできることはありますか? 2. Embedding検索機能の実装 次に、ドキュメントをベクトル化して検索する機能を実装します。 Embeddingサービスの実装 このサービスでは、サンプルテキストを Document オブジェクトとしてベクトル化し、Chromaに保存します。そして「Spring」というクエリに対して類似度の高いドキュメントを検索します。この処理の裏側では、Cohere Embed Multilingual v3モデルによるテキストのベクトル変換が行われています。 @Service public class EmbeddingService { private final VectorStore vectorStore; public EmbeddingService(VectorStore vectorStore) { this.vectorStore = vectorStore; } public List<Document> embed() { List<Document> documents = List.of( new Document("Spring AI is a framework for building AI applications with the familiar Spring ecosystem and programming model."), new Document("LlamaIndex is a data framework for LLM applications to ingest, structure, and access private or domain-specific data."), new Document("LangChain is a framework for developing applications powered by language models through composability.") ); vectorStore.add(documents); return vectorStore.similaritySearch(SearchRequest.builder().query("Spring").topK(5).build()); } } APIエンドポイントの実装 @GetMapping("/embedding") public ResponseEntity<List<Document>> embedding() { return ResponseEntity.ok(embeddingService.embed()); } この実装により、 /embedding エンドポイントにアクセスすると、サンプルドキュメントのベクトル化と検索が行われ、その結果が返されます。 以下が呼び出し例です。「Spring」という言葉が入ったドキュメントの類似度(score)が一番高い結果になっていますね。 curl http://localhost:8080/embedding [ { "id": "af885f07-20c9-4db4-913b-95406f1cb0cb", "text": "Spring AI is a framework for building AI applications with the familiar Spring ecosystem and programming model.", "media": null, "metadata": { "distance": 0.5593532 }, "score": 0.44064682722091675 }, { "id": "5a8b8071-b8d6-491e-b542-611d33e16159", "text": "LlamaIndex is a data framework for LLM applications to ingest, structure, and access private or domain-specific data.", "media": null, "metadata": { "distance": 0.6968217 }, "score": 0.3031783103942871 }, { "id": "336b3e07-1a70-4546-920d-c4869e77e4bb", "text": "LangChain is a framework for developing applications powered by language models through composability.", "media": null, "metadata": { "distance": 0.71094555 }, "score": 0.2890544533729553 } ] さいごに 簡単ではありますが、今回はSpring AIを使った生成AI機能についてご紹介しました。Spring AIを試してみて、Javaのシステムに生成AI関連の処理を組み込む場合には選択肢の一つになるかなと思いました。また、今回ご紹介したチャット機能やEmbedding検索機能を組み合わせることで、RAG機能も比較的簡単に実装できると感じています。 現時点では、生成AI関連の機能やエコシステムはLlamaIndexやLangChainといったPython系フレームワークの方が充実している印象ですが、Spring AIはリリースされたばかりなので今後の機能追加に期待したいと思います!
Introduction Hello! I'm Momoi ( @momoitter ), a designer at KINTO Technologies. I belong to the Creative Office where I work on projects like the corporate website and Kumobii (KINTO's official mascot) related sites, incorporating cutting-edge web design along the way. In November 2024, our company hosted an internal event called the CHO All-Hands Meeting, and I was in charge of creating the opening movie for it and I used three generative AIs to create a female character who kicks off the event with a voice announcement. Actual Video https://www.youtube.com/watch?v=pVj_UQ_3-tg When asked at the event start, "Are you ready?", she answers "Of course!" In this article, I'll share the process of creating this original talking character and my thoughts along the way. How I wanted to create our own character that talks About incorporating AI to easily create a memorable video If you're like me, then definitely keep reading! Background The request from the art director overseeing the event's overall creative direction was to "re-edit the video used in our corporate website 's key visual and turn it into a one-minute opening movie." But just re-editing existing footage felt a bit too familiar for employees, and I wanted something more eye-catching, something that instantly energizes the event from the start. That's when I turned to our AI chatbot in our company Slack. I thought, what if I used AI to bring our chatbot to life as a surprise? A personified version in the video could definitely catch everyone's eye. AIs Used To create a talking character, I used the following three AI tools: Adobe Firefly (character image generation) TTSMaker (text-to-speech conversion) Runway (character animation with voice) From here on, I'll show you how I used these AIs to make the video. 1. Character Image Generation Adobe Firefly An image generation AI tool provided by Adobe. Since Adobe Firefly is trained on copyright-free images like Adobe Stock images, it can be used without worrying about copyright issues. Many of the well-known image generation AIs claim to be copyright-free, but some operate in a gray area, such as being able to generate images that closely resemble anime characters. Since this was a corporate event, we wanted to avoid any copyright concerns, so we chose an AI that can be used without such worries. Adobe Firefly Image Generation This character is displayed on our company's Slack with an icon like this: From the icon we established that: The pink color of the icon led us to give her pink hair She's an AI chatbot so we wanted to give her a smart, digital vibe in her overall look And by doing so we expanded the character's image. On-screen Operations When you open Firefly, you'll see a screen like this. Roughly speaking, you enter the prompts to generate an image in the input area below, and then use the menu on the left to adjust the aspect ratio, composition, style, tone, etc. This time, after much trial and error, I generated the character using the prompt "3D character, female, pink hair, white background, upper body, white simple digital clothing, facing forward." Mass Generation Once the prompt was more solidified, it was a matter of luck whether I would get a good result, so I just generated 100 to 200 sheets. Selection To give the event a fresh start, I aimed for a character that felt like an "AI operator" with an official and trustworthy vibe. So, I filtered out these images: The ones looking too young Having weird clothing Scary faces Selected Image After carefully narrowing down the options, I chose this image because it felt cool yet approachable. 2. Text-to-Speech Conversion TTSMaker An AI voice generator that converts typed text into speech. There are many similar AI-based text-to-speech services, but many of them are paid services or require crediting the source if they are free. I went with this tool because it's free to use without any credit attribution. TTSMaker On-screen Operations When you open TTSMaker, you'll see a screen like this. The procedure is as follows: Select a language Enter the text you want to convert to speech Listen to sample voices and choose the tone Set the details like speed and pitch Convert I aimed for a voice that felt like an "AI operator" with an official and trustworthy vibe. After comparing sample voices, I chose "406 - Yuki Tsumiyuki -🇯🇵 Japanese female" and had her read the line: "Mochirondesu. Cho-honbukai o hajimemasu." ("Of course. We'll now start the CHO All-Hands Meeting.") Actual Audio https://www.youtube.com/watch?v=r4Zw2by669I 3. Character Animation with Voice Runway An AI-powered tool that makes it easy to create and edit high-quality videos. I chose this tool for its "Lip Sync Video" feature, which syncs character images with voice audio. Runway On-screen Operations 1.Open "Lip Sync Video" under the "Generative Audio" section, then drag and drop the previously created character image. 2. Check that the facial range of the character image is recognized correctly, and if there are no problems, click "Upload Audio." 3. Drag and drop the previously generated voice, then click "Generate." Generated Video https://www.youtube.com/watch?v=usY4yB9Z1YA A video of the character speaking in sync with the audio was generated. Bonus Tip 1 https://www.youtube.com/watch?v=raYsnhwZONo By uploading a song, the character can actually be made to sing. Bonus Tip 2 https://www.youtube.com/watch?v=3edVClgoLug In this way, it's also possible to make a still image of a real person talk. At a recent internal study session (held in Tokyo), the speaker was suddenly unable to make the business trip from Osaka to attend, so we asked him to prepare still images and voice memos, and we used this AI-generated video to make our presentation. 4. Final Touches That's all for how to create a talking character video. What comes next is a little something extra. Actually, getting a character to talk using AI has become so easy that anyone can do it with the AIs I introduced above. But since I'm a designer in the Creative Office, I wanted to go beyond what any other department could produce. So as a final touch, I added a 3D balloon-style CG made in Illustrator, gave it a soft floating motion in After Effects, and composited it into the video. This added a polished finish and added the value only a creator could bring. Final Video https://www.youtube.com/watch?v=pVj_UQ_3-tg By adding one final touch, the video evolved from just a talking character to something with added graphical expression. Conclusion How it looked when projected at the event Each creative generative AI has its own characteristics and limitations. By understanding and combining those characteristics, I was able to create a level of quality that wouldn't have been possible with just one tool. On the day of the event, this character was projected on a large screen, and I was grateful to hear comments like: "That was amazing! How did you make it?" "The quality was so high I thought it was outsourced!" It felt great to see the impact it made, just as I aimed for. All tools used are simple enough that even non-creators can use it. As long as you have an idea, you can create memorable videos like this. If this article sparked your interest, definitely give it a try! Thank you for reading till the end.
Introduction Hello! I'm Momoi ( @momoitter ), a designer at KINTO Technologies. I belong to the Creative Office where I work on projects like the corporate website and Kumobii (KINTO's official mascot) related sites, incorporating cutting-edge web design along the way. In November 2024, our company hosted an internal event called the CHO All-Hands Meeting, and I was in charge of creating the opening movie for it and I used three generative AIs to create a female character who kicks off the event with a voice announcement. Actual Video https://www.youtube.com/watch?v=pVj_UQ_3-tg When asked at the event start, "Are you ready?", she answers "Of course!" In this article, I'll share the process of creating this original talking character and my thoughts along the way. How I wanted to create our own character that talks About incorporating AI to easily create a memorable video If you're like me, then definitely keep reading! Background The request from the art director overseeing the event's overall creative direction was to "re-edit the video used in our corporate website 's key visual and turn it into a one-minute opening movie." But just re-editing existing footage felt a bit too familiar for employees, and I wanted something more eye-catching, something that instantly energizes the event from the start. That's when I turned to our AI chatbot in our company Slack. I thought, what if I used AI to bring Sherpa to life as a surprise? A personified Sherpa in the video could definitely catch everyone's eye. AIs Used To create the original talking character, I used the following three AI tools: Adobe Firefly (character image generation) TTSMaker (text-to-speech conversion) Runway (character animation with voice) From here on, I'll show you how I used these AIs to make the video. 1. Character Image Generation Adobe Firefly An image generation AI tool provided by Adobe. Since Adobe Firefly is trained on copyright-free images like Adobe Stock images, it can be used without worrying about copyright issues. Many of the well-known image generation AIs claim to be copyright-free, but some operate in a gray area, such as being able to generate images that closely resemble anime characters. Since this was a corporate event, we wanted to avoid any copyright concerns, so we chose an AI that can be used without such worries. Adobe Firefly Image Generation "Sherpa," the original inspiration for this character, is displayed on our company's Slack with an icon like this: From the icon we established that: The "pa" sound in Sherpa inspired a feminine feel The pink color of the icon led us to give her pink hair She's an AI chatbot so we wanted to give her a smart, digital vibe in her overall look And by doing so we expanded the character's image. On-screen Operations When you open Firefly, you'll see a screen like this. Roughly speaking, you enter the prompts to generate an image in the input area below, and then use the menu on the left to adjust the aspect ratio, composition, style, tone, etc. This time, after much trial and error, I generated the character using the prompt "3D character, female, pink hair, white background, upper body, white simple digital clothing, facing forward." Mass Generation Once the prompt was more solidified, it was a matter of luck whether I would get a good result, so I just generated 100 to 200 sheets. Selection To give the event a fresh start, I aimed for a character that felt like an "AI operator" with an official and trustworthy vibe. So, I filtered out these images. Look too young Weird clothing Scary face Selected Image After carefully narrowing down the options, I chose this image because it felt cool yet approachable. 2. Text-to-Speech Conversion TTSMaker An AI voice generator that converts typed text into speech. There are many similar AI-based text-to-speech services, but many of them are paid services or require crediting the source if they are free. I went with this tool because it's free to use without any credit attribution. TTSMaker On-screen Operations When you open TTSMaker, you'll see a screen like this. The procedure is as follows: Select a language Enter the text you want to convert to speech Listen to sample voices and choose the tone Set the details like speed and pitch Convert I aimed for a voice that felt like an "AI operator" with an official and trustworthy vibe. After comparing sample voices, I chose "406 - Yuki Tsumiyuki -🇯🇵 Japanese female" and had her read the line: "Mochirondesu. Cho-honbukai o hajimemasu." ("Of course. We'll now start the CHO All-Hands Meeting.") Actual Audio https://www.youtube.com/watch?v=r4Zw2by669I 3. Character Animation with Voice Runway An AI-powered tool that makes it easy to create and edit high-quality videos. I chose this tool for its "Lip Sync Video" feature, which syncs character images with voice audio. Runway On-screen Operations 1.Open "Lip Sync Video" under the "Generative Audio" section, then drag and drop the previously created character image. 2. Check that the facial range of the character image is recognized correctly, and if there are no problems, click "upload audio." 3. Drag and drop the previously generated voice, then click "Generate." Generated Video https://www.youtube.com/watch?v=usY4yB9Z1YA A video of the character speaking in sync with the audio was generated. Bonus Tip 1 https://www.youtube.com/watch?v=raYsnhwZONo By uploading a song, the character can actually be made to sing. Bonus Tip 2 https://www.youtube.com/watch?v=3edVClgoLug In this way, it's also possible to make a still image of a real person talk. At a recent internal study session (held in Tokyo), the speaker was suddenly unable to make the business trip from Osaka to attend, so we asked him to prepare still images and voice memos, and we used this AI-generated video to make our presentation. 4. Final Touches That's all for how to create a talking character video. What comes next is a little something extra. Actually, getting a character to talk using AI has become so easy that anyone can do it with the AIs I introduced above. But since I'm a designer in the Creative Office, I wanted to go beyond what any other department could produce. So as a final touch, I added a 3D balloon-style CG of Sherpa made in Illustrator, gave it a soft floating motion in After Effects, and composited it into the video. This added a polished finish and added the value only a creator could bring. Final Video https://www.youtube.com/watch?v=pVj_UQ_3-tg By adding one final touch, the video evolved from just a talking character to something with added graphical expression. Conclusion How it looked when projected at the event Each creative generative AI has its own characteristics and limitations. By understanding and combining those characteristics, I was able to create a level of quality that wouldn't have been possible with just one tool. On the day of the event, this character was projected on a large screen, and I was grateful to hear comments like: "That was amazing! How did you make it?" "The quality was so high I thought it was outsourced!" It felt great to see the impact it made, just as I aimed for. All tools used are simple enough that even non-creators can use it. As long as you have an idea, you can create memorable videos like this. If this article sparked your interest, definitely give it a try! Thank you for reading to the end.
Introduction Hello! I'm Alex, a Generative AI Engineer on the Generative AI Development Project team at KINTO Technologies. Lately, there's been a growing interest in building multi-agent systems using large language models (LLMs). So in this article, I'd like to share a case where I built a Supervisor-style multi-agent system in less than 30 minutes using the latest LangGraph update, langgraph_supervisor. This system allows a central supervisor agent to coordinate and manage multiple specialized agents. It can be applied to a wide range of use cases, from automating workflows to generating customizable proposal scenarios. What is LangGraph? LangGraph is a Python library designed to simplify the development of AI agents and Retrieval-Augmented Generation (RAG) systems. Combined with LangChain, complex workflows and tasks can be designed and implemented efficiently. It supports state persistence, tool invocation, and features like human-in-the-loop and post-task validation through a centralized persistence layer which served as the foundation for this Supervisor-style system. What is langgraph-supervisor? langgraph-supervisor is a Python library for building hierarchical multi-agent systems using LangGraph, which was recently released by LangChain. A central supervisory agent coordinates task assignments and facilitates communication among specialized agents. This enables the development of adaptable systems that can tackle complex tasks with ease and efficiency. Key Features Supervisor agent creation: Manages multiple specialized agents and orchestrates the overall workflow. Tool-based agent handoff mechanism: Provides a mechanism for achieving smooth communication between agents. Flexible message history management: Enables easy control over conversation flow by managing message history dynamically. @ card What is a Supervisor-style Multi Agent System? Source: https://langchain-ai.github.io/langgraph/tutorials/multi_agent/agent_supervisor/ A Supervisor-style multi-agent system is a structure where a central controlling agent called the Supervisor coordinates with tool-enabled LLM agents, deciding which agent to call, when to do so, and what arguments to pass along. Building a Multi-Agent System with langgraph-supervisor The following steps outline how to build a multi-agent system using langgraph-supervisor. In this example, we’ll create a system that recommends a car and engine type based on simple, anonymized customer information. Additionally, the agent will retrieve car and engine information from the locally stored "Vehicle_Information.csv" file. Environment Setup Prepare Azure OpenAI API keys This time, we'll be using GPT-4o via Azure OpenAI. Depending on your situation, you can also use the OpenAI API, or Anthropic API, etc. And set Azure OpenAI API keys and endpoint as environment variables. os.environ["AZURE_OPENAI_API_KEY"] = "YOUR API KEY" os.environ["AZURE_OPENAI_ENDPOINT"] = "YOUR ENDPOINT" os.environ["AZURE_OPENAI_API_VERSION"] = "YOUR API VERSION" os.environ["AZURE_OPENAI_DEPLOYMENT"] = "YOUR DEPLOYMENT NAME" Install LangGraph and LangChain pip install langgraph pip install langchain pip install langchain_openai Install langgraph-supervisor pip install langgraph-supervisor Setup of tool functions used by LLM and each Agent Define the model using Azure OpenAI's GPT-4o. Next, define the tool functions for agents. from langchain_openai import AzureChatOpenAI import pandas as pd # LLMの初期化 llm = AzureChatOpenAI( azure_deployment=os.getenv("AZURE_OPENAI_DEPLOYMENT"), api_version=os.getenv("AZURE_OPENAI_API_VERSION"), ) car_information_path = "/xxx/xxx/車両情報.csv" # ツール関数の定義例 # CSVファイルから車両情報を読み込み、候補を生成する例 def get_car_features(): """The python code to get car information.""" path = car_information_path # CSVファイルのパスを指定 df = pd.read_csv(car_information_path) car_features = df[["車種名", "ボディタイプ", "説明"]].drop_duplicates() return car_features.to_dict(orient="records") # 選択された車種に対してエンジンタイプを抽出する例 def get_engine_type(selected_car): """The python code to get engine type and engine information.""" path = car_information_path df = pd.read_csv(car_information_path) engine_types = list(df[df["車種名"] == selected_car]["エンジンタイプ"].unique()) return engine_types, "エンジンに関する補足情報" Defining Each Agent We use LangGraph's "create_react_agent" to define each specialized agent (car model recommendation, engine type selection). from langgraph.prebuilt import create_react_agent # 車種推薦エージェント car_agent = create_react_agent( model=llm, tools=[get_car_features], name="car_agent", prompt=""" # Instructions Based on the recommended pattern, choose a car model to recommend and explain the reasoning in about 200 characters. """ ) # Engine type selection agent engine_agent = create_react_agent( model=llm, tools=[get_engine_type], name="engine_agent", prompt=""" # Instructions Choose the most suitable engine type for the recommended car and explain the reasoning in about 200 characters. """ ) Defining the Supervisor Create a Supervisor to oversee each agent and generate a final recommendation based on customer information. One improvement we made here was modularizing the prompt input to the Supervisor, allowing for greater versatility. By changing the contents of the role and task variables and the associated agent, the system can easily be used for other tasks. from langgraph_supervisor import create_supervisor # Create the contents of each module in the prompt role = "車のセールスマン" task = "顧客情報をもとに、最適な車とエンジンタイプを提案してください。" guideline = """ - 出力は必ず上記JSON形式で行ってください。 - 各根拠は200文字程度の豊かな文章で記述してください。" """ output_format = """ { "提案内容": { "提案する車種", "車種の根拠", "選択したエンジンタイプ", "エンジン選定理由" } } """ # Create a prompt system_prompt = f""" ## Role あなたは優れた{role}です。 ## Task {task} ## Guidelines {guideline} ## 最終生成物のフォーマット {output_format} """ # Create the Supervisor workflow = create_supervisor( # 先ほど作成したエージェントと紐づく [car_agent, engine_agent], model=llm, prompt=system_prompt ) # Compile the graph app = workflow.compile() Example Run from langchain.schema import HumanMessage import time # Example of customer information (add more details as needed) customer_info = "顧客情報: Age 35, prioritizes fuel efficiency, currently drives a compact car. # Example run start_time = time.time() result = app.invoke({ "messages": [ {"role": "user", "content": customer_info} ] }) end_time = time.time() # Display the final output print("最終提案:") print(result["messages"][-1].content) print("実行時間: {:.3f}秒".format(end_time - start_time)) Response from the Supervisor 最終提案: { "提案内容": { "提案する車種": "ハイブリッド技術を採用した最新コンパクトカー", "車種の根拠": "顧客は現在コンパクトカーに乗車中であり、燃費性能の良さを重視しています。 ハイブリッド技術を採用した車は、燃料使用の効率が高く、経済的負担や環境への配慮が優れています。 また、ハイブリッドシステムは短距離や都市部での走行にも最適です。 そのため、最新のハイブリッドコンパクトカーが最適な選択肢となります。", "選択したエンジンタイプ": "ハイブリッドエンジン", "エンジン選定理由": "ハイブリッドエンジンは燃費性能が非常に優れており、顧客のニーズである燃料効率を最優先に考慮しています。 さらに、コンパクトカーとの相性も良く、都市部での利用や日常の移動において高いパフォーマンスを発揮します。 このエンジンの選択は、快適性、経済性、環境性能を全て満たします。" } } Run Time: 21.938 seconds Impressions After Building the System Rapid Prototyping The complex inter-agent coordination and state management typically required in LangGraph were implemented with simple code using langgraph_supervisor, and a prototype was successfully built in under 30 minutes. A pretty impressive result. Flexibility and Scalability Each agent can be implemented with its own prompt and tool functions, allowing for easy customization to meet specific business needs. In addition, since state management is handled centrally, future improvements and feature additions are expected to be carried out smoothly. We Are Hiring! KINTO Technologies is looking for passionate colleagues to help drive AI adoption in our businesses. We're happy to start with a casual interview. If you’re even slightly interested, feel free to reach out via the link below or through X DMs . We look forward to hearing from you!! @ card Thanks for reading all the way through!
My name is Yuya Sakamaki from KINTO Technologies. I am usually involved in anything from data analysis to proposing strategies, and developing features using machine learning. Previously, I was in charge of AI functional development at Prism Japan . I conducted an internal comparison test of Cursor and GitHub Copilot, and I would like to share the results with you. Premise At KINTO Technologies, there's a policy that allows GitHub Copilot to be used as a standard tool. I will test whether using Cursor Editor can further improve productivity. Cursor An AI-powered code editor, created as a fork of Visual Studio Code. Github Copilot It’s a tool co-developed by GitHub and OpenAI, available as a plug-in for various IDEs such as Visual Studio Code, JetBrains, Eclipse, and more. Disclaimer This article contains many of my own opinions. This is not meant to undermine the usefulness of Cursor. Tested Plans Copilot Enterprise ... $39 / month Cursor Business ... $40 / month Conclusion As of February 2025 , I feel that there is almost no difference in functionality between GitHub Copilot and Cursor. As of December 2024 , I would have liked to recommend Cursor, but with the incredible speed at which Copilot has progressed, I no longer feel the need to choose Cursor Editor again. Evaluation Period December 2024 to February 2025 Comparison Table (Copilot vs. Cursor) I have put together a table of some of the most common points that came up in the discussions using Copilot and Cursor together. The details of each item will be provided later. Item GitHub Copilot Cursor UI/Operability - Inline suggestions and chat ability in VSCode - Many operations by right-clicking - AI-powered shortcuts are displayed instantly - Inline menus are easy to understand QuickFix (completion of import, etc.) - VSCode standard quick fixes are powerful - Sometimes it is unstable and doesn't work - Fix in Composer etc., is a little troublesome Automatic reflection of similar corrections - Need to start writing something first - Tabs predict and suggest the next correction to make (useful for making corrections to multiple places) Model selection - Can be changed, but the variety is limited - Abundant additions and selections (multiple AI models can be used) Rule file - Can be done by changing the settings in .github/copilot-instructions.md - The .cursorrules file enables you to apply rules per project Loading documents (such as @Docs) - Supported by plug-ins, etc. - The @Docs feature enables you to load documents for frameworks and libraries Agent functions - Similar functions available in Copilot Chat / Copilot CLI - Automatic execution in agent mode, try & error Automatic test code generation - Generation is possible (although accuracy varies) - Can be generated in the same way, but the accuracy is questionable. Corrections are needed. Price (Business/Enterprise) $39 $40 *The content of the evaluation is subjective as of February 2025. Pros of Cursor (when compared to GitHub Copilot) AI-powered shortcuts are displayed immediately Since AI-powered shortcuts are displayed automatically when you select a code, the need to remember special operations can be eliminated. Is there something similar in Copilot? Inline chat is possible. However, there is no COMPOSE mode to reference other files, and you need to call it up from the right-click menu, so it requires a little bit of effort. Suggests similar corrections together When you want to apply similar corrections to multiple places, Cursor will predict "where and how to fix next" in order on the tab. Is there something similar in Copilot? It doesn't make predictions until you start writing something first, so it is difficult for it to provide bulk suggestions as smoothly as with Cursor. A similar function is now available in Copilot *There were some changes as I was writing this article. Flexibility with selecting and adding models Cursor is designed to make it easy to add and select any model you want. Is there something similar in Copilot? Copilot Chat also enables model switching, but the scope of what can be done is currently limited. The @Docs feature enables you to load documents for frameworks and libraries Having it read the documents in advance will improve the accuracy of its answers. Is there something similar in Copilot? It is possible to achieve something similar using plug-ins, but the standard features are not that extensive. Automatic execution of try & error in agent mode In agent mode within Cursor, the AI will automatically execute commands under a certain level of authority and perform trial and error. Is there something similar in Copilot? Similar features are starting to appear in Copilot CLI and Copilot Chat, but they still require some fine tuning. While still just a preview version, agent mode is now available in Copilot . Cons of Cursor (when compared to GitHub Copilot) Import completion is a bit troublesome VSCode + Copilot will automatically complete imports, but Cursor will not import unless you hover the mouse cursor over it and select a quick fix. Copilot offers greater stability and overall superiority Automatic test code generation is not very accurate Automatically generated tests often don’t pass on the first run and usually require some adjustments. The same is true for Copilot, but I didn't get the impression that Cursor was much of an improvement. There are still many parts that are not suitable for operation Depending on the app being developed, Cursor contained more AI functions than needed, which confused some team members. The Difference between Cursor's "Composer" and "Chat" Cursor is divided into two main modes: Composer and Chat . Since there are differences in usage and the handling of context, I have put together a quick summary of the results of the internal comparison. Functional Items Composer Chat Context understanding Automatically links to the current file. Auto-suggests related files. Initially the context is empty. Must be shared manually as needed Main uses Mainly code generation and editing. Easy to correct suggested content immediately using inline Mainly used for receiving general questions and explanations. Suitable for longer exchanges History management Auto-saves in the control panel Chat history is selectable UI Also usable in inline menu. Can also be operated from the side menu Side menu only Code block execution Not possible Possible (execute commands via Chat in the side menu) When to use Composer Code corrections with simple context When you want to generate and edit code quickly When to use Chat Code corrections with larger context Analyzing error messages, general programming questions When you want to work while maintaining context for a long period of time Conclusion Again As of February 2025, there are no huge functional differences between Copilot and Cursor In fact, Copilot's progress has been faster than expected, and it seems that within a few months, Copilot filled the gap that I thought Cursor was going to win as of December 2024. There are certainly pros to using Cursor As an AI-powered IDE, Cursor still has its strengths, such as dedicated shortcuts and agent mode. However, since Copilot has also been making progress in supporting these features, the pros of newly introducing it may be somewhat diminishing. Which one will you use in the end? If GitHub Copilot is already available as standard equipment within the company, you will likely be able to get by with just Copilot for the time being. That said, if you're wanting to embrace large-scale code corrections and chat-driven development, it's worth giving Cursor's Composer / Chat features a try, even though the Github Copilot AI agent is currently available to VSCode Insiders. Since they are almost the same in terms of price, it is good idea to choose based on the UI and ease of use. Development App Prism Japan - iOS Prism Japan - Android References Cursor - The AI Code Editor Getting code suggestions in your IDE with GitHub Copilot The above are the results of my extensive use of Cursor and GitHub Copilot. The speed of product updates is accelerating, so I would like to continue to test them regularly.
はじめに はじめまして。KINTOテクノロジーズでAndroidアプリ開発を担当しているJongSeokです。 ある日、資料を整理していて、Google Sheets に内容を移しながら整えていると、ふとこう思いました。 「これ、めっちゃ面倒くさくない……?」 同じような内容を何度も入力して、セルのフォーマットも整えて…… 難しくはないけれど、これって本当に人間がやるべきことなんだろうか?と感じました。 そこで、最近よく目にするAIツールで自動化できないか調べてみたところ、 出会ったのが MCP(Model Context Protocol) でした。 いくつかのツールを試してみた結果、 なんと自然言語の「一行だけ」で Google Sheets を操作できました。 この体験は、正直かなり衝撃的でした。 MCPとは? MCPは「Model Context Protocol」の略です。 名前は少し堅く聞こえるかもしれませんが、実際はとても直感的な役割を持っています。 簡単に言うと、 AIが実際のツールやサービスを自由に操作できるようにする「通訳」のような存在です。 この記事ではその中でも、Googleサービスと連携する事例にフォーカスして紹介していきます。 もっとわかりやすく言うと 普段使っているGmailやGoogle Drive、Google Sheetsなどのサービスは、人がクリックして操作します。 MCPは、そういったサービスを AIが自動で操作できるようにするものです。 たとえば、こんなことができます。 Google Sheetsに何かを記録したい時、通常はこんな感じかと思います。 シートを開いて セルをクリックして データを入力する MCPは、そういったサービスをAIが自動で操作できるようにするものです。 それでは、実際のデモを見てみましょう。 https://www.kinto-technologies.com/products/ 次のWebページを参考にして、新しいGoogleスプレッドシートを作成し、紹介されている製品・サービスを整理してください。 上記のように指示した場合の実際の操作イメージが、以下のデモ動画です。 ![demo](/assets/blog/authors/jongseok/mcp/demo.gif =1080x) このように一文で指示するだけで、AIがGoogle Sheets APIを呼び出し、シートに自動でデータを入力してくれます。 本当に簡単にデータ整理ができてしまいました。 MCP最近流行ってるの? 技術的に可能ということと、実際に人々が関心を持っているというのは別の話。 そこで、Google Trendsで「MCP」というキーワードの検索トレンドをチェックしてみました。 2025年3月から5月までのデータを見ると、 特に4月中旬から検索数が急激に増加しているのが分かります。 これは単なる興味を超えて、 開発者だけでなく一般ユーザーまでがMCPを実際に「使い始めている」ことを示しているとも言えます。 自分もその波に乗った、という感じです。 では、実際にMCPを試してみたい場合、どのような方法があるのでしょうか? MCPを活用するには、自然言語の命令を受け取り、それを実行できる環境が必要です。 実際、Claude(Anthropic)など、MCPと連携できるAIエージェントはいくつか存在しますが、今回私が選んだのは、AI機能が組み込まれたコードエディタ「Cursor」でした。 Cursorとは? Cursorは一言で言えば、AI機能が組み込まれたコードエディタです。 自然言語でコードを依頼すれば、AIが自動で提案・修正・説明などをしてくれます。 MCP の命令を書く際にも、Cursorを使えばよりスムーズに記述できます。 Cursorについてもっと詳しく知りたい方は、公式サイトやブログを参考にするのがおすすめです。 https://www.cursor.sh それでは、一緒に始めてみましょう MCPとGoogle Sheetsを連携して実際に自動化を体験するには、まずいくつかの準備が必要です。 難しい知識は不要なので、安心してください。一つずつゆっくり進めていきましょう。 事前準備 自動化を始める前に、以下の項目を準備しておきましょう。 MCPをサポートするエディタのインストール(今回はCursorを使用) Googleアカウント 自動化したいGoogleサービス(DriveやSheetsなど) MCP Server( https://github.com/xing5/mcp-google-sheets ) ←本記事ではこれを利用します。 簡単な自然言語での命令文を考える準備 Google Cloud Platform (GCP)の設定 まず、Google Sheets APIを利用するためにGCP側の設定を行います。 1-1. プロジェクトを作成 GCP コンソールにアクセスし、新しいプロジェクトを作成します。 ![Create Project1](/assets/blog/authors/jongseok/mcp/mcp_01_01.png =1080x) ![Create Project2](/assets/blog/authors/jongseok/mcp/mcp_01_02.png =360x) 1-2-1. サービスアカウントを作成 AIがGoogle Sheetsにアクセスするための「サービスアカウント」を作成します。 ![Service Account1](/assets/blog/authors/jongseok/mcp/mcp_02_01.png =1080x) Service Accountsの+Create service accountを押します。 ![Service Account2](/assets/blog/authors/jongseok/mcp/mcp_02_02.png =360x) Service account nameを入力してDoneを押します。 1-2-2. Permission追加 ![Service Account3](/assets/blog/authors/jongseok/mcp/mcp_02_03.png =1080x) Permission→Manage access→RoleをEditorにしてSaveを押します。 1-2-3. Keys追加 ![Service Account4](/assets/blog/authors/jongseok/mcp/mcp_02_04.png =1080x) Keys→Add Keyに押してJSONを選択してCreateします。 そうしたら認証ファイルがDownloadされます。 ![Service Account5](/assets/blog/authors/jongseok/mcp/mcp_02_05.png =1080x) ファイルの中身のこんな感じになります。 これでサービスアカウント発行は終わりです。 このファイル client_email は後で使います。 1-3. Googleサービスを設定 ![Service Account5](/assets/blog/authors/jongseok/mcp/mcp_03_01.png =1080x) APIS & ServicesのLibraryを押します。 ![Service Account5](/assets/blog/authors/jongseok/mcp/mcp_03_02.png =1080x) 今回利用したいServiceが見えますね。 Drive Sheets 二つのServiceをEnableを押します。 2-1. GoogleDriveの設定 ![Google Drive1](/assets/blog/authors/jongseok/mcp/mcp_04_01.png =1080x) Google Driveに入ってAIを利用するFolderを作ります。 例)Sheets For MCPで作りました → その後ShareのShareを押します。 ![Google Drive2](/assets/blog/authors/jongseok/mcp/mcp_04_02.png =360x) 上の欄には 1-2. サービスアカウントを作成 したJSONファイルに中にある client_email をcopyして入力します。 ![Google Drive3](/assets/blog/authors/jongseok/mcp/mcp_04_03.png =360x) 追加されたか確認してDoneを押します。 2-2. Folder IDを取得 ![Google Drive4](/assets/blog/authors/jongseok/mcp/mcp_04_04.png =1080x) 設定が終わったら Folder ID を取得します。 これで設定に必要な物は全部準備できました。 実際に設定して使ってみましょう! MCP設定(Cursor&Terminal) Windowsでも可能ですが、ここではMacを基準に説明します。 MCPのセットアップには簡単なCloudServerを利用する方法もありますが、今回はLocalServerでやってみます。 まずはuv,uvxが必要なのでTerminalでインストールしましょう。 uvx は、高速なPythonパッケージインストーラとレゾルバである uv の一部らしいです。 1. uv,uvxインストール & 環境変数セット curl -LsSf https://astral.sh/uv/install.sh | sh ![Terminal1](/assets/blog/authors/jongseok/mcp/mcp_05_01.png =1080x) 上手くインストールできました。 ご自身の環境に合わせて値を入力してください。 export SERVICE_ACCOUNT_PATH="/path/to/your/service-account-key.json" export DRIVE_FOLDER_ID="YOUR_DRIVE_FOLDER_ID" 準備した二つ SERVICE_ACCOUNT_PATH, DRIVER_FOLDER_ID を環境変数でセットします。 2. Project設定 git clone https://github.com/yourusername/mcp-google-sheets.git cd mcp-google-sheets ProjectをCloneし、Cloneしたディレクトリに移動します。 どこに置いても問題ありませんが、管理しやすくするため、発行された service_account.json ファイルはProjectの下に移動しました。 ![Terminal2](/assets/blog/authors/jongseok/mcp/mcp_05_02.png =360x) サーバーを起動してみましょう。 uv run mcp-google-sheets ![Terminal3](/assets/blog/authors/jongseok/mcp/mcp_05_03.png =1080x) これでLocalのサーバーは準備できました。 最後に使うためにMCPを設定しましょう。 3. MCP設定 ![Cursor1](/assets/blog/authors/jongseok/mcp/mcp_06_01.png =1080x) MCP設定するためには右上にある⚙️を押します。 ![Cursor2](/assets/blog/authors/jongseok/mcp/mcp_06_02.png =1080x) MCP項目中にある+Add new global MCP Serverを押します。 ![Cursor3](/assets/blog/authors/jongseok/mcp/mcp_06_03.png =1080x) 入力画面が表示されます。 { "mcpServers": { "mcp-google-sheets-local": { "command": "uv", "args": [ "run", "--directory", "/Users/jongseok.bae/MCP/GoogleServices/mcp-google-sheets", "mcp-google-sheets" ], "env": { "SERVICE_ACCOUNT_PATH": "/Users/jongseok.bae/MCP/GoogleServices/mcp-google-sheets/service_account.json", "DRIVE_FOLDER_ID": "1n4HUOiglwjiTKHcw8jSATYcPtCRqNn6O" } } } } args にはご自身のProjectがあるPathを入力 env にはSERVICE_ACCOUNT_PATH,DRIVE_FOLDER_IDを入力 上記の値を入力して保存します。 ![Cursor4](/assets/blog/authors/jongseok/mcp/mcp_06_04.png =1080x) 🟢が点灯していれば、正しくセットアップされています。 このMCPで利用可能な機能はTools:list_spreadsheets,create_spreadsheet,get_sheet_data...など表示されます。 これでセットアップは完了です。お疲れさまでした! それでは実際に、どのように自然言語で命令を出して、Google Sheets に自動入力を行うのかを試してみましょう。 実際に使ってみる 準備が整ったところで、いよいよ本番です。 例えば、以下のように自然言語で指示を出すだけで… https://news.google.com/home?hl=en-US&gl=US&ceid=US:en 「本日のGoogleニュース」 という名前の新しいGoogleスプレッドシートを作成してください。 掲載されているトップニュースを、タイトル、概要、URLの3列で整理してシートに追加してください。 実際には裏側で、次のような流れが走っています: Cursorで命令を入力 MCP Serverが命令を受信 自然言語を解析 → Google Sheets APIに変換 自動でスプレッドシート作成 + データ挿入 ![Cursor4](/assets/blog/authors/jongseok/mcp/mcp_06_05.png =720x) MCP実行する中身を見るとこんな感じになってます。(自然言語を解析して処理を実行) ![demo2](/assets/blog/authors/jongseok/mcp/demo2.gif =1080x) 結果として、上で紹介したようなスプレッドシートが生成されました! まとめ 今回紹介したMCPとGoogle Sheetsの連携は、単なる技術紹介にとどまるものでがありません。 「自然言語一文で業務を動かす」という体験は、 もはや未来の話ではなく、 今この場で実現可能なこと です。 もちろん、 セキュリティやアクセス制御など、まだ検討すべき課題もあります。 しかし、小さな自動化から始めていくことで、業務効率化の可能性は十分に感じられました。 もし業務の自動化を考えている方は、今回の事例を参考に、ぜひ一度試してみてください。 想像よりも早く、変化を実践できるかもしれません。
Hello! My name is Kita and I work on a travel media platform called Prism Japan (for Web, iOS, and Android) at KINTO Technologies. Since November 2024, I've been working on social media management for Prism Japan. Going beyond traditional advertising, the goal is to actively use social media as a way to grow brand awareness and create a channel to attract new customers. So here's a quick look back at how things went over the past four months! What We Achieved Let’s begin by looking at what we’ve accomplished while managing our social media accounts. Creating short-form videos Short-form content, especially on TikTok and Instagram, is a key element in today's social networking environment. The algorithms are designed to show short videos to users beyond your followers, and depending on how viewers react, your reach can grow quickly. Increasing awareness using social media was a required subject, so we started by imitating popular videos that were going viral in similar categories. Based on those ideas, I picked up editing skills by experimenting with different editing tools. Here are the main tools I used: Tool Name Features Canva Has a free plan available at no cost Images and videos can be freely edited and easily shared with co-editors, making management simple. There was only one time the server crashed during editing, and I had to start over. Adobe Express Has a free plan available at no cost It's not much different from Canva, but I personally prefer this one because the server is stable that I never experienced any crashes while working. Capcut Has a free plan available at no cost Its main feature is video editing. It offers tons of social media-friendly features, such as text-to-speech, 3D image conversion, and the ability to use fonts that are commonly seen on social media. Note: The watermark in the free version doesn’t go over well on Instagram. Depending on your goals and preferences, you might favor one tool over another, but generally, all of them can get the job done—even with their free versions. Gaining impressions Across all platforms, we were able to gain a lot of impressions. Let's take a look at the period from November 1, 2024, when the full-scale operations started, to March 17, 2025 (the time of writing). X Impressions increased 293% to 62,500. Tiktok Since we only started using TikTok during this period, there’s no earlier data to compare, but our videos have been viewed 440,000 times so far. Compared to other platforms, it appeared to steadily accumulate views over time. Instagram Reach increased by 90%, reaching 50,000. *Note: Accurate comparisons for views and interactions couldn’t be made due to the absence of data prior to August 2024. This is especially noticeable on TikTok and Instagram, with peaks occurring around the New Year period. We think this growth was driven by a combination of people being on holiday and a well-timed post introducing shrines that were perfect for the New Year's visits. When comparing the period before and after full-scale social media operations, factors like posting more frequently and simply being active on the platforms definitely played a role. However, what really helped boost views was tapping into trends like video format, seasonality, and timely topics. I'd say these efforts helped "raise awareness" to some extent. Communication with users On X in particular, we were able to discover and connect with new audiences. Previously, we hadn't taken any active steps like following users or replying to posts. But since X prioritizes engagement in its algorithm, we began directly interacting with users interested in tourism. As a result, one user not only installed our app, but also posted a review after actually visiting one of the spots we featured! Even better, they gave us some great content ideas. If you have a product or service, I definitely recommend reaching out actively. It can lead to both new users and valuable feedback. What We Couldn't Achieve Next, let's take a look at what didn't go so well. Did not result in app installations or website traffic As mentioned earlier, we saw a noticeable increase in views and impressions. However, those numbers didn't translate into app installations or visits to the website. Below, I'll break down the results by platform. The evaluation period is set from November 1, 2024, when the full-scale operations started, to March 17, 2025. The following data reflects the number of app installs measured by AppsFlyer during the period. Note: We've decided not to disclose the specific number of installations. Tiktok & Number of app installs First, we investigated whether there was any correlation between TikTok metrics and app install numbers. Number of views This chart was shown earlier, but here we compared the number of TikTok views with the app installs. As you can see from a quick comparison of the graphs, there doesn't appear to be a clear correlation. For example, even though views peaked on January 2, 2025, there was no noticeable increase in installs. On the other hand, January 29, 2025 saw a spike in installs when there was no change in views. This also leads us to conclude that there is no correlation between TikTok views and app installs. Profile views Next is the number of profile views. We assumed that users who visited our profile showed some level of interest. Thankfully, profile views have been trending upward, but for now, it doesn't seem like they're having much of an impact on app installs. Likes What about the number of likes? At a glance, the trend in likes seemed to follow a similar pattern to views. Similarly, on January 2, 2025, when we got the highest number of likes, app installs didn't change. And on January 29, 2025, when installs spiked, likes didn't seem to contribute to that increase. Comments The total number of comments was 81, which is relatively low considering the number of views. There were even days with zero comments. The number of comments on February 17, 2025 was slightly higher at 4, but there was no change in installs. Shares The trend in shares was also similar to that of views and likes. We noticed firsthand how TikTok's algorithm tends to promote videos that get a lot of likes and shares, placing them on the For You feed, which in turn helps boost views. Instagram & Number of app installs Next up is Instagram. Views Similarly, large peaks around the New Year holiday. As mentioned earlier, that timing didn't lead to any noticeable change in app installs. On the other hand, there was some correlation over multiple days. Overall, the correlation wasn't strong, but compared to TikTok, there might be slightly more of a relationship between views and installs. Also, the reach (i.e. number of unique users) showed a similar trend as above, so I'll skip the details here. Interactions Lastly, interaction. On Instagram, this includes likes, saves, comments, and shares. Again, no correlation was found with app installs. Summary Overall, there was no correlation between social media activity and app installs. So for now, it's hard to say that our social media efforts drove user acquisition. However, this analysis is based on correlation only, so it's possible that some viewers went on to install the app later. But to be honest, it's challenging to measure that accurately. Traffic to the website We expected that social media would also contribute to attracting customers as a route other than SEO. In reality, we were able to drive some visits through Instagram stories and posts on X, but the total number was only around 300, which is quite small. We believe this is mainly due to the low follower count on X which limited our reach, and the lack of Instagram story viewers. Impressions increased, but follower growth was limited X: 425 followers On X, we were still lacking in follows and actions such as likes. Part of the reason is that we took a slower, more cautious approach while juggling other platforms over a long period of time. I think it's best to be more proactive with follows and likes early on to gain traction faster. But be aware that excessive following can lead to shadowbans or account suspensions. Tiktok: 155 followers Despite the high number of views, we barely gained any followers. I think there are two main reasons for this: One is that the content was too generic. I think it lacked originality and creativity. There wasn't anything that made users feel they had to follow the account or risk missing out. Second, the target was unclear due to the nature of Prism Japan targeting a wide range of people who are interested in travel. But on TikTok, we didn't narrow down the demographic (age, gender), so information ended up reaching a wide range of people. Instagram: 6,667 followers At first glance, this number may seem high, but since we stopped running ads, follower growth has been on the decline. It's often said that followers gained through ads tend to be less engaged. On top of that, our post style shifted significantly after we paused the ads, which may have further accelerated the drop-off in engagement. Key Characteristics & Improvement Points by Platform Here, I'll break down the strengths of each platform and post performances we observed during actual operations. TikTok: Content can go viral even without a large number of followers Top-performing post: 3 hidden spots in Tokyo perfect for a girls' trip! We intentionally set a very specific target audience for this post: "Girls traveling around Tokyo." This content guides users through the actual process of using the app to discover hidden gems. The spots featured are hidden gems with themes like "overseas-inpired," "anime-related," and "en-musubi (shrines dedicated to love and relationships)." As a result, 94% of traffic came from search, with queries like "Tokyo places to hang out for two girls" or "Tokyo sightseeing." We believe narrowing the target and showcasing true hidden spots played a key role in its success. Lowest-performing post: The Hibiya illuminations were so beautiful! The video that didn't perform well was the one about the Hibiya illuminations. We actually visited the location, captured the lights and ambiance, and tried to create an engaging video by syncing with the background music. Despite these efforts, the video barely got any views. The likely reason is we entered a highly competitive area filled with high-quality content under popular keywords like "Christmas" and "illuminations," making it hard to stand out. Summary Comparing the two, we found that the successful post had a clear target audience and offered useful content to that audience. As a result, the number of views increased significantly, along with key metrics like average watch time and completion rate. X: Communication with users is its strength Top-performing post: 4 recommended shrines and temples for autumn foliage This post highlighted a selection of spots where you can enjoy the beautiful combination of autumn leaves and traditional shrines or temples. It includes location details for each spot, highlights, and accompanying images. Lowest-performing post: Today is Christmas! This post featured a video created using generative AI, accompanied by the trending hashtag #MerryChristmas. The goal was to bring a more "human" feel to the account and to gain some impressions with the hashtag but the post didn't generate much engagement. Summary Looking across other popular posts on X, content that ties into seasonal themes or current trends tends to perform better. I also found that useful content, whether it's well-organized or clearly valuable to the viewer, plays a key role in performance. Instagram: Short videos make it easier to reach non-followers Top-performing post: [2024-2025 Season] 4 recommended ski resorts near Tokyo With the start of the winter ski season, we introduced ski resorts around the Kanto area using an image post. We listed the opening periods, hours, and pricing for each resort. As a result, the post received 10 saves, which was noticeably higher than other posts, and it reached 55.4% non-followers. In my opinion, Reels tend to reach non-followers even without many saves, while image posts usually stay within your followers, around 90 percent of the time. Looking back, I realized that creating posts people want to "save" is the most important. Lowest-performing post: AI diagnoses you! In contrast, this video introduced our app's "Search by mood" feature using a Reel. The intention was to have users recall how they would use the app by recording the actual app screen and walked through the steps, but it ended up being the least played video. I think the target audience wasn't clearly defined, and the value to the user wasn't communicated well. Summary While Reels and image posts differ in how easily they reach non-followers, I got the impression that a post's performance often depends on whether it gets saved. More than just offering useful content, it's important to actively encourage saves and review it regularly. Overall Summary & Future Direction Overall, we found that social media didn't make a major contribution to attracting customers. That said, we can't say no effect either. So, we'll continue to reflect and refine our approach moving forward. This article highlights two particularly important points: Clarify your target Information that is useful to viewers These may sound obvious, but I realized that these two points are essential for videos to driving performance regardless of the platform. We also used the same content from TikTok on Instagram, but because the user demographics differ between platforms, it didn't get much of a response. While it's ideal to tailor posts for each platform, our limited resources made it difficult to do so effectively. Each platform has its own unique characteristics and user demographics, so it’s important to identify what works best based on the specific purpose. References The 7 Golden Rules of Social Media Marketing
本記事は KINTOテクノロジーズアドベントカレンダー2024 の24日目の記事です🎅🎄 はじめに こんにちは、 Rasel です。現在、KINTOテクノロジーズ株式会社でAndroidエンジニアとして働いています。今日は、Kotlin Multiplatform (KMP) でのテストへのアプローチについて簡単に紹介します。 KMPでのクロスプラットフォームテストにより、AndroidとiOS間で共有されるコードの信頼性を確保できます。シンプルなテストは素晴らしい開始点ですが、多くのアプリケーションでは、より複雑なセットアップを行って、ビジネスロジックの検証、非同期関数の処理、コンポーネント間の相互依存性のテストなどを行う必要があります。 この投稿では、非同期コードの処理、依存関係のテスト、パラメーター化されたテストの使用、複雑なセットアップの構築など、高度なテストシナリオについて説明します。詳細を掘り下げてみましょう! 高度なクロスプラットフォームテストの設定 共通のテスト依存関係を構成する こちらは、アサーション、コルーチン、モック用のテストライブラリを使用した強化されたセットアップです。 // In shared module’s build.gradle.kts plugins { id("dev.mokkery") version "2.5.1" // Mocking library for multiplatform } sourceSets { val androidInstrumentedTest by getting { dependencies { implementation(libs.core.ktx.test) implementation(libs.androidx.test.junit) implementation(libs.androidx.espresso.core) implementation(libs.kotlin.test) } } commonTest.dependencies { implementation(libs.kotlin.test) implementation(libs.kotlinx.coroutines.test) implementation(libs.kotlin.test.annotations.common) } iosTest.dependencies { implementation(libs.kotlin.test) } } このセットアップにより、非同期テストや、テストに必要な依存関係のモック化を処理できるようになります。 KMPにおける基本的なテスト KMPを使用すると、 commonTest で共有テストを簡単に記述できると同時に、 androidTest と iosTest でプラットフォーム固有のテストが可能になります。開始方法の概要は次のとおりです。 class GrepTest { companion object { val sampleData = listOf( "123 abc", "abc 123", "123 ABC", "ABC 123", ) } @Test fun shouldFindMatches() { val results = mutableListOf<String>() // Let's get the matching results with our global function grep which is defined in commonMain module grep(sampleData, "[a-z]+") { results.add(it) } // Check results with expectations assertEquals(2, results.size) for (result in results) { assertContains(result, "abc") } } } commonTest におけるこの簡単なテストを使用すると、プラットフォーム間で commonMain モジュールの共有ロジックを検証できます。 高度なテストシナリオ 1.コルーチンを使用した非同期関数のテスト 多くの共有KMPプロジェクトでは、非同期作業にコルーチンを使用します。コルーチンを効果的にテストするには、テストでコルーチンの実行を制御および進行を制御できるツールである kotlinx-coroutines-test を使用する必要があります。 サンプルシナリオは次のとおりです。ユーザーデータを非同期的に取得するUserRepositoryを持っているとします。データ検索をシミュレートするためにコルーチンフローを制御するテストを記述します。 @OptIn(ExperimentalCoroutinesApi::class) class UserRepositoryTest { private val testDispatcher = StandardTestDispatcher() private val userRepository = UserRepository(testDispatcher) @BeforeTest fun setUp() { Dispatchers.setMain(testDispatcher) // Set test dispatcher as main } @AfterTest fun tearDown() { Dispatchers.resetMain() // Reset main dispatcher } @Test fun `fetch user successfully`() = runTest { val user = userRepository.fetchUser("123") assertEquals("John Doe", user.name) } } この例では、 Dispatchers.setMain(testDispatcher) がデフォルトのディスパッチャを置き換えることで、コルーチンの実行を制御できるようにします。 runTest {} は、コルーチンのセットアップとクリーンアップを自動的に処理し、サスペンド関数の管理を容易にします。 runTest 内のフローを制御して、遅延やその他の非同期動作をシミュレートできます。 2.モックの使用と相互関係の検証 マルチプラットフォームセットアップで依存関係をモックすると、クラス間の複雑な相互作用のテストを効率化します。ここでは、APIクライアントをモックしてネットワーク呼び出しをシミュレートし、リポジトリとのやり取りを確認します。 class NewsRepositoryTest { private val testDispatcher = StandardTestDispatcher() private val apiService = mock<ApiService> { everySuspend { getNews(defaultSectionName) } returns TopStoryResponse(mockNewsArticles) } private val repository = NewsRepository(apiService, testDispatcher) @BeforeTest fun setUp() { Dispatchers.setMain(testDispatcher) // Set test dispatcher as main } @AfterTest fun tearDown() { Dispatchers.resetMain() // Reset main dispatcher } @Test fun `fetch news list for home section successfully`() = runTest { val articleList:List<Article> = repository.fetchNews() assertEquals(mockNewsArticles.size, articleList.size) assertEquals(mockNewsArticles.first(), articleList.first()) assertEquals(mockNewsArticles.last(), articleList.last()) verifySuspend { apiService.getNews(defaultSectionName) } } } const val defaultSectionName = "home" この例では、 mock<ApiService>() を使用すると、明示的な動作定義がなくてもモックがデフォルト値を返すことができます。 verifySuspend は、 getNews() が適切に呼び出されたかどうかを確認し、リポジトリ内の正しいフローを確保します。 everySuspend は、 getNews() の呼び出しごとに戻されるモックデータを設定します。 NewsRepository の getNews() メソッドは、 ApiService から TopStoryResponse としてデータを取得し、結果を List<Article> として返します。 3.さまざまな入力シナリオに関するパラメーター化されたテスト KMPは現在、JUnit5などのライブラリと同様に、パラメーター化されたテストにネイティブに対応していません。ただし、Kotlinの機能を使用してパラメーター化されたようなテスト動作を実現する回避策があり、さまざまな入力を使用して関数を簡潔かつ再利用可能な方法でテストできます。以下は、DateUtils関数のさまざまな日付フォーマットをテストする例です。 class DateUtilsTest { private val testCases = listOf( Triple("2024-11-18T00:00:00", "dd MMM yyyy", "18 Nov 2024"), Triple("2024-11-18T15:34:00", "hh:mm", "03:34"), Triple("2024-11-18T15:34:00", "dd MMM yyyy hh:mma", "18 Nov 2024 03:34PM"), ) @Test fun `check date format`() { testCases.forEach { (dateString, outputFormat, expectedOutput) -> val actualOutput = formatDatetime(dateString = dateString, inputFormat = "yyyy-MM-dd'T'HH:mm:ss", outputFormat = outputFormat) assertEquals(expectedOutput, actualOutput, "Failed for date $dateString and output format $outputFormat") } } } [!注記] ここで、 formatDatetime() は、日付文字列をフォーマットするために DateUtils 内で定義されたグローバル関数です。この例では、 入力ごとに予想される結果を定義して、コードを重複させることなくテスト範囲を簡単に拡張できます。 プラットフォーム固有のテストライブラリに依存せずに、 androidTest と iosTest の両方で動作します。 複雑なセットアップによるプラットフォーム固有のテスト 一部のテストケースでは、特にAndroidの SharedPreferences またはiOSの NSUserDefaults を使用する場合、プラットフォーム固有のAPIまたは動作を使用する必要があります。両方のプラットフォームの内訳は次のとおりです。 Android固有のテスト:SharedPreferencesのテスト Android では、 SharedPreferences を使用してデータストレージをテストする必要がある場合があります。AndroidXの ApplicationProvider を使用してテストコンテキストにアクセスするセットアップを次に示します。 @RunWith(AndroidJUnit4::class) class SharedPreferencesTest { private lateinit var sharedPreferences:SharedPreferences private val expectedAppStartCount = 10 @BeforeTest fun setUp() { val context = ApplicationProvider.getApplicationContext<Context>() sharedPreferences = context.getSharedPreferences(SHARED_PREF_NAME, Context.MODE_PRIVATE) } @AfterTest fun tearDown() { sharedPreferences.edit().clear().apply() } @Test fun checkAppStartCountStoresCorrectly() { sharedPreferences.edit().putInt(KEY_APP_START_COUNT, expectedAppStartCount).apply() val actualAppStartCount = sharedPreferences.getInt(KEY_APP_START_COUNT, -1) assertEquals(expectedAppStartCount, actualAppStartCount) } companion object { private const val SHARED_PREF_NAME = "test_prefs" private const val KEY_APP_START_COUNT = "app_start_count" } } このプラットフォーム依存的なテストは、 androidInstrumentedTest 内に配置する必要があり、実行するにはエミュレーターまたは実際のAndroidデバイスが必要になります。 iOS固有のテスト:NSUserDefaultsのテスト iOSでは、同様のロジックを NSUserDefaults でテストできます。通常、このテストは、以下に示すように iosTest において記述します。 class NSUserDefaultsTest { private lateinit var userDefaults:NSUserDefaults private val expectedAppStartCount = 10 @BeforeTest fun setUp() { userDefaults = NSUserDefaults.standardUserDefaults() } @AfterTest fun tearDown() { userDefaults.removeObjectForKey(KEY_APP_START_COUNT) // Clean up after test } @Test fun `test app start count stores correctly in NSUserDefaults`() { userDefaults.setObject(expectedAppStartCount, forKey = KEY_APP_START_COUNT) val actualAppStartCount = userDefaults.integerForKey(KEY_APP_START_COUNT) assertEquals(expectedAppStartCount, actualAppStartCount.toInt()) } companion object { private const val KEY_APP_START_COUNT = "app_start_count" } } 複雑なテストセットアップ:相互依存関係のテスト 高度なテストでは、相互に作用する複数の依存関係をシミュレートする必要がある場合があります。以下は、API クライアントとローカルキャッシュの両方に依存するリポジトリが関与する例です。 class ComplexRepositoryTest { private val apiService = mock<ApiService>() private val localCache = mock<LocalCache>() private val repository = ComplexRepository(apiService, localCache) @Test fun `fetch data from local cache`() = runTest { everySuspend { localCache.getArticles() } returns mockNewsArticles val data = repository.getNewsArticles() assertEquals(mockNewsArticles.size, data.size) verifySuspend { localCache.getArticles() } } @Test fun `fetch data from remote source`() = runTest { everySuspend { localCache.getArticles() } returns emptyList() everySuspend { apiService.getNews(defaultSectionName) } returns TopStoryResponse(mockNewsArticles) everySuspend { localCache.insertAllArticles(mockNewsArticles) } returns Unit val data = repository.getNewsArticles() assertEquals(mockNewsArticles.size, data.size) verifySuspend { localCache.getArticles() apiService.getNews(defaultSectionName) localCache.insertAllArticles(mockNewsArticles) } } } この例では、 リポジトリは最初にキャッシュをチェックし、キャッシュが空の場合にのみAPIを呼び出します。 私たちは相互作用を検証することで、リポジトリが意図したフローに従い、不必要にAPIを呼び出さないようにしています。 上記のすべてにより、共通、Android、およびiOS実装のテストの記述が完了しました。これらのテストを個別に実行することも、 allTests という名前のGradleタスクを使用してすべてのテストを一度に実行することもできます。これにより、プロジェクト内のすべてのテストが、対応するテストランナーで実行されます。![Gradle task allTests](/assets/blog/authors/ahsan_rasel/2024-12-24-testing-kmp/gradle-all-test-task.png =800x) テストを実行するたびに、 shared/build/reports/ ディレクトリ内にHTMLレポートが生成されます。 ![Test report](/assets/blog/authors/ahsan_rasel/2024-12-24-testing-kmp/test-report.png =550x) このようにして、当社のKMPの取り組みを進めながら、適切に調整されたテストでアプリの品質を確保することができます。 複雑なKMPテストのベストプラクティス テストセットアップを分離する :ヘルパー関数やクラスを作成してモックの設定を行い、繰り返しコードを削減します。 非同期動作を制御する :kotlinx-coroutines-testを使用して、コルーチンのタイミングを制御し、遅延やネットワーク応答をシミュレートします。 クロスプラットフォームテストとプラットフォーム固有のテストをミックスする :ネイティブ動作にはプラットフォーム固有のテストを使用し、共有ロジックにはクロスプラットフォームテストを使用します。 テスト範囲をモニターする :特に、依存関係のある複雑なフローについては、包括的なカバレッジを確保します。 結論 Kotlin Multiplatformにおけるクロスプラットフォームテストでは、単純なテストシナリオと複雑なテストシナリオを処理でき、AndroidとiOS全体でコードの信頼性を確保するための強力なツールが得られます。再利用可能なテストをセットアップし、非同期動作を制御し、依存関係を分離することで、重要なビジネスロジックを検証して全体的なコード品質を向上させる高度なテストを記述することができます。 これらの手法により、KMPプロジェクトはプラットフォーム間で一貫性のある信頼性の高いパフォーマンスを発揮できるようになり、あらゆる場所のユーザーにシームレスな体験を提供できるようになります。KMPを楽しんでください!