Bring AI into your product. Amplifier Agent handles the agentic engineering, so you can focus on the experience.
Documentation • Install • Python • TypeScript • HTTP
Amplifier Agent is a library that you embed in your Python or TypeScript application. Any other application that supports chat completions can use it through an HTTP service. Name a model, set the tools, and give it a task. The agent reasons, acts, and reports back.
-
In your application project, ask your agent:
Install the Amplifier Agent skill from microsoft/amplifier-agent.
-
Ask it for the AI part of your application:
I'm building [describe your application]. Use Amplifier Agent as its intelligence layer.
Build a knowledge base from our docs folder. Use the llm-wiki example in microsoft/amplifier-agent as a model.
-
Your agent installs the library and writes the integration on the public API.
All teams can use the same models now. A good agent comes from the layer above the model: the context it gets, the tools it can use, and how it keeps long tasks on track. Amplifier Agent is that layer. We build it once, so each product does not have to build it again.
- Use the model you want. Nine providers use one interface. Use an API key, a GitHub Copilot or ChatGPT subscription, or a local model. Change the model during a session and keep the conversation.
- Add your own tools. Give the agent a function from your application, or connect an MCP server. Your tools work next to the built-in tools for files, shell, search, and web.
- Let it do the long work. The agent sends tasks to sub-agents, loads skills when it needs them, and compacts history before it fills the context window.
- Integrate it easily, with your coding agent too. A few lines start an agent in Python or TypeScript. An integration skill teaches your coding agent to build with the library.
- Open. It is open source under the MIT license, and it is not tied to one model vendor.
The skill teaches your coding agent to build on the library.
# Add -g for global
npx skills add microsoft/amplifier-agent --skill amplifier-agentYou need uv and Git. If you do not have Python 3.12, 3.13, or 3.14, uv installs it for you.
uv add "amplifier-agent[github-copilot] @ git+https://github.com/microsoft/amplifier-agent#subdirectory=packages/python" --tag v0.25.0You need Node 22 on Linux x86-64 or macOS on Apple silicon. WSL2 is supported.
npm install amplifier-agent-ts@0.22.0The HTTP face is a separate service. It serves an OpenAI-compatible chat completions API for clients that cannot embed a library.
Refer to the installation guide for all options.
Set OPENAI_API_KEY in your environment. Save this file as hello.py in your application directory, then run
uv run python hello.py:
import asyncio
from amplifier_agent import create_agent, AgentOptions, SessionOptions, TurnInput, TextPart
async def main():
async with await create_agent(
AgentOptions(
provider="openai",
model="gpt-6.1-sol",
)
) as agent:
session = await agent.create_session(SessionOptions(persistence="ephemeral"))
result = await session.run(TurnInput(content=[TextPart("Say hello.")]))
if result.error is not None:
raise RuntimeError(f"{result.error.message} {result.error.remedy}")
print("".join(part.text for part in result.content or []))
asyncio.run(main())The TypeScript quickstart shows the same example in TypeScript.
Tools need an approval policy. This agent works in the current directory and asks you before each tool call:
import asyncio
from amplifier_agent import (
ApprovalResponse,
AgentOptions,
SessionOptions,
TurnInput,
TextPart,
create_agent,
)
async def approve(request):
print(f"{request.name}: {request.summary}")
answer = await asyncio.to_thread(input, "[y/N] ")
return ApprovalResponse(decision="allow" if answer == "y" else "deny")
async def main():
async with await create_agent(
AgentOptions(
provider="openai",
model="gpt-6.1-sol",
working_directory=".",
approvals=approve,
)
) as agent:
session = await agent.create_session(SessionOptions(persistence="ephemeral"))
result = await session.run(
TurnInput(content=[TextPart("Find the Python files here and summarize what each one does.")])
)
print(result.state, "".join(part.text for part in result.content or []))
asyncio.run(main())approvals="allow" approves all tool calls with no prompt, including shell commands. Use it only where that is safe.
- Watch a turn as it runs:
start_turngives you the turn as a stream of events. - Add your own tools and MCP servers.
- Resume a session later. Sessions are durable by default.
- Add skills and named agents.
- Select a provider and set credentials.
- Change the model during a session. The conversation stays.
- Set options outside your code.
- Learn from the examples: applications built on the public API.
Start at docs/index.md for how the bindings, engine, and HTTP face fit together. Where the documentation and the contracts disagree, the contracts are correct.
- muxplex is a web dashboard for tmux sessions. Its agent chat panel uses Amplifier Agent.
- amplifier-app-opencode makes Amplifier Agent the agent inside opencode. Its opencode plugin runs the HTTP face and shows Amplifier's reasoning, tool calls, and file changes in opencode.
Smart Tools are expertise packaged as a tool that any agent can use. You state what you need, the tool has the knowledge, and you get the result. These Smart Tools use Amplifier Agent:
- Smart Tool Creator creates Smart Tools. It makes the structure that the spec requires, checks a tool against the spec, and adds model-backed capabilities to it.
- Digital Twin Universe starts isolated, realistic environments from a profile with Docker Compose. Agents use them to test software in a clean environment.
- Showrun records application walkthroughs. You describe what to show, and it operates the real app in a browser or native window and records a video.
See docs/DEVELOPMENT.md.
Note
This project is not currently accepting external contributions, but we're actively working toward opening this up. We value community input and look forward to collaborating in the future. For now, feel free to fork and experiment!
Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit Contributor License Agreements.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.
MIT. See LICENSE.
🤖 Built with Amplifier.