Skip to main content

fetch-agents

Python client for the AgentsLab AI agent services.

Three agents, one SDK:

  • Code Context Agent — slim, map, extract, mark code layers
  • Context Doctor — compress, analyze, optimize LLM context windows
  • AI Teleporter — teleport, search, merge chat export knowledge bases

Install

pip install fetch-agents

Quick Start

from fetch_agents import FetchAgents

# Register once (free, no email required)
info = FetchAgents.register(name="myapp")
api_key = info["api_key"]  # save this

client = FetchAgents(api_key=api_key)

# Slim a code file to only the layers relevant to your task
result = client.slim(
    url="https://raw.githubusercontent.com/you/repo/main/app.py",
    task="fix the auth handler"
)
print(result["context"])

# Compress LLM context to reduce tokens
result = client.compress(text="...long assistant output...", max_length=200)
print(result["compressed"])

# Teleport a chat export into a searchable knowledge base
with open("chatgpt_export.json") as f:
    data = f.read()
index = client.teleport(data)
hits = client.search(index["index_id"], query="how do I fix auth?")

API Key via Environment

export FETCH_API_KEY=fak_xxx
client = FetchAgents()  # picks up FETCH_API_KEY automatically

Free Tier

50 requests/day per key, no credit card needed. For higher volume, top up with crypto:

invoice = client.topup(amount_usd=5, currency="btc")
print(invoice["pay_url"])  # pay this address

Supported: BTC, LTC, BCH, DOGE, TRX, ETH, BNB, USDT, USDC, and more.

All Methods

Method Agent Description
register(name) — Self-service registration, returns API key
me() — Quota + balance
topup(amount_usd, currency) — Create crypto invoice
topup_status(invoice_id) — Check invoice status
currencies() — List supported currencies
slim(url, task) Code Context Relevant layers only
map(url) Code Context List all LAYER sections
extract(url, layer) Code Context Extract one layer
mark(url) Code Context Auto-insert LAYER markers
compress(text, max_length) Context Doctor Token-compress text
analyze(messages) Context Doctor Score messages by importance
optimize(messages) Context Doctor Remove noise, compress verbose turns
extract_memory(messages) Context Doctor Extract structured facts
teleport(data) AI Teleporter Upload chat export, create index
search(index_id, query, top_k) AI Teleporter Semantic search
merge(index_ids) AI Teleporter Merge indexes
formats() AI Teleporter List supported export formats

Links

Metadata

Release files for fetch-agents 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fetch-agents 0.1.0
File Size Uploaded
fetch_agents-0.1.0.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fetch-agents 0.1.0
File Interpreter ABI Platform
fetch_agents-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.1 kB

Release files / fetch_agents-0.1.0.tar.gz

Download URL fetch_agents-0.1.0.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
55dfb1f611cde03aab7665043eb1a77e13db92ce6f417b32bb9c39bb406120c1
BLAKE2b-256 checksum
How to use checksums
f5d30387c6784760d1ae9f81b5041136829484ab934d8829190d9f72ccaba86a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / fetch_agents-0.1.0-py3-none-any.whl

Download URL fetch_agents-0.1.0-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba5fa4019d278e0832a4dab88c3024fddccb6e79dfecd9d1a4152877f476d22d
BLAKE2b-256 checksum
How to use checksums
68420dc7b5f3ccfea5b56c97392244d45aa61151d89a5c6314026f908c5a32bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page