> ## Documentation Index
> Fetch the complete documentation index at: https://docs.groundforge.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Tracing

> Create one GroundForge Trace for each external-Agent request.

The SDK records one GroundForge Trace for each direct invocation or Channel request.

Calls to `invoke`, `ainvoke`, `stream`, and `astream` are instrumented. Model and tool activity appears as steps inside the same Trace instead of separate top-level requests.

A Channel request commonly appears as:

```text theme={null}
Channel input
├─ Agent or model step
├─ Gateway decision
├─ Tool or MCP call
└─ Channel output
```

The basic Agent invocation does not need custom metadata:

```python theme={null}
result = agent.invoke(
    {"messages": [{"role": "user", "content": "What is the weather in Ottawa?"}]}
)
```

If your application already uses a stable LangChain `thread_id`, you may keep using it to group related requests. It is not required for the basic GroundForge connection.

Known secret fields and authorization values are redacted before Trace data is sent. Still avoid credentials in prompts or tool arguments.

See [Traces](/observability/traces) and [Request Tracing](/guides/request-tracing).

## Example

Complete [LangChain Agent Example](/examples/langchain-agent), send one request, and confirm one root Trace contains the Channel, model, tool, Gateway decision, and response steps.


## Related topics

- [Request Tracing](/guides/request-tracing.md)
- [Traces](/concepts/traces-analytics.md)
- [Usage Notes](/operations/usage-notes.md)
- [LangChain Agent Example](/examples/langchain-agent.md)
