Upgrade to Pro — share decks privately, control downloads, hide ads and more …

今年の抱負を達成するためにAIエージェントを作った話

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
Avatar for こば こば
January 15, 2026
53

 今年の抱負を達成するためにAIエージェントを作った話

Avatar for こば

こば

January 15, 2026

Transcript

  1. CDK のAgentCore 設定部分(これだけで動いていいの?) // エージェントのDockerfileのディレクトリを指定 const agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromAsset( path.resolve(__dirname,

    "..", "agent") ); // AgentCoreのランタイムの設定 const agentRuntime = new agentcore.Runtime(this, "AnkiAgentRuntime", { runtimeName: "AnkiAgent", agentRuntimeArtifact: agentRuntimeArtifact, description: "Ankiの英単語フラッシュカードを作成するエージェント", }); // ランタイムにモデルを呼び出す権限付与 agentRuntime.addToRolePolicy( new iam.PolicyStatement({ effect: iam.Effect.ALLOW, actions: [ "bedrock:InvokeModel", "bedrock:InvokeModelWithResponseStream", ], resources: [ "arn:aws:bedrock:*::foundation-model/*", `arn:aws:bedrock:${this.region}:${this.account}:inference-profile/*`, ], }), ); 13