Microsoft Agent Framework
Give a Microsoft Agent Framework agent Bowmark's typed functions for live websites with agent-framework-bowmark: two function tools, their instructions, one API key.
Reading this with an agent?
curl -s https://bowmark.ai/docs/agent-framework.md. The whole site as one file: https://bowmark.ai/llms-full.txt. Index of every page: https://bowmark.ai/llms.txt.agent-framework-bowmark gives a Microsoft Agent Framework
agent the same two calls every Bowmark caller makes: read the function library for a task,
then run a short script against it on the live sites. It also ships the instructions that
tell the model how to use them.
Source: bowmark-ai/agent-framework-bowmark.
Install
pip install agent-framework-bowmark
export BOWMARK_API_KEY="bmk_..."Make the key at dashboard/keys. New accounts get $10 of free usage with no card (Pricing).
Use it
import asyncio
from agent_framework import Agent
from agent_framework.openai import OpenAIChatClient
from agent_framework_bowmark import BowmarkTools
bowmark = BowmarkTools()
agent = Agent(OpenAIChatClient(), instructions=bowmark.instructions, tools=bowmark.tools)
result = asyncio.run(agent.run("What are the top 3 stories on Hacker News right now?"))
print(result.text)The tools
| Tool | What it does |
|---|---|
bowmark_get_library | Returns the typed functions for a task or a site, with their types and examples. Read-only, free, touches no site. Same as GET /v1/library. |
bowmark_run | Runs an async JavaScript script against those functions on the live sites and returns { ok, status, result, logs, error, runId }. Same as POST /v1/run. |
Options
| Option | Default | What it does |
|---|---|---|
api_key | BOWMARK_API_KEY | Your Bowmark key. |
base_url | https://api.bowmark.ai | The API to call. |
bowmark.instructions is plain text: add it to your agent's instructions, or write your own.
A run that fails comes back as an envelope with error set, so the model can read it, fix
its script and try again. See Scripting for what a script can call.