TellWorldAI World Archive
Ask中文

Home›Practice

Practice

Practice

Hands-on guides and first-hand notes on agent frameworks, skills and AI tools.

Total 217

PracticeGetting started with smolagentssmolagents is a lightweight Hugging Face library whose default agent writes Python code to act. This guide covers installing it, running a first CodeAgent with web search, adding a custom tool and authorizing extra imports.PracticeSigned receipts for auditable AI agentsSign each agent tool call into a receipt with Ed25519 and chain receipts with hashes, so anyone holding the public key can verify them offline. Learn what receipts prove and what they do not.PracticeCreating local AI agentsRun a Qwen model on your own machine with Microsoft Foundry Local, add tools, local RAG and MCP, and build an engineering assistant that works offline. Covers the trade-offs and hybrid routing.PracticeMemory for AI agentsAgent memory comes in short-term and long-term forms. Session context lives in AgentSession, while facts that must persist need a database. Learn how Mem0, Cognee and knowledge agents differ.PracticeContext engineering for agentsContext engineering means giving an agent the right information at each step: planning what it needs, storing, compressing and isolating context, and spotting four common failure modes.PracticeAgentic protocols: MCP, A2A and NLWebMCP, A2A and NLWeb each cover a different connection in agent systems: tools and data, agent-to-agent collaboration, and website content. Learn which one fits your case.PracticeAI agents in productionInstrument an agent with traces and spans, track latency, cost and errors, combine offline and online evaluation, and control spending with smaller models, routing and caching.PracticeMetacognition in AI agentsBuild a hotel-recommendation agent that reviews its own choice and switches strategy after bad feedback, then review the risks in the lesson's exec and SQL examples.PracticeMulti-agent design patternsDecide when a task needs several agents, define how they communicate, coordinate and expose their activity, and pick a group chat, hand-off or recommendation pattern to build on.PracticePlanning design for agentsTurn a vague goal into subtasks, have the model return a structured plan in JSON, and route each subtask to the right agent, with the common pitfalls in the sample code marked.PracticeBuilding trustworthy agentsWrite an agent's system prompt in stages, guard against five common threats, and add a human approval step before sensitive actions, so you can build a first version of a safer agent.PracticeAgentic RAGAgentic RAG lets an LLM decide what to retrieve, rewrite failed queries and keep looping until the answer is supported. This guide explains how the loop runs, how it recovers from failure, and where its limits lie.PracticeThe tool use design pattern for agentsTool use lets an agent call functions and outside services such as databases, APIs and code execution. This guide walks through the function calling loop in Python and the access limits to set before going live.PracticeAgentic design principlesAgentic design principles are human-centred UX guidelines for building agents, not a fixed architecture. This guide covers the three principle groups, three implementation guidelines and a travel agent example.PracticeChoosing an agent framework: Microsoft Agent Framework vs Foundry Agent ServiceMicrosoft's two agent tools play different roles: the Microsoft Agent Framework for writing agents, and Foundry Agent Service for deploying and scaling them. This guide explains the difference and where to start.PracticeIntroduction to AI agentsAn AI agent gives a large language model tools and knowledge so it can act, not just reply. This guide explains the parts of an agent, the main agent types, and when an agent is worth building.PracticeMCP server best practicesLearn how to split MCP tools, validate parameters, handle errors, control access and rate limits, and why side-effecting tools need careful retry design.PracticeContext engineering with MCPContext engineering is still an emerging idea. This guide maps the context challenges MCP is designed for, several experimental approaches, and ways to measure results.PracticeBuilding a web-search MCP serverBuild a web-search MCP server with FastMCP and SerpAPI, offering web, news, product and Q&A tools, and learn to fix the common errors.PracticeExposing a database to agents through MCPDesign a multi-store PostgreSQL schema with Row Level Security and pgvector search, the database layer an MCP server would expose to agents.PracticeMCP core concepts: hosts, clients, servers and the three primitivesLearn how MCP hosts, clients and servers fit together, what resources, prompts and tools do, and how to write a first Python tool with fastmcp.PracticeMCP security risks and mitigationsMCP systems face prompt injection, tool poisoning, session hijacking, confused deputy attacks and token passthrough. This guide lists each risk with the controls the MCP specification requires.PracticeMCP samplingMCP sampling let a server ask the client's LLM to do work during a tool call. It is deprecated in the 2026-07-28 spec, so this guide explains the flow for legacy code and what new servers should do instead.PracticeAdding authentication to an MCP serverStart MCP server authentication with a credential in the Authorization header, move to signed JWTs, then add role-based permission checks in middleware. Each step lists its limits.