
{"id":258511,"date":"2026-12-02T11:32:43","date_gmt":"2026-12-02T11:32:43","guid":{"rendered":"https:\/\/mycryptomania.com\/?p=258511"},"modified":"2026-12-02T11:32:43","modified_gmt":"2026-12-02T11:32:43","slug":"langchain-playground-part-24-apis-external-tools","status":"publish","type":"post","link":"https:\/\/mycryptomania.com\/?p=258511","title":{"rendered":"LangChain Playground \u2014 Part 24: APIs &amp; External Tools"},"content":{"rendered":"<p><strong>API and External\u00a0Tools<\/strong><\/p>\n<h3>Your agents can think. Your agents can collaborate. Now let\u2019s connect them to the real\u00a0world.<\/h3>\n<p>In the previous parts, we built a serious AI architecture.<\/p>\n<p>We started\u00a0with:<\/p>\n<p>LLM<br \/> \u2193<br \/>Prompt<br \/> \u2193<br \/>Structured Output<br \/> \u2193<br \/>Runnable<br \/> \u2193<br \/>Chain<br \/> \u2193<br \/>RAG<br \/> \u2193<br \/>Tools<br \/> \u2193<br \/>Tool Calling<br \/> \u2193<br \/>Agent<br \/> \u2193<br \/>Agentic Workflow<br \/> \u2193<br \/>LangGraph<br \/> \u2193<br \/>Multi-Agent System<\/p>\n<p>But there is still a major limitation.<\/p>\n<p>An AI system can reason about information.<\/p>\n<p>It can retrieve documents.<\/p>\n<p>It can select\u00a0tools.<\/p>\n<p>It can coordinate agents.<\/p>\n<p>But your business already has systems that actually <strong>do\u00a0things<\/strong>.<\/p>\n<p>For example:<\/p>\n<p>CRM<br \/>ERP<br \/>Payment System<br \/>Hospital System<br \/>E-commerce Platform<br \/>Email Service<br \/>SMS Service<br \/>Inventory System<br \/>Analytics Platform<br \/>Database<\/p>\n<p>How does our AI communicate with\u00a0them?<\/p>\n<p>Through APIs and external\u00a0tools.<\/p>\n<p>Welcome to:<\/p>\n<h3>LangChain Playground\u200a\u2014\u200aPart\u00a024<\/h3>\n<h3>APIs &amp; External\u00a0Tools<\/h3>\n<h3>\ud83e\udde0 1. AI Doesn\u2019t Live\u00a0Alone<\/h3>\n<p>Imagine a customer\u00a0asks:<\/p>\n<p><em>\u201cWhat is the status of my\u00a0order?\u201d<\/em><\/p>\n<p>The AI doesn\u2019t magically know the latest order\u00a0status.<\/p>\n<p>The actual information may exist\u00a0here:<\/p>\n<p>Customer<br \/>   \u2193<br \/>AI Assistant<br \/>   \u2193<br \/>Order API<br \/>   \u2193<br \/>Order Database<br \/>   \u2193<br \/>Current Status<br \/>   \u2193<br \/>AI Assistant<br \/>   \u2193<br \/>Customer<\/p>\n<p>The AI is acting as an interface between the user and your existing\u00a0systems.<\/p>\n<p>This is one of the most important concepts in enterprise AI.<\/p>\n<h3>\ud83c\udf0d 2. What Is an External\u00a0Tool?<\/h3>\n<p>An external tool is a capability provided by another\u00a0system.<\/p>\n<p>For example:<\/p>\n<p>Weather Tool<br \/>    \u2193<br \/>Weather APIOrder Tool<br \/>    \u2193<br \/>E-commerce APICustomer Tool<br \/>    \u2193<br \/>CRM APIPayment Tool<br \/>    \u2193<br \/>Payment ServiceSearch Tool<br \/>    \u2193<br \/>Search API<\/p>\n<p>The AI doesn\u2019t need to know how the underlying service\u00a0works.<\/p>\n<p>It needs a safe interface.<\/p>\n<h3>\ud83d\udd0c 3. API vs\u00a0Tool<\/h3>\n<p>These two concepts are related but different.<\/p>\n<h3>API<\/h3>\n<p>An API is the interface exposed by a software\u00a0system.<\/p>\n<p>For example:<\/p>\n<p>GET \/orders\/{order_id}<\/p>\n<p>might return:<\/p>\n<p>{<br \/>  &#8220;order_id&#8221;: &#8220;ORD-1001&#8221;,<br \/>  &#8220;status&#8221;: &#8220;shipped&#8221;<br \/>}<\/p>\n<h3>Tool<\/h3>\n<p>A tool is the capability your AI application exposes to the\u00a0model.<\/p>\n<p>Conceptually:<\/p>\n<p>LLM<br \/> \u2193<br \/>Tool<br \/> \u2193<br \/>API<br \/> \u2193<br \/>External System<\/p>\n<p>The tool becomes an adapter between the AI and the\u00a0API.<\/p>\n<h3>\ud83c\udfd7\ufe0f 4. The Architecture<\/h3>\n<p>A production AI application might look\u00a0like:<\/p>\n<p>                    USER<br \/>                      \u2193<br \/>                  AI AGENT<br \/>                      \u2193<br \/>                 TOOL CALL<br \/>                      \u2193<br \/>              APPLICATION LAYER<br \/>                      \u2193<br \/>          \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>          \u2193           \u2193           \u2193<br \/>       REST API     Database     Service<br \/>          \u2193           \u2193           \u2193<br \/>       External    Internal     External<br \/>        System      System       System<br \/>          \u2193           \u2193           \u2193<br \/>          \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<br \/>                      \u2193<br \/>                  TOOL RESULT<br \/>                      \u2193<br \/>                     LLM<br \/>                      \u2193<br \/>                 FINAL RESPONSE<\/p>\n<p>Notice something important.<\/p>\n<p>The LLM is <strong>not directly connected to everything<\/strong>.<\/p>\n<p>The application layer controls the interaction.<\/p>\n<h3>\ud83e\udde9 5. Why Use an API\u00a0Adapter?<\/h3>\n<p>Suppose your external API\u00a0returns:<\/p>\n<p>{<br \/>  &#8220;customer_id&#8221;: 1001,<br \/>  &#8220;order_state&#8221;: &#8220;OUT_FOR_DELIVERY&#8221;,<br \/>  &#8220;estimated_delivery&#8221;: &#8220;2026-10-06&#8221;,<br \/>  &#8220;internal_code&#8221;: &#8220;X93A&#8221;<br \/>}<\/p>\n<p>You probably don\u2019t want to expose everything to the\u00a0model.<\/p>\n<p>Your tool can transform it:<\/p>\n<p>External API<br \/>     \u2193<br \/>API Adapter<br \/>     \u2193<br \/>{<br \/>  status: &#8220;Out for delivery&#8221;,<br \/>  delivery_date: &#8220;2026-10-06&#8221;<br \/>}<br \/>     \u2193<br \/>LLM<\/p>\n<p>This is cleaner and\u00a0safer.<\/p>\n<h3>\ud83d\udee0\ufe0f 6. Build a Simple API\u00a0Tool<\/h3>\n<p>Let\u2019s create a conceptual order\u00a0tool.<\/p>\n<p>from langchain.tools import tool<br \/>@tool<br \/>def get_order_status(order_id: str) -&gt; dict:<br \/>    &#8220;&#8221;&#8221;<br \/>    Get the current status of a customer order.<br \/>    &#8220;&#8221;&#8221;    # Application code would call<br \/>    # your actual order API here.    return {<br \/>        &#8220;order_id&#8221;: order_id,<br \/>        &#8220;status&#8221;: &#8220;shipped&#8221;<br \/>    }<\/p>\n<p>Now the AI can have access\u00a0to:<\/p>\n<p>get_order_status<\/p>\n<p>But remember:<\/p>\n<p><em>Tool definition is not authorization.<\/em><\/p>\n<p>Your application still needs to decide whether the current user is allowed to access that\u00a0order.<\/p>\n<h3>\ud83d\udd10 7. Authentication<\/h3>\n<p>External APIs usually require authentication.<\/p>\n<p>Common mechanisms include:<\/p>\n<p>API Keys<br \/>Bearer Tokens<br \/>OAuth 2.0<br \/>JWT<br \/>Service Credentials<br \/>Signed Requests<\/p>\n<p>For example:<\/p>\n<p>Authorization: Bearer &lt;token&gt;<\/p>\n<p>The AI should never be responsible for managing these\u00a0secrets.<\/p>\n<p>Bad:<\/p>\n<p>Prompt<br \/> \u2193<br \/>&#8220;Here is the API key&#8230;&#8221;<\/p>\n<p>Never put secrets into\u00a0prompts.<\/p>\n<p>Better:<\/p>\n<p>Agent<br \/> \u2193<br \/>Tool<br \/> \u2193<br \/>Secure Application Configuration<br \/> \u2193<br \/>Authenticated API Request<\/p>\n<h3>\ud83d\udd11 8. Keep Secrets Outside Your\u00a0Code<\/h3>\n<p>During development, environment variables are commonly\u00a0used.<\/p>\n<p>For example:<\/p>\n<p>import osAPI_KEY = os.getenv(&#8220;ORDER_API_KEY&#8221;)<\/p>\n<p>Your application configuration can provide the value securely.<\/p>\n<p>Avoid:<\/p>\n<p>API_KEY = &#8220;my-secret-key&#8221;<\/p>\n<p>And definitely don\u2019t commit secrets to\u00a0Git.<\/p>\n<p>A typical architecture is:<\/p>\n<p>Environment \/ Secret Manager<br \/>              \u2193<br \/>          Application<br \/>              \u2193<br \/>             Tool<br \/>              \u2193<br \/>             API<\/p>\n<h3>\ud83c\udf10 9. REST\u00a0APIs<\/h3>\n<p>Many enterprise systems expose REST\u00a0APIs.<\/p>\n<p>Typical operations:<\/p>\n<p>GET<br \/>POST<br \/>PUT<br \/>PATCH<br \/>DELETE<\/p>\n<p>For example:<\/p>\n<p>GET \/customers\/123<br \/>GET \/orders\/ORD-1001<br \/>POST \/tickets<br \/>PATCH \/orders\/ORD-1001<\/p>\n<p>But there is an important difference between:<\/p>\n<p>READ<\/p>\n<p>and:<\/p>\n<p>WRITE<\/p>\n<p>Read operations are generally easier to\u00a0control.<\/p>\n<p>Write operations can have real business consequences.<\/p>\n<h3>\u26a0\ufe0f 10. AI + Write APIs Need Extra Protection<\/h3>\n<p>Imagine an AI\u00a0has:<\/p>\n<p>cancel_order()<\/p>\n<p>The user\u00a0says:<\/p>\n<p><em>\u201cCancel my\u00a0order.\u201d<\/em><\/p>\n<p>The agent might generate a tool\u00a0call.<\/p>\n<p>But the system should not blindly execute\u00a0it.<\/p>\n<p>Instead:<\/p>\n<p>User Request<br \/>    \u2193<br \/>   LLM<br \/>    \u2193<br \/>Tool Call<br \/>    \u2193<br \/>Validate Arguments<br \/>    \u2193<br \/>Authenticate User<br \/>    \u2193<br \/>Authorize Action<br \/>    \u2193<br \/>Business Rules<br \/>    \u2193<br \/>Human Approval?<br \/>    \u2193<br \/>Execute<\/p>\n<p>This is much\u00a0safer.<\/p>\n<p>The LLM proposes the\u00a0action.<\/p>\n<p>The application controls the\u00a0action.<\/p>\n<h3>\ud83e\udde0 11. Tool Calling +\u00a0API<\/h3>\n<p>Now connect what we learned in Part\u00a019.<\/p>\n<p>USER<br \/> \u2193<br \/>LLM<br \/> \u2193<br \/>Tool Call<br \/> \u2193<br \/>Tool<br \/> \u2193<br \/>API<br \/> \u2193<br \/>External System<br \/> \u2193<br \/>API Response<br \/> \u2193<br \/>Tool Result<br \/> \u2193<br \/>LLM<br \/> \u2193<br \/>Final Answer<\/p>\n<p>For example:<\/p>\n<p>User:<br \/>&#8220;Where is order ORD-1001?&#8221;       \u2193LLM:<br \/>Call get_order_status(&#8220;ORD-1001&#8221;)       \u2193Tool:GET \/orders\/ORD-1001       \u2193API:{<br \/>    &#8220;status&#8221;: &#8220;shipped&#8221;<br \/>}       \u2193LLM:&#8221;Your order has shipped.&#8221;<\/p>\n<p>This is the basic pattern behind many AI assistants.<\/p>\n<h3>\ud83d\udce6 12. Structured API Responses<\/h3>\n<p>Never make the model depend on unpredictable raw API responses when you can normalize them.<\/p>\n<p>Instead of:<\/p>\n<p>{<br \/>  &#8220;data&#8221;: {<br \/>    &#8220;result&#8221;: {<br \/>      &#8220;shipment&#8221;: {<br \/>        &#8220;current_status&#8221;: &#8220;OFD&#8221;<br \/>      }<br \/>    }<br \/>  }<br \/>}<\/p>\n<p>your adapter can\u00a0produce:<\/p>\n<p>{<br \/>  &#8220;status&#8221;: &#8220;out_for_delivery&#8221;<br \/>}<\/p>\n<p>Then your LLM\u00a0sees:<\/p>\n<p>status = out_for_delivery<\/p>\n<p>This makes downstream reasoning simpler.<\/p>\n<h3>\ud83e\uddf1 13. API Adapter\u00a0Pattern<\/h3>\n<p>A useful architecture is:<\/p>\n<p>External API<br \/>     \u2193<br \/>HTTP Client<br \/>     \u2193<br \/>API Adapter<br \/>     \u2193<br \/>Validation<br \/>     \u2193<br \/>Normalized Data<br \/>     \u2193<br \/>    Tool<br \/>     \u2193<br \/>   Agent<\/p>\n<p>The adapter isolates external API complexity.<\/p>\n<p>For example:<\/p>\n<p>class OrderAPI:<br \/>    def get_order(self, order_id: str):<br \/>        # HTTP request<br \/>        # authentication<br \/>        # error handling<br \/>        # response parsing        return {<br \/>            &#8220;order_id&#8221;: order_id,<br \/>            &#8220;status&#8221;: &#8220;shipped&#8221;<br \/>        }<\/p>\n<p>Then your tool can\u00a0call:<\/p>\n<p>order_api = OrderAPI()<br \/>def get_order_status(order_id: str):<br \/>    return order_api.get_order(order_id)<\/p>\n<p>Now your agent doesn\u2019t need to know HTTP implementation details.<\/p>\n<h3>\ud83d\udc0d 14. Why This Matters for FastAPI Developers<\/h3>\n<p>If you\u2019re building AI backends with FastAPI, the architecture becomes very\u00a0natural.<\/p>\n<p>                 Client<br \/>                   \u2193<br \/>                FastAPI<br \/>                   \u2193<br \/>              AI Service<br \/>                   \u2193<br \/>                Agent<br \/>                   \u2193<br \/>                Tools<br \/>                   \u2193<br \/>          \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>          \u2193        \u2193        \u2193<br \/>        RAG       API       DB<br \/>          \u2193        \u2193        \u2193<br \/>        Data    External   Internal<\/p>\n<p>FastAPI becomes the application boundary.<\/p>\n<p>LangChain\/LangGraph handles AI workflow components.<\/p>\n<p>External APIs provide business capabilities.<\/p>\n<h3>\u26a1 15. Async\u00a0APIs<\/h3>\n<p>External calls can take\u00a0time.<\/p>\n<p>For example:<\/p>\n<p>Agent<br \/> \u2193<br \/>CRM API<br \/> \u2193<br \/>2 seconds<br \/> \u2193<br \/>Response<\/p>\n<p>If multiple independent APIs are required:<\/p>\n<p>                Agent<br \/>                  \u2193<br \/>       \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>       \u2193          \u2193          \u2193<br \/>      CRM        ERP       Search<br \/>       \u2193          \u2193          \u2193<br \/>       \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<br \/>                  \u2193<br \/>               Results<\/p>\n<p>Asynchronous application design can help manage I\/O efficiently.<\/p>\n<p>For Python applications, this is particularly relevant when using async-capable HTTP clients and FastAPI endpoints.<\/p>\n<p>But don\u2019t blindly make everything async.<\/p>\n<p>The real question\u00a0is:<\/p>\n<p><em>Is the workload I\/O-bound and can the underlying operation be performed asynchronously?<\/em><\/p>\n<h3>\u23f1\ufe0f 16.\u00a0Timeouts<\/h3>\n<p>Never assume an external API will always\u00a0respond.<\/p>\n<p>Bad architecture:<\/p>\n<p>Agent<br \/> \u2193<br \/>API<br \/> \u2193<br \/>Waiting forever&#8230;<\/p>\n<p>Better:<\/p>\n<p>Agent<br \/> \u2193<br \/>API<br \/> \u2193<br \/>Timeout<br \/> \u2193<br \/>Controlled Error<br \/> \u2193<br \/>Agent \/ Application<\/p>\n<p>For example:<\/p>\n<p>TIMEOUT_SECONDS = 10<\/p>\n<p>The exact value depends on your\u00a0system.<\/p>\n<p>Timeouts should be designed based on expected API behavior and user experience.<\/p>\n<h3>\ud83d\udd01 17.\u00a0Retries<\/h3>\n<p>External services can temporarily fail.<\/p>\n<p>For example:<\/p>\n<p>Request<br \/> \u2193<br \/>503<br \/> \u2193<br \/>Retry<br \/> \u2193<br \/>200<\/p>\n<p>But retries need\u00a0limits.<\/p>\n<p>Bad:<\/p>\n<p>Retry<br \/>Retry<br \/>Retry<br \/>Retry<br \/>Retry<br \/>&#8230;<\/p>\n<p>Better:<\/p>\n<p>Request<br \/> \u2193<br \/>Failure<br \/> \u2193<br \/>Retry 1<br \/> \u2193<br \/>Failure<br \/> \u2193<br \/>Retry 2<br \/> \u2193<br \/>Failure<br \/> \u2193<br \/>Controlled Failure<\/p>\n<p>Use retry policies appropriate to the\u00a0error.<\/p>\n<p>A temporary network problem may be retryable.<\/p>\n<p>An invalid request usually\u00a0isn\u2019t.<\/p>\n<h3>\ud83d\udea6 18. Rate\u00a0Limits<\/h3>\n<p>External APIs often limit requests.<\/p>\n<p>For example:<\/p>\n<p>100 requests \/ minute<\/p>\n<p>A multi-agent system can unexpectedly generate many requests.<\/p>\n<p>Imagine:<\/p>\n<p>Supervisor<br \/> \u2193<br \/>5 Agents<br \/> \u2193<br \/>Each calls API 5 times<br \/> \u2193<br \/>25 API calls<\/p>\n<p>At scale, this can\u00a0become:<\/p>\n<p>Rate Limit<br \/>   \u2193<br \/>429<br \/>   \u2193<br \/>Agent Failure<\/p>\n<p>Your application needs:<\/p>\n<p>Rate limitingBackoffRequest controlCaching where appropriateMonitoring<\/p>\n<h3>\ud83d\udcbe 19.\u00a0Caching<\/h3>\n<p>Suppose hundreds of users\u00a0ask:<\/p>\n<p><em>\u201cWhat is our return\u00a0policy?\u201d<\/em><\/p>\n<p>You don\u2019t necessarily need to call the external system every\u00a0time.<\/p>\n<p>You might\u00a0use:<\/p>\n<p>User<br \/> \u2193<br \/>Agent<br \/> \u2193<br \/>Cache?<br \/> \u251c\u2500\u2500 YES \u2192 Return cached data<br \/> \u2514\u2500\u2500 NO<br \/>       \u2193<br \/>      API<br \/>       \u2193<br \/>     Cache<br \/>       \u2193<br \/>    Response<\/p>\n<p>Caching depends\u00a0on:<\/p>\n<p>Data freshnessSecurityUser-specific informationTTLBusiness requirements<\/p>\n<p>Never cache sensitive information without considering isolation and\u00a0privacy.<\/p>\n<h3>\ud83e\uddea 20. API Error\u00a0Handling<\/h3>\n<p>What happens\u00a0when:<\/p>\n<p>API \u2192 404<\/p>\n<p>or:<\/p>\n<p>API \u2192 401<\/p>\n<p>or:<\/p>\n<p>API \u2192 500<\/p>\n<p>Your tool should convert raw failures into controlled application-level results.<\/p>\n<p>For example:<\/p>\n<p>{<br \/>    &#8220;success&#8221;: False,<br \/>    &#8220;error&#8221;: &#8220;ORDER_NOT_FOUND&#8221;<br \/>}<\/p>\n<p>Then the agent can respond appropriately.<\/p>\n<p>Instead of:<\/p>\n<p><em>\u201cSomething went wrong: HTTP 500 Internal Server\u00a0Error\u201d<\/em><\/p>\n<p>the application might provide a user-friendly response.<\/p>\n<h3>\ud83e\udde0 21. Don\u2019t Let the LLM Handle Every\u00a0Error<\/h3>\n<p>This is another important principle.<\/p>\n<p>Business rules should remain deterministic.<\/p>\n<p>For example:<\/p>\n<p>HTTP 404<br \/> \u2193<br \/>ORDER_NOT_FOUND<\/p>\n<p>should be converted by application code.<\/p>\n<p>Not:<\/p>\n<p>LLM:<br \/>&#8220;Maybe the order exists somewhere&#8230;&#8221;<\/p>\n<p>The LLM should not invent a successful result.<\/p>\n<h3>\ud83d\udd10 22. Authorization<\/h3>\n<p>Suppose:<\/p>\n<p>User A<\/p>\n<p>asks for:<\/p>\n<p>Order B<\/p>\n<p>The tool must verify whether User A can access Order\u00a0B.<\/p>\n<p>Architecture:<\/p>\n<p>Tool Request<br \/>     \u2193<br \/>Authenticated User<br \/>     \u2193<br \/>Authorization Check<br \/>     \u2193<br \/>Is this user allowed?<br \/>     \u2193<br \/>YES \u2500\u2500\u2500\u2500\u2500\u2192 API<br \/>NO  \u2500\u2500\u2500\u2500\u2500\u2192 Reject<\/p>\n<p>This must happen in application code.<\/p>\n<p>Never rely\u00a0on:<\/p>\n<p>System Prompt:<br \/>&#8220;Only access the user&#8217;s orders.&#8221;<\/p>\n<p>A prompt is not an authorization system.<\/p>\n<h3>\ud83c\udfe2 23. Multi-Tenant SaaS<\/h3>\n<p>This becomes especially important in multi-tenant applications.<\/p>\n<p>Imagine:<\/p>\n<p>Tenant A<br \/> \u251c\u2500\u2500 Users<br \/> \u251c\u2500\u2500 Orders<br \/> \u2514\u2500\u2500 DataTenant B<br \/> \u251c\u2500\u2500 Users<br \/> \u251c\u2500\u2500 Orders<br \/> \u2514\u2500\u2500 Data<\/p>\n<p>An agent from Tenant A must never access Tenant B\u2019s information.<\/p>\n<p>Your architecture should carry tenant\u00a0context:<\/p>\n<p>Request<br \/> \u2193<br \/>Authenticated User<br \/> \u2193<br \/>Tenant ID<br \/> \u2193<br \/>Agent<br \/> \u2193<br \/>Tool<br \/> \u2193<br \/>Authorization<br \/> \u2193<br \/>Tenant-scoped API\/DB<\/p>\n<p>This should be enforced at the application\/data layer.<\/p>\n<h3>\ud83c\udf10 24.\u00a0Webhooks<\/h3>\n<p>APIs are often request\/response based.<\/p>\n<p>Webhooks allow external systems to notify your application.<\/p>\n<p>For example:<\/p>\n<p>Payment System<br \/>      \u2193<br \/>    Webhook<br \/>      \u2193<br \/>    FastAPI<br \/>      \u2193<br \/> Event Validation<br \/>      \u2193<br \/> LangGraph Workflow<br \/>      \u2193<br \/>    Agent<br \/>      \u2193<br \/>    Action<\/p>\n<p>Example event:<\/p>\n<p>{<br \/>  &#8220;event&#8221;: &#8220;payment_completed&#8221;,<br \/>  &#8220;order_id&#8221;: &#8220;ORD-1001&#8221;<br \/>}<\/p>\n<p>Your system can process the\u00a0event.<\/p>\n<h3>\ud83d\udd04 25. API + Webhook +\u00a0Agent<\/h3>\n<p>Now we can build something more interesting.<\/p>\n<p>External Service<br \/>      \u2193<br \/>   Webhook<br \/>      \u2193<br \/>  FastAPI<br \/>      \u2193<br \/>Event Validation<br \/>      \u2193<br \/>LangGraph<br \/>      \u2193<br \/>Supervisor<br \/>      \u2193<br \/>Specialized Agent<br \/>      \u2193<br \/>    Tool<br \/>      \u2193<br \/>External API<\/p>\n<p>This is no longer just a\u00a0chatbot.<\/p>\n<p><strong>API + Webhook +\u00a0Agent<\/strong><\/p>\n<p>It\u2019s an event-driven AI\u00a0system.<\/p>\n<h3>\ud83d\udee0\ufe0f 26. External Tools Can Be\u00a0Anything<\/h3>\n<p>Don\u2019t think only about REST\u00a0APIs.<\/p>\n<p>Tools can connect agents\u00a0to:<\/p>\n<p>REST APIs<br \/>GraphQL APIs<br \/>Databases<br \/>File Systems<br \/>Search<br \/>Internal Services<br \/>CRM<br \/>ERP<br \/>Cloud Services<br \/>Messaging Platforms<br \/>Analytics<br \/>Code Repositories<br \/>Business Systems<\/p>\n<p>The tool interface hides the implementation.<\/p>\n<h3>\ud83e\udde9 27. One Tool Should Do One Useful\u00a0Thing<\/h3>\n<p>A common mistake is creating:<\/p>\n<p>super_tool()<\/p>\n<p>that does:<\/p>\n<p>Search<br \/>Database<br \/>Email<br \/>Payment<br \/>CRM<br \/>Reports<br \/>Everything<\/p>\n<p>This becomes difficult to:<\/p>\n<p>SecureTestMonitorUnderstandMaintain<\/p>\n<p>Better:<\/p>\n<p>search_customer()<br \/>get_order()<br \/>get_invoice()<br \/>create_ticket()<br \/>get_inventory()<\/p>\n<p>Small tools are easier to reason\u00a0about.<\/p>\n<h3>\ud83d\udcd0 28. Tool Schema\u00a0Matters<\/h3>\n<p>The model needs to understand:<\/p>\n<p>Tool Name<br \/>Description<br \/>Arguments<br \/>Argument Types<br \/>Expected Result<\/p>\n<p>For example:<\/p>\n<p>@tool<br \/>def get_order_status(order_id: str) -&gt; dict:<br \/>    &#8220;&#8221;&#8221;<br \/>    Retrieve the current status of an order<br \/>    using the order identifier.<br \/>    &#8220;&#8221;&#8221;<\/p>\n<p>The description should\u00a0explain:<\/p>\n<p>What the tool\u00a0doesWhen it should be\u00a0usedWhat arguments meanWhat it\u00a0returns<\/p>\n<p>Good tool descriptions improve tool selection.<\/p>\n<h3>\ud83e\uddea 29. Tool Input Validation<\/h3>\n<p>Never assume the LLM gives perfect arguments.<\/p>\n<p>Suppose:<\/p>\n<p>order_id = &#8220;maybe-my-order&#8221;<\/p>\n<p>Your application should validate\u00a0it.<\/p>\n<p>Conceptually:<\/p>\n<p>LLM<br \/> \u2193<br \/>Tool Call<br \/> \u2193<br \/>Schema Validation<br \/> \u2193<br \/>Business Validation<br \/> \u2193<br \/>Execute<\/p>\n<p>For complex tools, structured schemas can make validation clearer.<\/p>\n<h3>\ud83d\udd04 30. Idempotency<\/h3>\n<p>This is especially important for write operations.<\/p>\n<p>Suppose an agent\u00a0tries:<\/p>\n<p>create_ticket()<\/p>\n<p>The API times\u00a0out.<\/p>\n<p>The agent doesn\u2019t know whether the ticket was\u00a0created.<\/p>\n<p>It retries.<\/p>\n<p>Now:<\/p>\n<p>Ticket #101<br \/>Ticket #102<\/p>\n<p>may have been created accidentally.<\/p>\n<p>Idempotency helps prevent duplicate operations.<\/p>\n<p>Conceptually:<\/p>\n<p>Request+Idempotency Key<br \/>        \u2193<br \/>External API<br \/>        \u2193<br \/>Same operation recognized<br \/>        \u2193<br \/>No duplicate side effect<\/p>\n<p>This is a critical production concept for AI-driven actions.<\/p>\n<h3>\ud83e\udde0 31. AI Should Propose; Systems Should\u00a0Decide<\/h3>\n<p>This principle is worth remembering.<\/p>\n<p> AI<br \/> \u2193<br \/>Proposes Action<br \/> \u2193<br \/>Application<br \/> \u2193<br \/>Validates<br \/> \u2193<br \/>Authorizes<br \/> \u2193<br \/>Business Rules<br \/> \u2193<br \/>Executes<\/p>\n<p>Not:<\/p>\n<p> AI<br \/> \u2193<br \/>Directly controls production systems<\/p>\n<p>This distinction becomes extremely important as agent capabilities grow.<\/p>\n<h3>\ud83c\udfd7\ufe0f 32. Complete Production Architecture<\/h3>\n<p>Let\u2019s combine everything.<\/p>\n<p>                         USER<br \/>                           \u2193<br \/>                      FASTAPI API<br \/>                           \u2193<br \/>                    AUTHENTICATION<br \/>                           \u2193<br \/>                      AI SERVICE<br \/>                           \u2193<br \/>                     LANGGRAPH<br \/>                           \u2193<br \/>                     SUPERVISOR<br \/>                           \u2193<br \/>          \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>          \u2193                \u2193                \u2193<br \/>      Research           Data            Support<br \/>       Agent              Agent            Agent<br \/>          \u2193                \u2193                \u2193<br \/>        RAG             Database           Tools<br \/>          \u2193                \u2193                \u2193<br \/>          \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<br \/>                           \u2193<br \/>                     TOOL LAYER<br \/>                           \u2193<br \/>              \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>              \u2193            \u2193            \u2193<br \/>           REST API      CRM API      ERP API<br \/>              \u2193            \u2193            \u2193<br \/>          External      External      External<br \/>           System        System        System<br \/>              \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<br \/>                           \u2193<br \/>                       RESULTS<br \/>                           \u2193<br \/>                      VALIDATION<br \/>                           \u2193<br \/>                    BUSINESS RULES<br \/>                           \u2193<br \/>                       RESPONSE<\/p>\n<p>This is beginning to look like a real enterprise AI architecture.<\/p>\n<h3>\ud83e\uddea 33. Playground Project<\/h3>\n<p>Let\u2019s design a small\u00a0project.<\/p>\n<h3>AI Customer Support Assistant<\/h3>\n<p>Tools:<\/p>\n<p>get_customer()<br \/>get_order()<br \/>get_order_status()<br \/>get_refund_policy()<br \/>create_support_ticket()<\/p>\n<p>Architecture:<\/p>\n<p>                     User<br \/>                      \u2193<br \/>                  Supervisor<br \/>                      \u2193<br \/>             \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>             \u2193        \u2193        \u2193<br \/>          Customer   Order    Policy<br \/>           Agent     Agent     Agent<br \/>             \u2193        \u2193        \u2193<br \/>            CRM      API       RAG<br \/>             \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<br \/>                      \u2193<br \/>                  Support Agent<br \/>                      \u2193<br \/>               Validator<br \/>                      \u2193<br \/>                    User<\/p>\n<h3>\ud83e\uddea 34. Experiment 1\u200a\u2014\u200aRead Operation<\/h3>\n<p>Ask:<\/p>\n<p>&#8220;What is the status of ORD-1001?&#8221;<\/p>\n<p>Expected:<\/p>\n<p>Agent<br \/> \u2193<br \/>get_order_status<br \/> \u2193<br \/>Order API<br \/> \u2193<br \/>Result<br \/> \u2193<br \/>Answer<\/p>\n<h3>\ud83e\uddea 35. Experiment 2\u200a\u2014\u200aMultiple\u00a0APIs<\/h3>\n<p>Ask:<\/p>\n<p><em>\u201cTell me my order status and whether I\u2019m eligible for a\u00a0refund.\u201d<\/em><\/p>\n<p>Possible workflow:<\/p>\n<p>User<br \/> \u2193<br \/>Supervisor<br \/> \u2193<br \/>Order Agent \u2500\u2500\u2500\u2500\u2500\u2192 Order API<br \/> \u2193<br \/>Policy Agent \u2500\u2500\u2500\u2500\u2192 RAG<br \/> \u2193<br \/>Support Agent<br \/> \u2193<br \/>Answer<\/p>\n<p>Now you\u2019re combining:<\/p>\n<p>AgentsAPIsRAGTool callingLangGraph<\/p>\n<h3>\ud83e\uddea 36. Experiment 3\u200a\u2014\u200aFailed\u00a0API<\/h3>\n<p>Simulate:<\/p>\n<p>Order API<br \/> \u2193<br \/>503 Service Unavailable<\/p>\n<p>Your system\u00a0should:<\/p>\n<p>Detect error<br \/> \u2193<br \/>Retry if appropriate<br \/> \u2193<br \/>Timeout<br \/> \u2193<br \/>Controlled failure<br \/> \u2193<br \/>User-friendly response<\/p>\n<p>Do not allow the model to invent the order\u00a0status.<\/p>\n<h3>\ud83e\uddea 37. Experiment 4\u200a\u2014\u200aUnauthorized Access<\/h3>\n<p>Try:<\/p>\n<p>User A<br \/> \u2193<br \/>Request Order B<\/p>\n<p>Expected:<\/p>\n<p>Authorization<br \/> \u2193<br \/>DENIED<\/p>\n<p>This experiment teaches an important lesson:<\/p>\n<p><em>AI tool calling and authorization are separate\u00a0systems.<\/em><\/p>\n<h3>\ud83e\uddea 38. Experiment 5\u200a\u2014\u200aWrite Operation<\/h3>\n<p>Add:<\/p>\n<p>create_support_ticket()<\/p>\n<p>Then design:<\/p>\n<p>User<br \/> \u2193<br \/>Agent<br \/> \u2193<br \/>Tool Call<br \/> \u2193<br \/>Validation<br \/> \u2193<br \/>Authorization<br \/> \u2193<br \/>Approval?<br \/> \u2193<br \/>Create Ticket<\/p>\n<p>Now you\u2019ve built a controlled AI\u00a0action.<\/p>\n<h3>\ud83d\udc1b 39. Debugging External\u00a0Tools<\/h3>\n<p>When something fails, don\u2019t immediately blame the\u00a0LLM.<\/p>\n<p>Debug layer by\u00a0layer.<\/p>\n<p>User Request<br \/> \u2193<br \/>Agent Decision<br \/> \u2193<br \/>Tool Selection<br \/> \u2193<br \/>Tool Arguments<br \/> \u2193<br \/>Schema Validation<br \/> \u2193<br \/>Authentication<br \/> \u2193<br \/>Authorization<br \/> \u2193<br \/>HTTP Request<br \/> \u2193<br \/>External API<br \/> \u2193<br \/>API Response<br \/> \u2193<br \/>Response Parsing<br \/> \u2193<br \/>Tool Result<br \/> \u2193<br \/>LLM<\/p>\n<p>Every layer can fail independently.<\/p>\n<h3>\ud83d\udcca 40. Production Metrics<\/h3>\n<p>Track external tool performance.<\/p>\n<p>Useful metrics\u00a0include:<\/p>\n<p>Tool call count<br \/>Success rate<br \/>Failure rate<br \/>Latency<br \/>Timeouts<br \/>Retries<br \/>Rate-limit errors<br \/>Authentication failures<br \/>Authorization failures<br \/>API response size<br \/>Cost<\/p>\n<p>For AI-specific monitoring, also\u00a0track:<\/p>\n<p>Agent decisions<br \/>Tool selection<br \/>Tool arguments<br \/>Model latency<br \/>Token usage<br \/>Final response quality<\/p>\n<p>This gives you a complete\u00a0picture.<\/p>\n<h3>\ud83d\udea8 41. Common\u00a0Mistakes<\/h3>\n<h3>Mistake 1\u200a\u2014\u200aAPI Key in\u00a0Prompt<\/h3>\n<p>Never.<\/p>\n<h3>Mistake 2\u200a\u2014\u200aAPI Key in\u00a0Git<\/h3>\n<p>Never.<\/p>\n<h3>Mistake 3\u200a\u2014\u200aNo\u00a0Timeout<\/h3>\n<p>Dangerous for production reliability.<\/p>\n<h3>Mistake 4\u200a\u2014\u200aUnlimited Retries<\/h3>\n<p>Can create cascading failures.<\/p>\n<h3>Mistake 5\u200a\u2014\u200aNo Authorization<\/h3>\n<p>Especially dangerous for customer-specific data.<\/p>\n<h3>Mistake 6\u200a\u2014\u200aGiving Agents Too Many\u00a0Tools<\/h3>\n<p>Increases complexity and\u00a0risk.<\/p>\n<h3>Mistake 7\u200a\u2014\u200aNo Input Validation<\/h3>\n<p>LLM-generated arguments are not automatically trustworthy.<\/p>\n<h3>Mistake 8\u200a\u2014\u200aNo Idempotency for Important Writes<\/h3>\n<p>Can produce duplicate side\u00a0effects.<\/p>\n<h3>Mistake 9\u200a\u2014\u200aExposing Raw API Responses<\/h3>\n<p>Normalize responses where appropriate.<\/p>\n<h3>Mistake 10\u200a\u2014\u200aLetting AI Decide Permissions<\/h3>\n<p>Authorization belongs to your application.<\/p>\n<h3>\ud83e\udde0 42. The Golden Architecture<\/h3>\n<p>Remember this:<\/p>\n<p>                    AI<br \/>                    \u2193<br \/>                Tool Call<br \/>                    \u2193<br \/>              APPLICATION<br \/>                    \u2193<br \/>          \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>          \u2193         \u2193         \u2193<br \/>       Validate   Authorize  Policy<br \/>          \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<br \/>                    \u2193<br \/>                  API<br \/>                    \u2193<br \/>             External System<br \/>                    \u2193<br \/>               Tool Result<br \/>                    \u2193<br \/>                   AI<\/p>\n<p>This is a much safer architecture than allowing the model to directly control external\u00a0systems.<\/p>\n<h3>\ud83c\udfc6 43. What You\u2019ve\u00a0Learned<\/h3>\n<p>At this point in the LangChain Playground, you\u2019ve moved far beyond basic chatbot development.<\/p>\n<p>You now understand:<\/p>\n<p>LLMs<br \/> \u2193<br \/>Prompts<br \/> \u2193<br \/>Structured Output<br \/> \u2193<br \/>Runnables<br \/> \u2193<br \/>LCEL<br \/> \u2193<br \/>Chains<br \/> \u2193<br \/>Parallel Workflows<br \/> \u2193<br \/>Conversation Context<br \/> \u2193<br \/>Memory<br \/> \u2193<br \/>Documents<br \/> \u2193<br \/>Text Splitting<br \/> \u2193<br \/>Embeddings<br \/> \u2193<br \/>Vector Stores<br \/> \u2193<br \/>Retrievers<br \/> \u2193<br \/>RAG<br \/> \u2193<br \/>Advanced RAG<br \/> \u2193<br \/>Tools<br \/> \u2193<br \/>Tool Calling<br \/> \u2193<br \/>Agents<br \/> \u2193<br \/>Agentic Workflows<br \/> \u2193<br \/>LangGraph<br \/> \u2193<br \/>Multi-Agent Systems<br \/> \u2193<br \/>APIs &amp; External Tools<\/p>\n<p>Now your AI isn\u2019t just generating text.<\/p>\n<p>It can interact with real software systems through controlled interfaces.<\/p>\n<h3>\ud83d\udd25 44. The Bigger\u00a0Picture<\/h3>\n<p>Think about the evolution.<\/p>\n<h3>Level 1<\/h3>\n<p>User \u2192 LLM \u2192 Answer<\/p>\n<h3>Level 2<\/h3>\n<p>User \u2192 LLM \u2192 RAG \u2192 Answer<\/p>\n<h3>Level 3<\/h3>\n<p>User \u2192 Agent \u2192 Tools \u2192 Answer<\/p>\n<h3>Level 4<\/h3>\n<p>User<br \/> \u2193<br \/>Agent<br \/> \u2193<br \/>RAG + APIs + Tools<br \/> \u2193<br \/>Answer<\/p>\n<h3>Level 5<\/h3>\n<p>User<br \/> \u2193<br \/>Supervisor<br \/> \u2193<br \/>Multiple Agents<br \/> \u2193<br \/>RAG + APIs + Tools<br \/> \u2193<br \/>Validation<br \/> \u2193<br \/>Business Logic<br \/> \u2193<br \/>Answer \/ Action<\/p>\n<p>That is where modern AI engineering starts becoming systems engineering.<\/p>\n<h3>\ud83d\ude80 45. Part 24 Challenge<\/h3>\n<p>Build a small AI assistant with:<\/p>\n<h3>Tools<\/h3>\n<p>get_customer()<br \/>get_order()<br \/>get_order_status()<br \/>get_policy()<\/p>\n<h3>Architecture<\/h3>\n<p>User<br \/> \u2193<br \/>Supervisor<br \/> \u2193<br \/>Specialized Agent<br \/> \u2193<br \/>Tool<br \/> \u2193<br \/>API<br \/> \u2193<br \/>Validation<br \/> \u2193<br \/>Answer<\/p>\n<p>Then deliberately introduce:<\/p>\n<p>Invalid order\u00a0IDUnauthorized orderAPI timeoutAPI 404API 500Rate-limit responseDuplicate write\u00a0request<\/p>\n<p>For every failure,\u00a0ask:<\/p>\n<p><strong><em>Which layer should handle this\u00a0problem?<\/em><\/strong><\/p>\n<p>That question will improve your engineering skills much faster than simply memorizing LangChain APIs.<\/p>\n<h3>\ud83d\udd17 46. Where We Go\u00a0Next<\/h3>\n<p>We\u2019ve now connected our AI system to external services.<\/p>\n<p>But we\u2019ve also introduced new problems:<\/p>\n<p>External APIs<br \/>     \u2193<br \/>Authentication<br \/>     \u2193<br \/>Timeouts<br \/>     \u2193<br \/>Retries<br \/>     \u2193<br \/>Rate Limits<br \/>     \u2193<br \/>Failures<br \/>     \u2193<br \/>Security<br \/>     \u2193<br \/>Scaling<\/p>\n<p>Our next challenge is\u00a0bigger.<\/p>\n<p>How do we turn everything we\u2019ve built into a system that can actually run reliably in production?<\/p>\n<p>That brings us\u00a0to:<\/p>\n<h3>\ud83c\udfd7\ufe0f Part 25\u200a\u2014\u200aBuilding a Production-Ready LangChain App<\/h3>\n<h3>From prototype to production.<\/h3>\n<p>We\u2019ll bring together:<\/p>\n<p>FastAPI<br \/>+<br \/>LangChain<br \/>+<br \/>LangGraph<br \/>+<br \/>RAG<br \/>+<br \/>Agents<br \/>+<br \/>Tools<br \/>+<br \/>Databases<br \/>+<br \/>External APIs<br \/>+<br \/>Authentication<br \/>+<br \/>Configuration<br \/>+<br \/>Logging<br \/>+<br \/>Error Handling<br \/>+<br \/>Observability<br \/>+<br \/>Deployment<\/p>\n<p>We\u2019ll discuss:<\/p>\n<p>Production architectureProject structureConfiguration managementEnvironment variablesSecretsAPI designDatabase integrationAsync processingBackground jobsCachingError handlingRetriesRate limitingAuthenticationAuthorizationMulti-tenancyLoggingMonitoringTestingEvaluationDeploymentScalingCost optimization<\/p>\n<p>Because building an AI demo is one\u00a0thing.<\/p>\n<p><strong>Building an AI application that people can actually depend on is\u00a0another.<\/strong><\/p>\n<p>See you in <strong>Part 25\u200a\u2014\u200aProduction-Ready LangChain Applications. \ud83d\ude80<\/strong><\/p>\n<p><a href=\"https:\/\/medium.com\/coinmonks\/langchain-playground-part-24-apis-external-tools-cdb19913a436\">\ud83c\udf10 LangChain Playground \u2014 Part 24: APIs &amp; External Tools<\/a> was originally published in <a href=\"https:\/\/medium.com\/coinmonks\">Coinmonks<\/a> on Medium, where people are continuing the conversation by highlighting and responding to this story.<\/p>","protected":false},"excerpt":{"rendered":"<p>API and External\u00a0Tools Your agents can think. Your agents can collaborate. Now let\u2019s connect them to the real\u00a0world. In the previous parts, we built a serious AI architecture. We started\u00a0with: LLM \u2193Prompt \u2193Structured Output \u2193Runnable \u2193Chain \u2193RAG \u2193Tools \u2193Tool Calling \u2193Agent \u2193Agentic Workflow \u2193LangGraph \u2193Multi-Agent System But there is still a major limitation. An AI [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":258512,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-258511","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-interesting"],"_links":{"self":[{"href":"https:\/\/mycryptomania.com\/index.php?rest_route=\/wp\/v2\/posts\/258511"}],"collection":[{"href":"https:\/\/mycryptomania.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mycryptomania.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/mycryptomania.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=258511"}],"version-history":[{"count":0,"href":"https:\/\/mycryptomania.com\/index.php?rest_route=\/wp\/v2\/posts\/258511\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mycryptomania.com\/index.php?rest_route=\/wp\/v2\/media\/258512"}],"wp:attachment":[{"href":"https:\/\/mycryptomania.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=258511"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mycryptomania.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=258511"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mycryptomania.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=258511"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}