simple_agents_framework
A markdown file in, a callable agent out. One Python file over the Claude Agent SDK.
import simple_agents_framework as saf
agent = saf.create_agent_from_markdown("doc_reader.md", API_KEY)
agent.ask("which markdown files are here?") # -> str
agent.ask_html("...") # same, streamed as HTML in Jupyter
Agent files
Frontmatter configures, body is the system prompt. Every key is optional:
| key | effect |
|---|---|
name |
agent name (defaults to the filename) |
model |
e.g. claude-sonnet-5 |
tools |
comma-separated allowlist, e.g. Read, Grep, Glob |
permission_mode |
defaults to bypassPermissions — headless agents can't answer prompts |
Anything else passes through as a ClaudeAgentOptions kwarg:
create_agent_from_markdown(path, key, cwd="/repo", max_turns=5).
API
ask(prompt) -> str— blocks, works inside Jupyter too.ask_html(prompt) -> str— same run, streamed into the cell: blue sent, green agent, slate thinking, amber tool call, cyan tool result, red error. The agent's text fills in token by token; tool calls and results appear whole.ask_async(prompt, on_event=None)—on_event(kind, title, body, replace)per update.replace=Truemeans "same block, more text": redraw the last thing you drew instead of appending. Build your own renderer on this.
Follow-up asks resume the previous session, so context carries over.
Files
simple_agents_framework.py— the whole thing.python simple_agents_framework.pyruns its self-check.doc_reader.md— example agent: reads the markdown in a project and answers questions about it.demo.ipynb— end-to-end walkthrough with streamed output.
Gotcha
The SDK spawns whatever claude is first on PATH. Some tools install a
wrapper there that never returns headlessly — if ask() hangs, pass
cli_path=Path.home() / ".local/bin/claude".
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simple_agents_framework-0.1.1.tar.gz.
File metadata
- Download URL: simple_agents_framework-0.1.1.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0108fb97197c33bb498e13e0e578081960d0563e2f30e4c46095618bdba11e6c
|
|
| MD5 |
55c45618a10cf59c97802c8c2779f45a
|
|
| BLAKE2b-256 |
c059340635a23556ae1105545daa93fe07d68846db112fef859aadb586cf40e3
|
File details
Details for the file simple_agents_framework-0.1.1-py3-none-any.whl.
File metadata
- Download URL: simple_agents_framework-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b335bf827d517089084caf634832d40073a6367e77ff72a63793848d2249b506
|
|
| MD5 |
b8975d518a8eca1301348f7581d27a8f
|
|
| BLAKE2b-256 |
22c29bc07a71e131ef405a8d5fd9305ef5cc1f306996dda98a2c777068d2e9ab
|