# TechForAGI Gateway — LLM and Generative Engine Summary ## Definition TechForAGI Gateway is an agent-native information and compute gateway where autonomous AI agents can discover, understand, consume, and eventually pay for trusted machine-readable services. It is not a chatbot platform. It is not a traditional SaaS dashboard. It is designed for AI agents first, humans second. **Organization:** TechForAGI is an extension of **Tech For People Global Corp**—the public gateway for that company's agent-consumable infrastructure line. Corporate site: ## Who is this for? - Autonomous AI agents and LLM-based systems - Developers building AI agents - AI automation platforms and orchestrators - Agent marketplaces and multi-agent systems - Generative search engines and AI-powered crawlers ## What makes TechForAGI agent-native? - Every endpoint returns structured machine-readable data (JSON or TOON) - Every response includes a unique request_id, cost_usd, and latency_ms - Services are discoverable via /.well-known/agent.json and /services.toon - Pricing is exposed per-service in /pricing.toon and /pricing.json - Capabilities are documented in /capabilities.toon and /capabilities.json - An MCP-compatible JSON-RPC endpoint is exposed at POST /mcp - An OpenAPI 3.1 spec is available at /openapi.json - No GUI required to use any service ## Agent Channels Sandbox (Phase 3.6) - Autonomous agents can **self-register** at POST /agent-channels/register and receive a bearer token (shown once; store securely). - Token format: tfagi_channel_test_<prefix>_<secret>. Pass as Authorization: Bearer or X-Agent-Channel-Token. Never in query strings. - **REQUIRE_AGENT_CHANNELS** is enabled in production configuration: POST /process and MCP processing tools require a valid channel token. Discovery routes stay public. - **No payment** is required; billing_mode is functional_testing; cost_usd is informational. Quotas and rate limits apply. Future x402/USDC is planned only. - Recommended: GET /.well-known/agent.json, GET /services.toon, GET /pricing.toon, POST /agent-channels/register, then POST /quote and POST /process with the token; read auth and quota in response meta. ## Services Phase 3 real deterministic services (no AI, no model calls): - url.readability.extract: Fetch a public URL and extract clean article text, title, byline, excerpt, word count, links, and metadata. Mozilla Readability. Price: $0.003/request. Status: active. - document.basic_extract: Extract emails, URLs, dates, amounts, phones, hashtags, mentions, headings, and counts from plain text using deterministic regex rules. No AI. Price: $0.002/request. Status: active. Phase 3.6 premium deterministic utilities (no YouTube, no LLM): - web.metadata.audit: HTML metadata audit (title, description, canonical, OpenGraph, Twitter card, JSON-LD, robots meta, counts, quality score). Price: $0.003/request. Reliability: high. - robots.policy.check: Fetch origin /robots.txt and evaluate allow/disallow for a user-agent (default TechForAGI-Agent). Price: $0.002/request. Reliability: high. - captions.parse: Parse SRT, WebVTT, or plain transcript into segments. Price: $0.002/request. Reliability: high. Deprecated YouTube-related services (service_id still accepted on POST /process for discovery; execution returns HTTP 410 Gone): - youtube.captions.get: DEPRECATED. No longer executed. Catalog price_usd=0. - youtube.video.formats: DEPRECATED. No longer executed. Catalog price_usd=0. Deprecated Phase 1/2 mock services (kept for backwards compatibility): - text.summarize: DEPRECATED mock. Price: $0.001/request. - doc.extract: DEPRECATED mock. Price: $0.004/request. - knowledge.search: DEPRECATED mock. Price: $0.002/request. ## Capabilities - summarization: text → summary (low risk) - entity_extraction: text → entities (low risk) - knowledge_retrieval: query → facts+sources (medium risk) - web_metadata_audit: public URL → metadata audit (low risk) - robots_policy_evaluation: url + user-agent → policy decision (low risk) - caption_transcript_parsing: caption text → timed segments (low risk) - cost_estimation: service_id → quote (low risk) - format_negotiation: accept_header → response_format (low risk) - mcp_tool_call: json_rpc → tool_result (medium risk) - agent_discovery: http → manifest+catalog (low risk) - usage_metering: service_call → usage_event (low risk) - future_stablecoin_payment: payment_proof → receipt (medium risk, planned) ## Main Endpoints - GET https://techforagi.com/.well-known/agent.json — Agent discovery manifest - GET https://api.techforagi.com/services.json — Service catalog (JSON) - GET https://api.techforagi.com/services.toon — Service catalog (TOON, compact) - GET https://api.techforagi.com/pricing.json — Pricing metadata per service (JSON) - GET https://api.techforagi.com/pricing.toon — Pricing metadata per service (TOON) - GET https://api.techforagi.com/capabilities.json — Capability catalog (JSON) - GET https://api.techforagi.com/capabilities.toon — Capability catalog (TOON) - POST https://api.techforagi.com/quote — Estimate cost and latency - POST https://api.techforagi.com/process — Execute a real service (Phase 3: real services + Supabase metering) - POST https://api.techforagi.com/mcp — MCP-compatible JSON-RPC endpoint - GET https://api.techforagi.com/openapi.json — OpenAPI 3.1 specification - GET https://api.techforagi.com/payments/future-contract.json — Future payment contract - GET https://techforagi.com/examples — Public integration examples - GET https://api.techforagi.com/examples/agent-workflow.toon — Agent workflow example (TOON) - GET https://api.techforagi.com/examples/agent-workflow.json — Agent workflow example (JSON) - GET https://api.techforagi.com/examples/curl — curl examples - GET https://api.techforagi.com/examples/mcp — MCP JSON-RPC examples - GET https://api.techforagi.com/examples/web-metadata-audit — web.metadata.audit example JSON - GET https://api.techforagi.com/examples/robots-policy-check — robots.policy.check example JSON - GET https://api.techforagi.com/examples/captions-parse — captions.parse example JSON - GET https://techforagi.com/for-agents — Agent-focused integration page - GET https://techforagi.com/for-developers — Developer integration page - GET https://techforagi.com/security — Security posture page - GET https://api.techforagi.com/health — Service health check - GET https://api.techforagi.com/status — Alias of /health - GET https://api.techforagi.com/version — Version metadata - GET https://techforagi.com/llms.txt — This file - GET https://techforagi.com/docs — Human and LLM-readable documentation ## Supported Formats - JSON (application/json): Standard JSON. Default format for all API endpoints. - TOON (text/toon): Token-Oriented Object Notation. ~40% fewer tokens than JSON. Tabular arrays with key[N]{fields} header, YAML-style indented objects. Ideal for LLM context windows. Use the Accept header to request a specific format: Accept: text/toon Accept: application/json ## Recommended Agent Workflow 1. Fetch agent manifest: GET /.well-known/agent.json 2. Discover services: GET /services.toon (compact for LLM context) 3. Check pricing: GET /pricing.toon 4. Estimate cost: POST /quote with {service_id, input_tokens_estimate} 5. Process request: POST /process with {service_id, input} 6. Store meta from every response: {request_id, cost_usd, latency_ms, status} ## Public Validation and Examples Phase 3.5 ships public examples, audience pages, smoke/OpenAPI validation scripts, and Agent Channels sandbox artifacts for external agents and developers. - https://techforagi.com/examples — Human-readable public examples page - https://api.techforagi.com/examples/agent-workflow.toon — Compact TOON workflow for agents - https://api.techforagi.com/examples/agent-workflow.json — JSON workflow for clients - https://api.techforagi.com/examples/curl — curl commands for local and deployed validation - https://api.techforagi.com/examples/mcp — MCP JSON-RPC request examples - https://techforagi.com/for-agents — Integration guidance for autonomous agents - https://techforagi.com/for-developers — Integration guidance for developers - https://techforagi.com/security — Current security posture and constraints Local smoke testing: npm run dev npm run smoke npm run validate:openapi Deployed smoke testing: BASE_URL=https://api.techforagi.com npm run smoke PUBLIC_BASE_URL=https://api.techforagi.com npm run validate:public ## Pricing Model - Per-request USD pricing - No subscription required - No payment required in Phase 3 (usage is metered to Supabase; no charge) - Pricing is exposed for agent discovery and future billing readiness - Settlement asset: USDC (planned) - Payment protocols planned: x402, credits, api_key ## Future Payment Model TechForAGI is designed to support autonomous agent payments without human intervention. Payments are not active in Phase 3.5. Future versions are planned to support x402-compatible stablecoin settlement, initially using USDC. Planned payment flow: 1. Agent calls POST /quote to get estimated cost 2. Agent calls POST /process 3. Future: Gateway returns HTTP 402 Payment Required with payment details 4. Future: Agent submits payment proof 5. Future: Gateway verifies payment and processes request 6. Future: Response includes receipt: tx_hash, amount_settled, wallet_address Full future payment contract: https://api.techforagi.com/payments/future-contract.json ## MCP Compatibility TechForAGI Gateway exposes an MCP-compatible endpoint at POST /mcp using JSON-RPC 2.0. Phase 3.5 note: MCP is a hand-implemented JSON-RPC surface. Full MCP SDK transport validation may be evaluated in a later release. Available MCP tools: - get_services: List all available services - get_pricing: Get pricing metadata for all services - get_capabilities: List all platform capabilities - quote_service: Estimate cost for a service call - extract_url_readability: Fetch URL and extract article text (url.readability.extract) - extract_document_basic: Deterministic field extraction (document.basic_extract) - audit_web_metadata: Run web.metadata.audit - check_robots_policy: Run robots.policy.check - parse_captions: Run captions.parse - get_youtube_captions: DEPRECATED — tools/call returns an error - get_youtube_video_formats: DEPRECATED — tools/call returns an error - process_text: Summarize text (text.summarize) - extract_document: Extract fields from a document (doc.extract) - search_knowledge: Search knowledge sources (knowledge.search) - get_payment_future_contract: Get the future payment contract specification ## Safety Notes - Inputs are validated and capped at 32,000 characters - No arbitrary code execution - No filesystem access from MCP tools - No dynamic fetches to unknown URLs - All tool inputs are validated with Zod - Every error response includes a request_id for tracing ## Discovery Files - https://techforagi.com/.well-known/agent.json — Agent manifest - https://api.techforagi.com/services.toon — Service catalog (TOON) - https://api.techforagi.com/pricing.toon — Pricing metadata (TOON) - https://api.techforagi.com/capabilities.toon — Capability catalog (TOON) - https://api.techforagi.com/openapi.json — OpenAPI 3.1 spec - https://techforagi.com/llms.txt — This file - https://techforagi.com/robots.txt — Crawler config - https://techforagi.com/sitemap.xml — XML sitemap ## Positioning TechForAGI Gateway is: - Agent-native infrastructure - An AI agent API gateway - An MCP server for AI agents - Autonomous agent compute services - API for autonomous agents - AGI infrastructure - x402-payment-ready (planned) - USDC-settlement-ready (planned)