TOOL WIKI · AGENT SDKS

Semantic Kernel

Connects application functions and model capabilities through plugins and agent abstractions.

Download example files Code + setup + checks in a ZIP
Jump to a section 10 sections

EXAMPLE USE CASE

Establish a chat-agent baseline over supplied facts

A developer needs a small, observable agent or retrieval step before connecting real business services.

Input
A prompt containing the explicit fixture A104=packed.
Expected output
A response preserving packed; absent facts should become not_found.
  • Success check: The response reports packed from the supplied fixture. This is a basic chat-agent integration, before adding plugins.
  • Try a failure: Remove the status from the prompt and require the agent to acknowledge missing evidence.

Example scope: Actual ChatCompletionAgent call; this small baseline has no tool plugin or database.

Official reference · Semantic Kernel

WHAT IT ISAI development kit
WHERE IT FITSAgent SDKs
SEE HOW THE SYSTEM FITS TOGETHERSELECT A COMPONENT
taskinvokedecisiontool callresultstatemeasureApplicationTask + identitySemantic KernelAI development kitModel providerConfigured API modelTool serviceAuthorization + executionState storageRun and thread progressEvaluationOutcome + evidence
  1. Authenticate the request and define the goal before calling the framework.

  2. Integrating AI behavior into an existing application codebase. Review the interfaces supported by your chosen language and package version.

  3. The application supplies provider credentials, model selection, and budgets.

  4. Validate each operation and return authoritative observations.

  5. Choose the checkpoint or session store and its retention policy deliberately.

    Result or stopping point
  6. Check completion, cost, latency, and tool behavior against fixtures.

    Result or stopping point
Semantic Kernel

Integrating AI behavior into an existing application codebase. Review the interfaces supported by your chosen language and package version.

Follow the arrows, then select a component to inspect its responsibility. On mobile, downward arrows connect the next step; bent arrows identify branches and return paths. Select a destination to jump to that component.

When to consider it

  • Integrating AI behavior into an existing application codebase.

A design decision to make

  • Review the interfaces supported by your chosen language and package version.

Prerequisites and setup

  • Python 3.11+ in an empty directory. A compatible model and provider credentials are required.
  • Running the model-backed example can incur API charges; this website displays it without calling a provider.
Shell
python3 -m venv .venv
source .venv/bin/activate
pip install semantic-kernel
export OPENAI_API_KEY="YOUR_API_KEY"
export OPENAI_MODEL="YOUR_ENABLED_MODEL"

Try a small integration

example.py

Python · example.py
import asyncio
import os
from semantic_kernel.agents import ChatCompletionAgent
from semantic_kernel.connectors.ai.open_ai import OpenAIChatCompletion

async def main():
    agent = ChatCompletionAgent(name="OrderReader",
        service=OpenAIChatCompletion(ai_model_id=os.environ["OPENAI_MODEL"],
            api_key=os.environ["OPENAI_API_KEY"]),
        instructions="Read only the supplied fixture. If missing, return not_found.")
    response = await agent.get_response("Fixture: A104=packed. What is A104's status?")
    print(response.content)

asyncio.run(main())

Run and check the result

Shell
python example.py
  • The response reports packed from the supplied fixture. This is a basic chat-agent integration, before adding plugins.
  • Change the question to A999; it should report not_found.

Common failures

  • 401 or model-not-found: verify the provider key, project and configured model identifier.
  • A repeated tool call needs a bounded loop and a clear not-found result; do not raise limits blindly.

Production decisions

  • Bind tool execution to the authenticated user and resource permissions. Keep keys in server environment variables.
  • Add deadlines, a turn budget, redacted traces, regression fixtures and explicit handling for refused or incomplete runs.
  • Expose business capabilities through typed kernel plugins; explicitly configure function-choice behavior and enforce authorization inside each plugin.

Keep exploring

Workflow, single agent, or multiple agents?Build an explicit agent loop with LangGraph

Explore the same layer

OpenAI Agents SDKClaude Agent SDKGoogle ADKLangGraph

Compare candidates on your own workload. This entry describes a product’s role; it is not a claim that products in the category are interchangeable.